diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2024-11-22 23:58:56 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2024-11-22 23:58:56 +0000 |
| commit | e873f434551745f888937263ff89e80db3b0f785 (patch) | |
| tree | c2ccdc2f7e9eb84a336dedcb75f4953fd46a6745 /app/Module | |
| parent | 95a8620a270e22e753770d980faee3cdf53d5566 (diff) | |
| download | webtrees-e873f434551745f888937263ff89e80db3b0f785.tar.gz webtrees-e873f434551745f888937263ff89e80db3b0f785.tar.bz2 webtrees-e873f434551745f888937263ff89e80db3b0f785.zip | |
PHP 8.3 allows class constants to have type hints
Diffstat (limited to 'app/Module')
45 files changed, 208 insertions, 208 deletions
diff --git a/app/Module/AncestorsChartModule.php b/app/Module/AncestorsChartModule.php index 738e3f31e6..46d4be9c1e 100644 --- a/app/Module/AncestorsChartModule.php +++ b/app/Module/AncestorsChartModule.php @@ -40,24 +40,24 @@ class AncestorsChartModule extends AbstractModule implements ModuleChartInterfac { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/ancestors-{style}-{generations}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/ancestors-{style}-{generations}/{xref}'; // Chart styles - public const CHART_STYLE_TREE = 'tree'; - public const CHART_STYLE_INDIVIDUALS = 'individuals'; - public const CHART_STYLE_FAMILIES = 'families'; + public const string CHART_STYLE_TREE = 'tree'; + public const string CHART_STYLE_INDIVIDUALS = 'individuals'; + public const string CHART_STYLE_FAMILIES = 'families'; // Defaults - public const DEFAULT_GENERATIONS = '4'; - public const DEFAULT_STYLE = self::CHART_STYLE_TREE; - protected const DEFAULT_PARAMETERS = [ + public const string DEFAULT_GENERATIONS = '4'; + public const string DEFAULT_STYLE = self::CHART_STYLE_TREE; + protected const array DEFAULT_PARAMETERS = [ 'generations' => self::DEFAULT_GENERATIONS, 'style' => self::DEFAULT_STYLE, ]; // Limits - protected const MINIMUM_GENERATIONS = 2; - protected const MAXIMUM_GENERATIONS = 10; + protected const int MINIMUM_GENERATIONS = 2; + protected const int MAXIMUM_GENERATIONS = 10; private ChartService $chart_service; diff --git a/app/Module/BranchesListModule.php b/app/Module/BranchesListModule.php index 9fd4e085b8..e9d0faae00 100644 --- a/app/Module/BranchesListModule.php +++ b/app/Module/BranchesListModule.php @@ -62,7 +62,7 @@ class BranchesListModule extends AbstractModule implements ModuleListInterface, { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/branches{/surname}'; + protected const string ROUTE_URL = '/tree/{tree}/branches{/surname}'; private ModuleService $module_service; diff --git a/app/Module/CkeditorModule.php b/app/Module/CkeditorModule.php index 40098fe0a6..aecff2f5d6 100644 --- a/app/Module/CkeditorModule.php +++ b/app/Module/CkeditorModule.php @@ -30,7 +30,7 @@ class CkeditorModule extends AbstractModule implements ModuleExternalUrlInterfac use ModuleGlobalTrait; // Location of our installation of CK editor. - public const CKEDITOR_PATH = 'ckeditor-4.15.1-custom/'; + public const string CKEDITOR_PATH = 'ckeditor-4.15.1-custom/'; /** * How should this module be identified in the control panel, etc.? diff --git a/app/Module/ClippingsCartModule.php b/app/Module/ClippingsCartModule.php index 1173f0ce60..f775c3278c 100644 --- a/app/Module/ClippingsCartModule.php +++ b/app/Module/ClippingsCartModule.php @@ -83,17 +83,17 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface use ModuleMenuTrait; // What to add to the cart? - private const ADD_RECORD_ONLY = 'record'; - private const ADD_CHILDREN = 'children'; - private const ADD_DESCENDANTS = 'descendants'; - private const ADD_PARENT_FAMILIES = 'parents'; - private const ADD_SPOUSE_FAMILIES = 'spouses'; - private const ADD_ANCESTORS = 'ancestors'; - private const ADD_ANCESTOR_FAMILIES = 'families'; - private const ADD_LINKED_INDIVIDUALS = 'linked'; + private const string ADD_RECORD_ONLY = 'record'; + private const string ADD_CHILDREN = 'children'; + private const string ADD_DESCENDANTS = 'descendants'; + private const string ADD_PARENT_FAMILIES = 'parents'; + private const string ADD_SPOUSE_FAMILIES = 'spouses'; + private const string ADD_ANCESTORS = 'ancestors'; + private const string ADD_ANCESTOR_FAMILIES = 'families'; + private const string ADD_LINKED_INDIVIDUALS = 'linked'; // Routes that have a record which can be added to the clipboard - private const ROUTES_WITH_RECORDS = [ + private const array ROUTES_WITH_RECORDS = [ 'Family' => FamilyPage::class, 'Individual' => IndividualPage::class, 'Media' => MediaPage::class, diff --git a/app/Module/ColorsTheme.php b/app/Module/ColorsTheme.php index 996d4e10f6..66c02f2417 100644 --- a/app/Module/ColorsTheme.php +++ b/app/Module/ColorsTheme.php @@ -40,7 +40,7 @@ use function uasort; class ColorsTheme extends CloudsTheme { // If no valid palette has been selected, use this one. - private const DEFAULT_PALETTE = 'ash'; + private const string DEFAULT_PALETTE = 'ash'; /** * How should this module be identified in the control panel, etc.? diff --git a/app/Module/CompactTreeChartModule.php b/app/Module/CompactTreeChartModule.php index 67aa5bf5dd..1e458e4d93 100644 --- a/app/Module/CompactTreeChartModule.php +++ b/app/Module/CompactTreeChartModule.php @@ -40,7 +40,7 @@ class CompactTreeChartModule extends AbstractModule implements ModuleChartInterf { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/compact/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/compact/{xref}'; private ChartService $chart_service; diff --git a/app/Module/DescendancyChartModule.php b/app/Module/DescendancyChartModule.php index dbe48ff1ba..b9ff6dfaae 100644 --- a/app/Module/DescendancyChartModule.php +++ b/app/Module/DescendancyChartModule.php @@ -40,24 +40,24 @@ class DescendancyChartModule extends AbstractModule implements ModuleChartInterf { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/descendants-{style}-{generations}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/descendants-{style}-{generations}/{xref}'; // Chart styles - public const CHART_STYLE_TREE = 'tree'; - public const CHART_STYLE_INDIVIDUALS = 'individuals'; - public const CHART_STYLE_FAMILIES = 'families'; + public const string CHART_STYLE_TREE = 'tree'; + public const string CHART_STYLE_INDIVIDUALS = 'individuals'; + public const string CHART_STYLE_FAMILIES = 'families'; // Defaults - public const DEFAULT_STYLE = self::CHART_STYLE_TREE; - public const DEFAULT_GENERATIONS = '3'; - protected const DEFAULT_PARAMETERS = [ + public const string DEFAULT_STYLE = self::CHART_STYLE_TREE; + public const string DEFAULT_GENERATIONS = '3'; + protected const array DEFAULT_PARAMETERS = [ 'generations' => self::DEFAULT_GENERATIONS, 'style' => self::DEFAULT_STYLE, ]; // Limits - protected const MINIMUM_GENERATIONS = 2; - protected const MAXIMUM_GENERATIONS = 10; + protected const int MINIMUM_GENERATIONS = 2; + protected const int MAXIMUM_GENERATIONS = 10; private ChartService $chart_service; diff --git a/app/Module/FamilyBookChartModule.php b/app/Module/FamilyBookChartModule.php index e358cea081..9d4db14692 100644 --- a/app/Module/FamilyBookChartModule.php +++ b/app/Module/FamilyBookChartModule.php @@ -39,23 +39,23 @@ class FamilyBookChartModule extends AbstractModule implements ModuleChartInterfa { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/family-book-{book_size}-{generations}-{spouses}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/family-book-{book_size}-{generations}-{spouses}/{xref}'; // Defaults - public const DEFAULT_GENERATIONS = '2'; - public const DEFAULT_DESCENDANT_GENERATIONS = '5'; - protected const DEFAULT_PARAMETERS = [ + public const string DEFAULT_GENERATIONS = '2'; + public const string DEFAULT_DESCENDANT_GENERATIONS = '5'; + protected const array DEFAULT_PARAMETERS = [ 'book_size' => self::DEFAULT_GENERATIONS, 'generations' => self::DEFAULT_DESCENDANT_GENERATIONS, 'spouses' => false, ]; // Limits - protected const MINIMUM_BOOK_SIZE = 2; - protected const MAXIMUM_BOOK_SIZE = 5; + protected const int MINIMUM_BOOK_SIZE = 2; + protected const int MAXIMUM_BOOK_SIZE = 5; - protected const MINIMUM_GENERATIONS = 2; - protected const MAXIMUM_GENERATIONS = 10; + protected const int MINIMUM_GENERATIONS = 2; + protected const int MAXIMUM_GENERATIONS = 10; /** * Initialization. diff --git a/app/Module/FamilyTreeStatisticsModule.php b/app/Module/FamilyTreeStatisticsModule.php index 6144615a2d..71db0f025e 100644 --- a/app/Module/FamilyTreeStatisticsModule.php +++ b/app/Module/FamilyTreeStatisticsModule.php @@ -46,7 +46,7 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn use ModuleBlockTrait; /** Show this number of surnames by default */ - private const DEFAULT_NUMBER_OF_SURNAMES = '10'; + private const string DEFAULT_NUMBER_OF_SURNAMES = '10'; private ModuleService $module_service; diff --git a/app/Module/FanChartModule.php b/app/Module/FanChartModule.php index 6238c35e47..78659d3c0a 100644 --- a/app/Module/FanChartModule.php +++ b/app/Module/FanChartModule.php @@ -73,34 +73,34 @@ class FanChartModule extends AbstractModule implements ModuleChartInterface, Req { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/fan-chart-{style}-{generations}-{width}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/fan-chart-{style}-{generations}-{width}/{xref}'; // Chart styles - private const STYLE_HALF_CIRCLE = 2; - private const STYLE_THREE_QUARTER_CIRCLE = 3; - private const STYLE_FULL_CIRCLE = 4; + private const int STYLE_HALF_CIRCLE = 2; + private const int STYLE_THREE_QUARTER_CIRCLE = 3; + private const int STYLE_FULL_CIRCLE = 4; // Defaults - public const DEFAULT_STYLE = self::STYLE_THREE_QUARTER_CIRCLE; - public const DEFAULT_GENERATIONS = 4; - public const DEFAULT_WIDTH = 100; - protected const DEFAULT_PARAMETERS = [ + public const int DEFAULT_STYLE = self::STYLE_THREE_QUARTER_CIRCLE; + public const int DEFAULT_GENERATIONS = 4; + public const int DEFAULT_WIDTH = 100; + protected const array DEFAULT_PARAMETERS = [ 'style' => self::DEFAULT_STYLE, 'generations' => self::DEFAULT_GENERATIONS, 'width' => self::DEFAULT_WIDTH, ]; // Limits - private const MINIMUM_GENERATIONS = 2; - private const MAXIMUM_GENERATIONS = 9; - private const MINIMUM_WIDTH = 50; - private const MAXIMUM_WIDTH = 500; + private const int MINIMUM_GENERATIONS = 2; + private const int MAXIMUM_GENERATIONS = 9; + private const int MINIMUM_WIDTH = 50; + private const int MAXIMUM_WIDTH = 500; // Chart layout parameters - private const FONT = Webtrees::ROOT_DIR . 'resources/fonts/DejaVuSans.ttf'; - private const CHART_WIDTH_PIXELS = 800; - private const TEXT_SIZE_POINTS = self::CHART_WIDTH_PIXELS / 120.0; - private const GAP_BETWEEN_RINGS = 2; + private const string FONT = Webtrees::ROOT_DIR . 'resources/fonts/DejaVuSans.ttf'; + private const int CHART_WIDTH_PIXELS = 800; + private const float TEXT_SIZE_POINTS = self::CHART_WIDTH_PIXELS / 120.0; + private const int GAP_BETWEEN_RINGS = 2; private ChartService $chart_service; diff --git a/app/Module/FixNameTags.php b/app/Module/FixNameTags.php index 7a77e2ea96..d0d281f3bc 100644 --- a/app/Module/FixNameTags.php +++ b/app/Module/FixNameTags.php @@ -41,7 +41,7 @@ class FixNameTags extends AbstractModule implements ModuleDataFixInterface use ModuleDataFixTrait; // https://legacyfamilytree.se/WEB_US/user_defined_gedcom_tags.htm - private const CONVERT = [ + private const array CONVERT = [ '_ADPN' => NameType::VALUE_ADOPTED, '_AKA' => NameType::VALUE_AKA, '_AKAN' => NameType::VALUE_AKA, diff --git a/app/Module/FixSearchAndReplace.php b/app/Module/FixSearchAndReplace.php index f28cb26609..85ff508e50 100644 --- a/app/Module/FixSearchAndReplace.php +++ b/app/Module/FixSearchAndReplace.php @@ -52,7 +52,7 @@ class FixSearchAndReplace extends AbstractModule implements ModuleDataFixInterfa use ModuleDataFixTrait; // A regular expression that never matches. - private const INVALID_REGEX = '/(?!)/'; + private const string INVALID_REGEX = '/(?!)/'; private DataFixService $data_fix_service; diff --git a/app/Module/HitCountFooterModule.php b/app/Module/HitCountFooterModule.php index 1f6970975b..0d15fd1bc0 100644 --- a/app/Module/HitCountFooterModule.php +++ b/app/Module/HitCountFooterModule.php @@ -47,7 +47,7 @@ class HitCountFooterModule extends AbstractModule implements ModuleFooterInterfa // Which routes do we count? // For historical reasons, we record the names of the original webtrees script and parameter. - protected const PAGE_NAMES = [ + protected const array PAGE_NAMES = [ FamilyPage::class => 'family.php', IndividualPage::class => 'individual.php', MediaPage::class => 'mediaviewer.php', diff --git a/app/Module/HourglassChartModule.php b/app/Module/HourglassChartModule.php index 26b5008c8a..537ca77470 100644 --- a/app/Module/HourglassChartModule.php +++ b/app/Module/HourglassChartModule.php @@ -42,19 +42,19 @@ class HourglassChartModule extends AbstractModule implements ModuleChartInterfac { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/hourglass-{generations}-{spouses}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/hourglass-{generations}-{spouses}/{xref}'; // Defaults - public const DEFAULT_GENERATIONS = '3'; - public const DEFAULT_SPOUSES = false; - protected const DEFAULT_PARAMETERS = [ + public const string DEFAULT_GENERATIONS = '3'; + public const bool DEFAULT_SPOUSES = false; + protected const array DEFAULT_PARAMETERS = [ 'generations' => self::DEFAULT_GENERATIONS, 'spouses' => self::DEFAULT_SPOUSES, ]; // Limits - protected const MINIMUM_GENERATIONS = 2; - protected const MAXIMUM_GENERATIONS = 10; + protected const int MINIMUM_GENERATIONS = 2; + protected const int MAXIMUM_GENERATIONS = 10; /** * Initialization. diff --git a/app/Module/IndividualMetadataModule.php b/app/Module/IndividualMetadataModule.php index bfd540f129..02ac1c1f64 100644 --- a/app/Module/IndividualMetadataModule.php +++ b/app/Module/IndividualMetadataModule.php @@ -35,7 +35,7 @@ class IndividualMetadataModule extends AbstractModule implements ModuleSidebarIn use ModuleSidebarTrait; // A list of facts that are handled by this module. - protected const HANDLED_FACTS = [ + protected const array HANDLED_FACTS = [ 'AFN', 'CHAN', 'IDNO', diff --git a/app/Module/LanguageEnglishGreatBritain.php b/app/Module/LanguageEnglishGreatBritain.php index cf3cad9b63..19fb8fbfc0 100644 --- a/app/Module/LanguageEnglishGreatBritain.php +++ b/app/Module/LanguageEnglishGreatBritain.php @@ -28,7 +28,7 @@ use Fisharebest\Localization\Locale\LocaleInterface; class LanguageEnglishGreatBritain extends LanguageEnglishUnitedStates { // British English changes "three-times" to "thrice" - protected const REMOVED = [ + protected const array REMOVED = [ '', ' once removed', ' twice removed', diff --git a/app/Module/LanguageEnglishUnitedStates.php b/app/Module/LanguageEnglishUnitedStates.php index 9abafa0f5d..1412818932 100644 --- a/app/Module/LanguageEnglishUnitedStates.php +++ b/app/Module/LanguageEnglishUnitedStates.php @@ -34,7 +34,7 @@ class LanguageEnglishUnitedStates extends AbstractModule implements ModuleLangua { use ModuleLanguageTrait; - protected const COUSIN = [ + protected const array COUSIN = [ 'sibling', 'first cousin', 'second cousin', @@ -68,7 +68,7 @@ class LanguageEnglishUnitedStates extends AbstractModule implements ModuleLangua 'thirtieth cousin', ]; - protected const REMOVED = [ + protected const array REMOVED = [ '', ' once removed', ' twice removed', @@ -101,7 +101,7 @@ class LanguageEnglishUnitedStates extends AbstractModule implements ModuleLangua ' twenty-nine times removed', ]; - protected const DIRECTION = [ + protected const array DIRECTION = [ -1 => ' descending', 0 => '', 1 => ' ascending', diff --git a/app/Module/LanguageFrench.php b/app/Module/LanguageFrench.php index 34813aabf5..995e7186ba 100644 --- a/app/Module/LanguageFrench.php +++ b/app/Module/LanguageFrench.php @@ -30,7 +30,7 @@ class LanguageFrench extends AbstractModule implements ModuleLanguageInterface { use ModuleLanguageTrait; - protected const SYMMETRIC_COUSINS = [ + protected const array SYMMETRIC_COUSINS = [ 1 => [ 'F' => ['cousine germaine', '%s de la cousine germaine'], 'M' => ['cousin germain', '%s du cousin germain'], @@ -43,7 +43,7 @@ class LanguageFrench extends AbstractModule implements ModuleLanguageInterface ] ]; - protected const ASYMMETRIC_COUSINS = [ + protected const array ASYMMETRIC_COUSINS = [ 1 => [ 'F' => ['down', 'petite-cousine', 'de la '], 'M' => ['down', 'petit-cousin', 'du '], diff --git a/app/Module/LanguageSlovakian.php b/app/Module/LanguageSlovakian.php index c529255e5e..e65bd8130b 100644 --- a/app/Module/LanguageSlovakian.php +++ b/app/Module/LanguageSlovakian.php @@ -34,7 +34,7 @@ class LanguageSlovakian extends AbstractModule implements ModuleLanguageInterfac { use ModuleLanguageTrait; - protected const MALE_COUSINS = [ + protected const array MALE_COUSINS = [ ['', ''], ['bratranec', '%s bratranca'], ['druhostupňový bratranec', '%s druhostupňového bratranca'], @@ -55,7 +55,7 @@ class LanguageSlovakian extends AbstractModule implements ModuleLanguageInterfac ['bratranec zo 17. kolena', '%s bratranca zo 17. kolena'], ]; - protected const FEMALE_COUSINS = [ + protected const array FEMALE_COUSINS = [ ['', ''], ['sesternica', '%s sesternice'], ['druhostupňová sesternica', '%s druhostupňovej sesternice'], diff --git a/app/Module/LifespansChartModule.php b/app/Module/LifespansChartModule.php index a20f8479ef..dfcdd85022 100644 --- a/app/Module/LifespansChartModule.php +++ b/app/Module/LifespansChartModule.php @@ -66,20 +66,20 @@ class LifespansChartModule extends AbstractModule implements ModuleChartInterfac { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/lifespans'; + protected const string ROUTE_URL = '/tree/{tree}/lifespans'; // In theory, only "@" is a safe separator, but it gives longer and uglier URLs. // Unless some other application generates XREFs with a ".", we are safe. - protected const SEPARATOR = '.'; + protected const string SEPARATOR = '.'; // Defaults - protected const DEFAULT_PARAMETERS = []; + protected const array DEFAULT_PARAMETERS = []; // Parameters for generating colors - protected const RANGE = 120; // degrees - protected const SATURATION = 100; // percent - protected const LIGHTNESS = 30; // percent - protected const ALPHA = 0.25; + protected const int RANGE = 120; // degrees + protected const int SATURATION = 100; // percent + protected const int LIGHTNESS = 30; // percent + protected const float ALPHA = 0.25; /** * Initialization. diff --git a/app/Module/LocationListModule.php b/app/Module/LocationListModule.php index f674a35953..a8c27a5d1e 100644 --- a/app/Module/LocationListModule.php +++ b/app/Module/LocationListModule.php @@ -38,7 +38,7 @@ class LocationListModule extends AbstractModule implements ModuleListInterface, { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/location-list'; + protected const string ROUTE_URL = '/tree/{tree}/location-list'; /** @var int The default access level for this module. It can be changed in the control panel. */ protected int $access_level = Auth::PRIV_USER; diff --git a/app/Module/MediaListModule.php b/app/Module/MediaListModule.php index 6364495b1e..974996cecb 100644 --- a/app/Module/MediaListModule.php +++ b/app/Module/MediaListModule.php @@ -52,7 +52,7 @@ class MediaListModule extends AbstractModule implements ModuleListInterface, Req { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/media-list'; + protected const string ROUTE_URL = '/tree/{tree}/media-list'; private LinkedRecordService $linked_record_service; diff --git a/app/Module/ModuleBlockInterface.php b/app/Module/ModuleBlockInterface.php index 29b19b6b0d..b6f0199920 100644 --- a/app/Module/ModuleBlockInterface.php +++ b/app/Module/ModuleBlockInterface.php @@ -28,15 +28,15 @@ use Psr\Http\Message\ServerRequestInterface; interface ModuleBlockInterface extends ModuleInterface { // Places we can display blocks - public const CONTEXT_EMBED = 'embed'; - public const CONTEXT_TREE_PAGE = 'tree'; - public const CONTEXT_USER_PAGE = 'user'; + public const string CONTEXT_EMBED = 'embed'; + public const string CONTEXT_TREE_PAGE = 'tree'; + public const string CONTEXT_USER_PAGE = 'user'; // We show blocks in two columns on the tree/user pages. - public const MAIN_BLOCKS = 'main'; - public const SIDE_BLOCKS = 'side'; + public const string MAIN_BLOCKS = 'main'; + public const string SIDE_BLOCKS = 'side'; - public const DEFAULT_TREE_PAGE_BLOCKS = [ + public const array DEFAULT_TREE_PAGE_BLOCKS = [ self::MAIN_BLOCKS => [ 1 => FamilyTreeStatisticsModule::class, 2 => FamilyTreeNewsModule::class, @@ -51,7 +51,7 @@ interface ModuleBlockInterface extends ModuleInterface ], ]; - public const DEFAULT_USER_PAGE_BLOCKS = [ + public const array DEFAULT_USER_PAGE_BLOCKS = [ self::MAIN_BLOCKS => [ 1 => OnThisDayModule::class, 2 => UserMessagesModule::class, diff --git a/app/Module/NoteListModule.php b/app/Module/NoteListModule.php index 404967e38e..6e902ae7a1 100644 --- a/app/Module/NoteListModule.php +++ b/app/Module/NoteListModule.php @@ -38,7 +38,7 @@ class NoteListModule extends AbstractModule implements ModuleListInterface, Requ { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/note-list'; + protected const string ROUTE_URL = '/tree/{tree}/note-list'; /** * Initialization. diff --git a/app/Module/OnThisDayModule.php b/app/Module/OnThisDayModule.php index 38787d51f7..cf57ad23f1 100644 --- a/app/Module/OnThisDayModule.php +++ b/app/Module/OnThisDayModule.php @@ -37,22 +37,22 @@ class OnThisDayModule extends AbstractModule implements ModuleBlockInterface use ModuleBlockTrait; // Pagination - private const LIMIT_LOW = 10; - private const LIMIT_HIGH = 20; + private const int LIMIT_LOW = 10; + private const int LIMIT_HIGH = 20; // Default values for new blocks. - private const DEFAULT_SORT = 'date_desc'; - private const DEFAULT_STYLE = 'date_desc'; + private const string DEFAULT_SORT = 'date_desc'; + private const string DEFAULT_STYLE = 'date_desc'; // Initial sorting for datatables - private const DATATABLES_ORDER = [ + private const array DATATABLES_ORDER = [ 'alpha' => [[0, 'asc']], 'date_asc' => [[2, 'asc']], 'date_desc' => [[2, 'desc']], ]; // All standard GEDCOM 5.5.1 events except CENS, RESI and EVEN - private const ALL_EVENTS = [ + private const array ALL_EVENTS = [ 'ADOP' => 'INDI:ADOP', 'ANUL' => 'FAM:ANUL', 'BAPM' => 'INDI:BAPM', @@ -85,7 +85,7 @@ class OnThisDayModule extends AbstractModule implements ModuleBlockInterface 'WILL' => 'INDI:WILL', ]; - private const DEFAULT_EVENTS = [ + private const array DEFAULT_EVENTS = [ 'BIRT', 'MARR', 'DEAT', diff --git a/app/Module/PedigreeChartModule.php b/app/Module/PedigreeChartModule.php index dc69df6020..4e16441aa0 100644 --- a/app/Module/PedigreeChartModule.php +++ b/app/Module/PedigreeChartModule.php @@ -41,28 +41,28 @@ class PedigreeChartModule extends AbstractModule implements ModuleChartInterface { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/pedigree-{style}-{generations}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/pedigree-{style}-{generations}/{xref}'; // Chart styles - public const STYLE_LEFT = 'left'; - public const STYLE_RIGHT = 'right'; - public const STYLE_UP = 'up'; - public const STYLE_DOWN = 'down'; + public const string STYLE_LEFT = 'left'; + public const string STYLE_RIGHT = 'right'; + public const string STYLE_UP = 'up'; + public const string STYLE_DOWN = 'down'; // Defaults - public const DEFAULT_GENERATIONS = '4'; - public const DEFAULT_STYLE = self::STYLE_RIGHT; - protected const DEFAULT_PARAMETERS = [ + public const string DEFAULT_GENERATIONS = '4'; + public const string DEFAULT_STYLE = self::STYLE_RIGHT; + protected const array DEFAULT_PARAMETERS = [ 'generations' => self::DEFAULT_GENERATIONS, 'style' => self::DEFAULT_STYLE, ]; // Limits - protected const MINIMUM_GENERATIONS = 2; - protected const MAXIMUM_GENERATIONS = 12; + protected const int MINIMUM_GENERATIONS = 2; + protected const int MAXIMUM_GENERATIONS = 12; // For RTL languages - protected const MIRROR_STYLE = [ + protected const array MIRROR_STYLE = [ self::STYLE_UP => self::STYLE_DOWN, self::STYLE_DOWN => self::STYLE_UP, self::STYLE_LEFT => self::STYLE_RIGHT, diff --git a/app/Module/PedigreeMapModule.php b/app/Module/PedigreeMapModule.php index 2a8722181d..677f4047d7 100644 --- a/app/Module/PedigreeMapModule.php +++ b/app/Module/PedigreeMapModule.php @@ -50,20 +50,20 @@ class PedigreeMapModule extends AbstractModule implements ModuleChartInterface, { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/pedigree-map-{generations}/{xref}'; + protected const string ROUTE_URL = '/tree/{tree}/pedigree-map-{generations}/{xref}'; // Defaults - public const DEFAULT_GENERATIONS = '4'; - public const DEFAULT_PARAMETERS = [ + public const string DEFAULT_GENERATIONS = '4'; + public const array DEFAULT_PARAMETERS = [ 'generations' => self::DEFAULT_GENERATIONS, ]; // Limits - public const MINIMUM_GENERATIONS = 1; - public const MAXIMUM_GENERATIONS = 10; + public const int MINIMUM_GENERATIONS = 1; + public const int MAXIMUM_GENERATIONS = 10; // CSS colors for each generation - protected const COUNT_CSS_COLORS = 12; + protected const int COUNT_CSS_COLORS = 12; protected ChartService $chart_service; diff --git a/app/Module/PlaceHierarchyListModule.php b/app/Module/PlaceHierarchyListModule.php index cbc34ea273..381e0e506c 100644 --- a/app/Module/PlaceHierarchyListModule.php +++ b/app/Module/PlaceHierarchyListModule.php @@ -56,7 +56,7 @@ class PlaceHierarchyListModule extends AbstractModule implements ModuleListInter { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/place-list{/place_id}'; + protected const string ROUTE_URL = '/tree/{tree}/place-list{/place_id}'; /** @var int The default access level for this module. It can be changed in the control panel. */ protected int $access_level = Auth::PRIV_USER; diff --git a/app/Module/PlacesModule.php b/app/Module/PlacesModule.php index 0a9f6958e9..13259f458d 100644 --- a/app/Module/PlacesModule.php +++ b/app/Module/PlacesModule.php @@ -37,7 +37,7 @@ class PlacesModule extends AbstractModule implements ModuleTabInterface { use ModuleTabTrait; - protected const ICONS = [ + protected const array ICONS = [ 'FAM:CENS' => ['color' => 'darkcyan', 'name' => 'list fas'], 'FAM:MARR' => ['color' => 'green', 'name' => 'infinity fas'], 'INDI:BAPM' => ['color' => 'hotpink', 'name' => 'water fas'], @@ -56,12 +56,12 @@ class PlacesModule extends AbstractModule implements ModuleTabInterface 'INDI:RESI' => ['color' => 'darkcyan', 'name' => 'home fas'], ]; - protected const OWN_ICONS = [ + protected const array OWN_ICONS = [ 'INDI:BIRT' => ['color' => 'red', 'name' => 'baby-carriage fas'], 'INDI:CHR' => ['color' => 'red', 'name' => 'water fas'], ] + self::ICONS; - protected const DEFAULT_ICON = ['color' => 'gold', 'name' => 'bullseye fas']; + protected const array DEFAULT_ICON = ['color' => 'gold', 'name' => 'bullseye fas']; private LeafletJsService $leaflet_js_service; diff --git a/app/Module/RecentChangesModule.php b/app/Module/RecentChangesModule.php index 5f757ce970..189017143e 100644 --- a/app/Module/RecentChangesModule.php +++ b/app/Module/RecentChangesModule.php @@ -48,20 +48,20 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface use ModuleBlockTrait; // Where do we look for change information - private const SOURCE_DATABASE = 'database'; - private const SOURCE_GEDCOM = 'gedcom'; + private const string SOURCE_DATABASE = 'database'; + private const string SOURCE_GEDCOM = 'gedcom'; - private const DEFAULT_DAYS = '7'; - private const DEFAULT_SHOW_USER = '1'; - private const DEFAULT_SHOW_DATE = '1'; - private const DEFAULT_SORT_STYLE = 'date_desc'; - private const DEFAULT_INFO_STYLE = 'table'; - private const DEFAULT_SOURCE = self::SOURCE_DATABASE; - private const MAX_DAYS = 90; + private const string DEFAULT_DAYS = '7'; + private const string DEFAULT_SHOW_USER = '1'; + private const string DEFAULT_SHOW_DATE = '1'; + private const string DEFAULT_SORT_STYLE = 'date_desc'; + private const string DEFAULT_INFO_STYLE = 'table'; + private const string DEFAULT_SOURCE = self::SOURCE_DATABASE; + private const int MAX_DAYS = 90; // Pagination - private const LIMIT_LOW = 10; - private const LIMIT_HIGH = 20; + private const int LIMIT_LOW = 10; + private const int LIMIT_HIGH = 20; private UserService $user_service; diff --git a/app/Module/RelationshipsChartModule.php b/app/Module/RelationshipsChartModule.php index 605ecdff4a..444df75353 100644 --- a/app/Module/RelationshipsChartModule.php +++ b/app/Module/RelationshipsChartModule.php @@ -68,17 +68,17 @@ class RelationshipsChartModule extends AbstractModule implements ModuleChartInte use ModuleChartTrait; use ModuleConfigTrait; - protected const ROUTE_URL = '/tree/{tree}/relationships-{ancestors}-{recursion}/{xref}{/xref2}'; + protected const string ROUTE_URL = '/tree/{tree}/relationships-{ancestors}-{recursion}/{xref}{/xref2}'; /** It would be more correct to use PHP_INT_MAX, but this isn't friendly in URLs */ - public const UNLIMITED_RECURSION = 99; + public const int UNLIMITED_RECURSION = 99; /** By default new trees allow unlimited recursion */ - public const DEFAULT_RECURSION = '99'; + public const string DEFAULT_RECURSION = '99'; /** By default new trees search for all relationships (not via ancestors) */ - public const DEFAULT_ANCESTORS = '0'; - public const DEFAULT_PARAMETERS = [ + public const string DEFAULT_ANCESTORS = '0'; + public const array DEFAULT_PARAMETERS = [ 'ancestors' => self::DEFAULT_ANCESTORS, 'recursion' => self::DEFAULT_RECURSION, ]; diff --git a/app/Module/RepositoryListModule.php b/app/Module/RepositoryListModule.php index 4597ea0612..a06770f722 100644 --- a/app/Module/RepositoryListModule.php +++ b/app/Module/RepositoryListModule.php @@ -38,7 +38,7 @@ class RepositoryListModule extends AbstractModule implements ModuleListInterface { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/repository-list'; + protected const string ROUTE_URL = '/tree/{tree}/repository-list'; /** @var int The default access level for this module. It can be changed in the control panel. */ protected int $access_level = Auth::PRIV_USER; diff --git a/app/Module/ResearchTaskModule.php b/app/Module/ResearchTaskModule.php index a549f9f06d..b824b3c240 100644 --- a/app/Module/ResearchTaskModule.php +++ b/app/Module/ResearchTaskModule.php @@ -44,16 +44,16 @@ class ResearchTaskModule extends AbstractModule implements ModuleBlockInterface { use ModuleBlockTrait; - private const DEFAULT_SHOW_OTHER = '1'; - private const DEFAULT_SHOW_UNASSIGNED = '1'; - private const DEFAULT_SHOW_FUTURE = '1'; + private const string DEFAULT_SHOW_OTHER = '1'; + private const string DEFAULT_SHOW_UNASSIGNED = '1'; + private const string DEFAULT_SHOW_FUTURE = '1'; // 31 DEC 9999 - private const MAXIMUM_JULIAN_DAY = 5373484; + private const int MAXIMUM_JULIAN_DAY = 5373484; // Pagination - private const LIMIT_LOW = 10; - private const LIMIT_HIGH = 20; + private const int LIMIT_LOW = 10; + private const int LIMIT_HIGH = 20; /** * Early initialisation. Called before most of the middleware. diff --git a/app/Module/ShareAnniversaryModule.php b/app/Module/ShareAnniversaryModule.php index 9b32585db5..71f4292326 100644 --- a/app/Module/ShareAnniversaryModule.php +++ b/app/Module/ShareAnniversaryModule.php @@ -47,10 +47,10 @@ class ShareAnniversaryModule extends AbstractModule implements ModuleShareInterf { use ModuleShareTrait; - protected const INDIVIDUAL_EVENTS = ['BIRT', 'DEAT']; - protected const FAMILY_EVENTS = ['MARR']; + protected const array INDIVIDUAL_EVENTS = ['BIRT', 'DEAT']; + protected const array FAMILY_EVENTS = ['MARR']; - protected const ROUTE_URL = '/tree/{tree}/anniversary-ics/{xref}/{fact_id}'; + protected const string ROUTE_URL = '/tree/{tree}/anniversary-ics/{xref}/{fact_id}'; /** * Initialization. diff --git a/app/Module/SiteMapModule.php b/app/Module/SiteMapModule.php index 53b3edc02a..f90cd5e649 100644 --- a/app/Module/SiteMapModule.php +++ b/app/Module/SiteMapModule.php @@ -57,10 +57,10 @@ class SiteMapModule extends AbstractModule implements ModuleConfigInterface, Req { use ModuleConfigTrait; - private const RECORDS_PER_VOLUME = 500; // Keep sitemap files small, for memory, CPU and max_allowed_packet limits. - private const CACHE_LIFE = 209600; // Two weeks + private const int RECORDS_PER_VOLUME = 500; // Keep sitemap files small, for memory, CPU and max_allowed_packet limits. + private const int CACHE_LIFE = 209600; // Two weeks - private const PRIORITY = [ + private const array PRIORITY = [ Family::RECORD_TYPE => 0.7, Individual::RECORD_TYPE => 0.9, Media::RECORD_TYPE => 0.5, diff --git a/app/Module/SlideShowModule.php b/app/Module/SlideShowModule.php index 7b7713204a..7e94d19139 100644 --- a/app/Module/SlideShowModule.php +++ b/app/Module/SlideShowModule.php @@ -44,15 +44,15 @@ class SlideShowModule extends AbstractModule implements ModuleBlockInterface use ModuleBlockTrait; // Show media linked to events or individuals. - private const LINK_ALL = 'all'; - private const LINK_EVENT = 'event'; - private const LINK_INDIVIDUAL = 'indi'; + private const string LINK_ALL = 'all'; + private const string LINK_EVENT = 'event'; + private const string LINK_INDIVIDUAL = 'indi'; // How long to show each slide (seconds) - private const DELAY = 6; + private const int DELAY = 6; // New data is normalized. Old data may contain jpg/jpeg, tif/tiff. - private const SUPPORTED_FORMATS = ['bmp', 'gif', 'jpeg', 'jpg', 'png', 'tif', 'tiff', 'webp']; + private const array SUPPORTED_FORMATS = ['bmp', 'gif', 'jpeg', 'jpg', 'png', 'tif', 'tiff', 'webp']; private LinkedRecordService $linked_record_service; diff --git a/app/Module/SourceListModule.php b/app/Module/SourceListModule.php index bb8b63c990..19d4217835 100644 --- a/app/Module/SourceListModule.php +++ b/app/Module/SourceListModule.php @@ -37,7 +37,7 @@ class SourceListModule extends AbstractModule implements ModuleListInterface, Re { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/source-list'; + protected const string ROUTE_URL = '/tree/{tree}/source-list'; /** @var int The default access level for this module. It can be changed in the control panel. */ protected int $access_level = Auth::PRIV_USER; diff --git a/app/Module/StatisticsChartModule.php b/app/Module/StatisticsChartModule.php index ad0caa01f1..ede150cdfd 100644 --- a/app/Module/StatisticsChartModule.php +++ b/app/Module/StatisticsChartModule.php @@ -51,31 +51,31 @@ class StatisticsChartModule extends AbstractModule implements ModuleChartInterfa { use ModuleChartTrait; - public const X_AXIS_INDIVIDUAL_MAP = 1; - public const X_AXIS_BIRTH_MAP = 2; - public const X_AXIS_DEATH_MAP = 3; - public const X_AXIS_MARRIAGE_MAP = 4; - public const X_AXIS_BIRTH_MONTH = 11; - public const X_AXIS_DEATH_MONTH = 12; - public const X_AXIS_MARRIAGE_MONTH = 13; - public const X_AXIS_FIRST_CHILD_MONTH = 14; - public const X_AXIS_FIRST_MARRIAGE_MONTH = 15; - public const X_AXIS_AGE_AT_DEATH = 18; - public const X_AXIS_AGE_AT_MARRIAGE = 19; - public const X_AXIS_AGE_AT_FIRST_MARRIAGE = 20; - public const X_AXIS_NUMBER_OF_CHILDREN = 21; + public const int X_AXIS_INDIVIDUAL_MAP = 1; + public const int X_AXIS_BIRTH_MAP = 2; + public const int X_AXIS_DEATH_MAP = 3; + public const int X_AXIS_MARRIAGE_MAP = 4; + public const int X_AXIS_BIRTH_MONTH = 11; + public const int X_AXIS_DEATH_MONTH = 12; + public const int X_AXIS_MARRIAGE_MONTH = 13; + public const int X_AXIS_FIRST_CHILD_MONTH = 14; + public const int X_AXIS_FIRST_MARRIAGE_MONTH = 15; + public const int X_AXIS_AGE_AT_DEATH = 18; + public const int X_AXIS_AGE_AT_MARRIAGE = 19; + public const int X_AXIS_AGE_AT_FIRST_MARRIAGE = 20; + public const int X_AXIS_NUMBER_OF_CHILDREN = 21; - public const Y_AXIS_NUMBERS = 201; - public const Y_AXIS_PERCENT = 202; + public const int Y_AXIS_NUMBERS = 201; + public const int Y_AXIS_PERCENT = 202; - public const Z_AXIS_ALL = 300; - public const Z_AXIS_SEX = 301; - public const Z_AXIS_TIME = 302; + public const int Z_AXIS_ALL = 300; + public const int Z_AXIS_SEX = 301; + public const int Z_AXIS_TIME = 302; // First two colors are blue/pink, to work with Z_AXIS_SEX. - private const Z_AXIS_COLORS = ['0000FF', 'FFA0CB', '9F00FF', 'FF7000', '905030', 'FF0000', '00FF00', 'F0F000']; + private const array Z_AXIS_COLORS = ['0000FF', 'FFA0CB', '9F00FF', 'FF7000', '905030', 'FF0000', '00FF00', 'F0F000']; - private const DAYS_IN_YEAR = 365.25; + private const float DAYS_IN_YEAR = 365.25; /** * How should this module be identified in the control panel, etc.? diff --git a/app/Module/SubmitterListModule.php b/app/Module/SubmitterListModule.php index 1ede29128d..a7fbdba032 100644 --- a/app/Module/SubmitterListModule.php +++ b/app/Module/SubmitterListModule.php @@ -38,7 +38,7 @@ class SubmitterListModule extends AbstractModule implements ModuleListInterface, { use ModuleListTrait; - protected const ROUTE_URL = '/tree/{tree}/submitter-list'; + protected const string ROUTE_URL = '/tree/{tree}/submitter-list'; /** @var int The default access level for this module. It can be changed in the control panel. */ protected int $access_level = Auth::PRIV_NONE; diff --git a/app/Module/TimelineChartModule.php b/app/Module/TimelineChartModule.php index 81f07b4dea..dc56601c06 100644 --- a/app/Module/TimelineChartModule.php +++ b/app/Module/TimelineChartModule.php @@ -45,20 +45,20 @@ class TimelineChartModule extends AbstractModule implements ModuleChartInterface { use ModuleChartTrait; - protected const ROUTE_URL = '/tree/{tree}/timeline-{scale}'; + protected const string ROUTE_URL = '/tree/{tree}/timeline-{scale}'; // Defaults - protected const DEFAULT_SCALE = 10; - protected const DEFAULT_PARAMETERS = [ + protected const int DEFAULT_SCALE = 10; + protected const array DEFAULT_PARAMETERS = [ 'scale' => self::DEFAULT_SCALE, ]; // Limits - protected const MINIMUM_SCALE = 1; - protected const MAXIMUM_SCALE = 200; + protected const int MINIMUM_SCALE = 1; + protected const int MAXIMUM_SCALE = 200; // GEDCOM events that may have DATE data, but should not be displayed - protected const NON_FACTS = [ + protected const array NON_FACTS = [ 'FAM:CHAN', 'INDI:BAPL', 'INDI:CHAN', @@ -68,7 +68,7 @@ class TimelineChartModule extends AbstractModule implements ModuleChartInterface 'INDI:_TODO', ]; - protected const BOX_HEIGHT = 30; + protected const int BOX_HEIGHT = 30; /** * Initialization. diff --git a/app/Module/TopGivenNamesModule.php b/app/Module/TopGivenNamesModule.php index 330c1cdf58..b6a3379790 100644 --- a/app/Module/TopGivenNamesModule.php +++ b/app/Module/TopGivenNamesModule.php @@ -35,8 +35,8 @@ class TopGivenNamesModule extends AbstractModule implements ModuleBlockInterface use ModuleBlockTrait; // Default values for new blocks. - private const DEFAULT_NUMBER = '10'; - private const DEFAULT_STYLE = 'table'; + private const string DEFAULT_NUMBER = '10'; + private const string DEFAULT_STYLE = 'table'; /** * How should this module be identified in the control panel, etc.? diff --git a/app/Module/TopPageViewsModule.php b/app/Module/TopPageViewsModule.php index 6e693b8f73..cfd9b42f64 100644 --- a/app/Module/TopPageViewsModule.php +++ b/app/Module/TopPageViewsModule.php @@ -37,9 +37,9 @@ class TopPageViewsModule extends AbstractModule implements ModuleBlockInterface { use ModuleBlockTrait; - private const DEFAULT_NUMBER_TO_SHOW = '10'; + private const string DEFAULT_NUMBER_TO_SHOW = '10'; - private const PAGES = ['individual.php', 'family.php', 'source.php', 'repo.php', 'note.php', 'mediaviewer.php']; + private const array PAGES = ['individual.php', 'family.php', 'source.php', 'repo.php', 'note.php', 'mediaviewer.php']; /** * How should this module be identified in the control panel, etc.? diff --git a/app/Module/TopSurnamesModule.php b/app/Module/TopSurnamesModule.php index 0e5bcbe618..913e88d0ea 100644 --- a/app/Module/TopSurnamesModule.php +++ b/app/Module/TopSurnamesModule.php @@ -48,8 +48,8 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface use ModuleBlockTrait; // Default values for new blocks. - private const DEFAULT_NUMBER = '10'; - private const DEFAULT_STYLE = 'table'; + private const string DEFAULT_NUMBER = '10'; + private const string DEFAULT_STYLE = 'table'; private ModuleService $module_service; diff --git a/app/Module/UpcomingAnniversariesModule.php b/app/Module/UpcomingAnniversariesModule.php index cdf4e20f57..4bac38a882 100644 --- a/app/Module/UpcomingAnniversariesModule.php +++ b/app/Module/UpcomingAnniversariesModule.php @@ -36,33 +36,33 @@ class UpcomingAnniversariesModule extends AbstractModule implements ModuleBlockI { use ModuleBlockTrait; - private const SORT_STYLE_DATE = 'anniv'; - private const SORT_STYLE_NAME = 'alpha'; + private const string SORT_STYLE_DATE = 'anniv'; + private const string SORT_STYLE_NAME = 'alpha'; - private const LAYOUT_STYLE_LIST = 'list'; - private const LAYOUT_STYLE_TABLE = 'table'; + private const string LAYOUT_STYLE_LIST = 'list'; + private const string LAYOUT_STYLE_TABLE = 'table'; // Default values for new blocks. - private const DEFAULT_DAYS = '7'; - private const DEFAULT_FILTER = '1'; - private const DEFAULT_SORT = self::SORT_STYLE_NAME; - private const DEFAULT_STYLE = self::LAYOUT_STYLE_TABLE; + private const string DEFAULT_DAYS = '7'; + private const string DEFAULT_FILTER = '1'; + private const string DEFAULT_SORT = self::SORT_STYLE_NAME; + private const string DEFAULT_STYLE = self::LAYOUT_STYLE_TABLE; // Initial sorting for datatables - private const DATATABLES_ORDER = [ + private const array DATATABLES_ORDER = [ self::SORT_STYLE_NAME => [[0, 'asc']], self::SORT_STYLE_DATE => [[1, 'asc']], ]; // Can show this number of days into the future. - private const MAX_DAYS = 30; + private const int MAX_DAYS = 30; // Pagination - private const LIMIT_LOW = 10; - private const LIMIT_HIGH = 20; + private const int LIMIT_LOW = 10; + private const int LIMIT_HIGH = 20; // All standard GEDCOM 5.5.1 events except CENS, RESI and EVEN - private const ALL_EVENTS = [ + private const array ALL_EVENTS = [ 'ADOP' => 'INDI:ADOP', 'ANUL' => 'FAM:ANUL', 'BAPM' => 'INDI:BAPM', @@ -95,7 +95,7 @@ class UpcomingAnniversariesModule extends AbstractModule implements ModuleBlockI 'WILL' => 'INDI:WILL', ]; - private const DEFAULT_EVENTS = [ + private const array DEFAULT_EVENTS = [ 'BIRT', 'MARR', 'DEAT', diff --git a/app/Module/YahrzeitModule.php b/app/Module/YahrzeitModule.php index 6530b64d8a..aa61d64053 100644 --- a/app/Module/YahrzeitModule.php +++ b/app/Module/YahrzeitModule.php @@ -45,16 +45,16 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface use ModuleBlockTrait; // Default values for new blocks. - private const DEFAULT_CALENDAR = 'jewish'; - private const DEFAULT_DAYS = '7'; - private const DEFAULT_STYLE = 'table'; + private const string DEFAULT_CALENDAR = 'jewish'; + private const string DEFAULT_DAYS = '7'; + private const string DEFAULT_STYLE = 'table'; // Can show this number of days into the future. - private const MAX_DAYS = 30; + private const int MAX_DAYS = 30; // Pagination - private const LIMIT_LOW = 10; - private const LIMIT_HIGH = 20; + private const int LIMIT_LOW = 10; + private const int LIMIT_HIGH = 20; /** * How should this module be identified in the control panel, etc.? |
