Set explicit visibility on class constants

This commit is contained in:
Joshua Ramon Enslin 2024-06-11 22:15:59 +02:00
parent 8c8ead0a02
commit 25e5e954b4
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
40 changed files with 88 additions and 88 deletions

View File

@ -13,7 +13,7 @@ declare(strict_types = 1);
*/
final class MDActorVariantTypesSet extends MDValueSet {
const ACTOR_VARIANT_TYPES = [
public const ACTOR_VARIANT_TYPES = [
'',
'birth_name',
'civil_name',

View File

@ -12,13 +12,13 @@ declare(strict_types = 1);
*/
final class MDAppointmentAttendanceModeSet extends MDValueSet {
const MODES = [
public const MODES = [
'offline',
'online',
'mixed',
];
const MODES_TO_SCHEMA_ORG = [
public const MODES_TO_SCHEMA_ORG = [
'offline' => 'https://schema.org/OfflineEventAttendanceMode',
'online' => 'https://schema.org/OnlineEventAttendanceMode',
'mixed' => 'https://schema.org/MixedEventAttendanceMode',

View File

@ -12,7 +12,7 @@ declare(strict_types = 1);
*/
final class MDAppointmentContributorsSet extends MDValueSet {
const AVAILABLE_ROLES = [
public const AVAILABLE_ROLES = [
'organizer',
'presenter',
];

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDAppointmentRecordingSet extends MDValueSet {
const AVAILABLE_RECORDING_TYPES = ['video'];
const EXTERNAL_SOURCES = ['Archive.org' => 'https://archive.org/details/'];
public const AVAILABLE_RECORDING_TYPES = ['video'];
public const EXTERNAL_SOURCES = ['Archive.org' => 'https://archive.org/details/'];
}

View File

@ -11,14 +11,14 @@ declare(strict_types = 1);
*/
final class MDAppointmentStatusSet extends MDValueSet {
const STATUS = [
public const STATUS = [
'scheduled',
'cancelled',
'moved_online',
'postponed',
];
const STATUS_TO_SCHEMA_ORG = [
public const STATUS_TO_SCHEMA_ORG = [
'scheduled' => 'https://schema.org/EventScheduled',
'cancelled' => 'https://schema.org/EventCancelled',
'moved_online' => 'https://schema.org/EventMovedOnline',

View File

@ -13,7 +13,7 @@ declare(strict_types = 1);
*/
final class MDBlockedMailserverSet extends MDValueSet {
const BLOCKED_DOMAINS = [
public const BLOCKED_DOMAINS = [
"@magenta.de",
"@t-online.de",
];

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDCloserLocationTypesSet extends MDValueSet {
const CLOSER_LOCATION_TYPES = [
public const CLOSER_LOCATION_TYPES = [
"0", // ''
"1", // Place of recording
"2", // Place of finding

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDColorsSet extends MDValueSet {
const COLOR_NAMES = [
public const COLOR_NAMES = [
"black",
"green",
"silver",
@ -30,7 +30,7 @@ final class MDColorsSet extends MDValueSet {
"aqua",
];
const COLOR_NAMES_AND_EMPTY = [
public const COLOR_NAMES_AND_EMPTY = [
'',
"black",
"green",
@ -50,7 +50,7 @@ final class MDColorsSet extends MDValueSet {
"aqua",
];
const COLORS_RGB = [
public const COLORS_RGB = [
"black" => [0, 0, 0],
"green" => [0, 128, 0],
"silver" => [192, 192, 192],

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDConservationReportTypeSet extends MDValueSet {
const REPORT_TYPES = [
public const REPORT_TYPES = [
'damage',
'conservation',
'condition',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDConservationStatusSet extends MDValueSet {
const STATUS_LEVELS = [
public const STATUS_LEVELS = [
1 => '',
34 => 'markedBad',
67 => 'markedMedium',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDCurrenciesSet extends MDValueSet {
const CURRENCIES = [
public const CURRENCIES = [
'',
'by-BYN',
'ch-CHF', // Swiss Franc

View File

@ -12,7 +12,7 @@ declare(strict_types = 1);
*/
final class MDDataHistorySubjectsSet extends MDValueSet {
const AVAILABLE_SUBJECTS = [
public const AVAILABLE_SUBJECTS = [
'appointment',
'collection',
'contact',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDDisposalMethodSet extends MDValueSet {
const METHODS = [
public const METHODS = [
'',
'sold',
'destroyed',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDEntryTypesSet extends MDValueSet {
const ENTRY_TYPES = [
public const ENTRY_TYPES = [
'0', //
'1', // Schenkung
'2', // Kauf

View File

@ -12,7 +12,7 @@ declare(strict_types = 1);
*/
final class MDExhibitionContributorsSet extends MDValueSet {
const AVAILABLE_ROLES = [
public const AVAILABLE_ROLES = [
'concept',
'curator',
'design',

View File

@ -11,9 +11,9 @@ declare(strict_types = 1);
*/
final class MDExternalHostingSet extends MDValueSet {
const DEFAULT_EXTERNAL_HOSTING = 'Archive.org';
public const DEFAULT_EXTERNAL_HOSTING = 'Archive.org';
const EXTERNAL_SOURCES = [
public const EXTERNAL_SOURCES = [
'Archive.org',
];

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDGenderSet extends MDValueSet {
const GENDERS = [
public const GENDERS = [
'',
'female',
'male',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDLanguagesSet {
const AVAILABLE_LANGUAGES_SHORT = [
public const AVAILABLE_LANGUAGES_SHORT = [
'aa',
'ab',
'ae',
@ -203,7 +203,7 @@ final class MDLanguagesSet {
'zu',
];
const AVAILABLE_LANGUAGES = [
public const AVAILABLE_LANGUAGES = [
'aa' => 'Afar-áf',
'ab' => 'аҧсуа бызшәа',
'ae' => 'Avestan',
@ -395,7 +395,7 @@ final class MDLanguagesSet {
'zu' => 'Zulu',
];
const LANGUAGES_ISO639_2B = [
public const LANGUAGES_ISO639_2B = [
'aa' => 'aar', # 'Afar-áf',
'ab' => 'abk', # 'аҧсуа бызшәа',
'ae' => 'ave', # 'Avestan',

View File

@ -11,10 +11,10 @@ declare(strict_types = 1);
*/
final class MDLicensesSet extends MDValueSet {
const DEFAULT_LICENSE_IMGS = 'CC BY-NC-SA';
const DEFAULT_LICENSE_METADATA = 'CC BY-NC-SA';
public const DEFAULT_LICENSE_IMGS = 'CC BY-NC-SA';
public const DEFAULT_LICENSE_METADATA = 'CC BY-NC-SA';
const AVAILABLE_LICENSES_NAMES = [
public const AVAILABLE_LICENSES_NAMES = [
'CC BY-NC-SA',
'CC BY-NC-ND',
@ -31,7 +31,7 @@ final class MDLicensesSet extends MDValueSet {
];
const AVAILABLE_LICENSES = [
public const AVAILABLE_LICENSES = [
'CC BY-NC-SA' => 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
'CC BY-NC-ND' => 'https://creativecommons.org/licenses/by-nc-nd/4.0/',

View File

@ -11,9 +11,9 @@ declare(strict_types = 1);
*/
final class MDLoanTypesSet extends MDValueSet {
const DEFAULT_LOAN_TYPE = 'outgoing';
public const DEFAULT_LOAN_TYPE = 'outgoing';
const LOAN_TYPES = [
public const LOAN_TYPES = [
'outgoing',
'incoming',
];

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDMarkingTypesSet extends MDValueSet {
const MARKING_TYPES = [
public const MARKING_TYPES = [
'signature',
'engraving',
'watermark',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDNodaRepositoriesSet extends MDValueSet {
const REPOSITORIES_ACTOR = [
public const REPOSITORIES_ACTOR = [
'allgemein',
'bne',
'bnf',
@ -36,7 +36,7 @@ final class MDNodaRepositoriesSet extends MDValueSet {
'Wikipedia',
];
const REPOSITORIES_PLACE = [
public const REPOSITORIES_PLACE = [
'allgemein',
'bne',
'bnf',
@ -56,7 +56,7 @@ final class MDNodaRepositoriesSet extends MDValueSet {
'Wikipedia',
];
const REPOSITORIES_TAG = [
public const REPOSITORIES_TAG = [
'aat',
'ackerbau',
'allgemein',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDObjectFormSet extends MDValueSet {
const FORMS = [
public const FORMS = [
'',
'cube',
'cuboid',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDObjectPositionsSet extends MDValueSet {
const POSITIONS = [
public const POSITIONS = [
'left', 'top_left', 'top', 'top_right', 'right', 'bottom_right', 'bottom', 'bottom_left', 'center', 'rear_side', 'edge', 'inside', 'other',
];

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDObjectPublicationBackgrounds extends MDValueSet {
const PUBLICATION_BACKGROUNDS = [
public const PUBLICATION_BACKGROUNDS = [
'0', // Image published
'1', // Transcript published
'2', // Discussed

View File

@ -11,9 +11,9 @@ declare(strict_types = 1);
*/
final class MDObjectStatusSet extends MDValueSet {
const DEFAULT_OBJECT_STATUS = 'owned';
public const DEFAULT_OBJECT_STATUS = 'owned';
const OBJECT_STATUS = [
public const OBJECT_STATUS = [
'owned',
'permanent_loan',
'third_party_property',

View File

@ -12,7 +12,7 @@ declare(strict_types = 1);
*/
final class MDObjectSyndicationSet extends MDValueSet {
const REPOSITORIES = [
public const REPOSITORIES = [
'ddb' => [
'url' => 'https://www.deutsche-digitale-bibliothek.de/',

View File

@ -17,9 +17,9 @@ declare(strict_types = 1);
*/
final class MDPhoneTypesSet extends MDValueSet {
const DEFAULT_PHONE_TYPE = 'work';
public const DEFAULT_PHONE_TYPE = 'work';
const PHONE_TYPES = [
public const PHONE_TYPES = [
'work',
'home',
'mobile',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDPlacetypesSet extends MDValueSet {
const PLACE_TYPE_IDS = [
public const PLACE_TYPE_IDS = [
'0', // => Administrativ
'1', // => Historisch
'2', // => Region - Landschaft - Naturpark

View File

@ -12,7 +12,7 @@ declare(strict_types = 1);
*/
final class MDPodcastContributorsSet extends MDValueSet {
const AVAILABLE_ROLES = [
public const AVAILABLE_ROLES = [
'onair',
'organization',
'recording',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDProcessTypesSet extends MDValueSet {
const TYPES = [
public const TYPES = [
'project',
'grant_application',
'exhibition',

View File

@ -11,9 +11,9 @@ declare(strict_types = 1);
*/
final class MDRecordingTypesSet extends MDValueSet {
const DEFAULT_RECORDING_TYPE = 'audio';
public const DEFAULT_RECORDING_TYPE = 'audio';
const RECORDING_TYPES = [
public const RECORDING_TYPES = [
'audio',
'video',
];

View File

@ -15,48 +15,48 @@ final class MDRequirementsSet {
// the given timespan. If they are not, the account will be ignored
// and deleted.
// 60 * 60 * 24 * 6 = 518400. 6 days.
const MAX_AGE_AFTER_USER_INVITE = 518400;
public const MAX_AGE_AFTER_USER_INVITE = 518400;
// Object images need to be at least 500 px wide
const MIN_OBJECT_IMAGE_WIDTH = 540;
public const MIN_OBJECT_IMAGE_WIDTH = 540;
// Object images need to be at least 500 px wide
const MIN_OBJECT_IMAGE_HEIGHT = 540;
public const MIN_OBJECT_IMAGE_HEIGHT = 540;
const MAX_FILESIZE_PDF = 20000000;
public const MAX_FILESIZE_PDF = 20000000;
const TIME_EARLIEST_YEAR = -6000000000;
const TIME_EARLIEST_DATE = '0001-01-01';
const TIME_LATEST_YEAR = 2099;
const TIME_LATEST_DATE = '9999-12-31';
const TIME_DEFAULT_DATE = '0001-01-01'; // Date to ignore in indexing
public const TIME_EARLIEST_YEAR = -6000000000;
public const TIME_EARLIEST_DATE = '0001-01-01';
public const TIME_LATEST_YEAR = 2099;
public const TIME_LATEST_DATE = '9999-12-31';
public const TIME_DEFAULT_DATE = '0001-01-01'; // Date to ignore in indexing
const MIMETYPES_USER_PROFILE_IMG = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_USER_PROFILE_IMG = ['image/jpeg', 'image/jpg'];
const MIMETYPES_OBJECT_IMAGE = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];
const MIMETYPES_OBJECT_PDF = ['application/pdf'];
const MIMETYPES_OBJECT_PROVENANCE_REPORT = ['application/pdf'];
const MIMETYPES_OBJECT_RESTORATION_REPORT = ['application/pdf', 'image/jpeg', 'image/png'];
const MIMETYPES_OBJECT_CONDITION_REPORT = ['application/pdf', 'image/jpeg', 'image/png'];
public const MIMETYPES_OBJECT_IMAGE = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];
public const MIMETYPES_OBJECT_PDF = ['application/pdf'];
public const MIMETYPES_OBJECT_PROVENANCE_REPORT = ['application/pdf'];
public const MIMETYPES_OBJECT_RESTORATION_REPORT = ['application/pdf', 'image/jpeg', 'image/png'];
public const MIMETYPES_OBJECT_CONDITION_REPORT = ['application/pdf', 'image/jpeg', 'image/png'];
const MIMETYPES_OBJECT_DOCUMENT = ['image/jpeg', 'image/jpg', 'application/pdf'];
public const MIMETYPES_OBJECT_DOCUMENT = ['image/jpeg', 'image/jpg', 'application/pdf'];
const MIMETYPES_COLLECTION_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_INSTITUTION_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_EXHIBITION_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_COLLECTION_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_INSTITUTION_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_EXHIBITION_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_ARTICLE_ASSET = ['image/jpeg', 'image/jpg', 'image/png'];
public const MIMETYPES_ARTICLE_ASSET = ['image/jpeg', 'image/jpg', 'image/png'];
const MIMETYPES_APPOINTMENT_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_APPOINTMENT_DOC_ASSET = ['application/pdf', 'image/jpeg', 'image/jpg', 'image/png'];
public const MIMETYPES_APPOINTMENT_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_APPOINTMENT_DOC_ASSET = ['application/pdf', 'image/jpeg', 'image/jpg', 'image/png'];
const MIMETYPES_PODCAST_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_PODCAST_EPISODE_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_TOUR_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_PODCAST_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_PODCAST_EPISODE_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_TOUR_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_CATALOGUE_WORK_IMAGE = ['image/jpeg', 'image/jpg'];
const MIMETYPES_CATALOGUE_OBJECT_SUMMARY_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_CATALOGUE_WORK_IMAGE = ['image/jpeg', 'image/jpg'];
public const MIMETYPES_CATALOGUE_OBJECT_SUMMARY_IMAGE = ['image/jpeg', 'image/jpg'];
const EXTENSIONS_THREE_D_ZIP = ['obj', 'mtl', 'jpg', 'jpeg', 'png'];
public const EXTENSIONS_THREE_D_ZIP = ['obj', 'mtl', 'jpg', 'jpeg', 'png'];
}

View File

@ -14,7 +14,7 @@ declare(strict_types = 1);
*/
final class MDResearchStatusSet extends MDValueSet {
const RESEARCH_STATUS = [
public const RESEARCH_STATUS = [
'bad',
'medium',
'good',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDSourceTypeSet extends MDValueSet {
const SOURCE_TYPES = [
public const SOURCE_TYPES = [
'article',
'inbook',
'book',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDSpaceAccessStatusSet extends MDValueSet {
const STATUS = [
public const STATUS = [
'enter',
'leave',
];

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDSpaceTypesSet extends MDValueSet {
const TYPES = [
public const TYPES = [
'building',
'floor',
'depot',

View File

@ -11,7 +11,7 @@ declare(strict_types = 1);
*/
final class MDTitleTypesSet extends MDValueSet {
const TITLE_TYPES = [
public const TITLE_TYPES = [
"",
"Science",
"Everyday speech",

View File

@ -11,10 +11,10 @@ declare(strict_types = 1);
*/
final class MDUnitsSet extends MDValueSet {
const UNITS_LENGTH = ['', 'm', 'dm', 'cm', 'mm', 'ft', 'in'];
const UNITS_WEIGHT = ['', 't', 'kg', 'g'];
public const UNITS_LENGTH = ['', 'm', 'dm', 'cm', 'mm', 'ft', 'in'];
public const UNITS_WEIGHT = ['', 't', 'kg', 'g'];
const UNITS_LENGTH_TO_MILLIMETER = [
public const UNITS_LENGTH_TO_MILLIMETER = [
'm' => 1000,
'ft' => 304.8,
'dm' => 100,
@ -23,7 +23,7 @@ final class MDUnitsSet extends MDValueSet {
'mm' => 1,
];
const UNITS_WEIGHT_TO_GRAMM = [
public const UNITS_WEIGHT_TO_GRAMM = [
't' => 1000000,
'kg' => 1000,
'g' => 1,

View File

@ -14,11 +14,11 @@ enum MDInstitutionExternalIdRepository implements MDValueEnumInterface, JsonSeri
case hu_ksh; // https://en.wikipedia.org/wiki/Hungarian_Central_Statistical_Office
const VALIDATION_PATTERN_HTML = [
private const VALIDATION_PATTERN_HTML = [
'hu_ksh' => '[0-9]{8}-[0-9]{4}-[0-9]{3}-[0-9]{2}',
];
const VALIDATION_PATTERN_PHP = [
private const VALIDATION_PATTERN_PHP = [
'hu_ksh' => '/^[0-9]{8}-[0-9]{4}-[0-9]{3}-[0-9]{2}$/',
];