aboutsummaryrefslogtreecommitdiff
path: root/cli/i18n/I18nUsageValidator.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2024-11-28 17:11:04 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-28 17:11:04 +0100
commit15745d42b779ad14efde2932ab116f45eee39246 (patch)
tree2528a36184d8152d4f2d90dc73df680f84bbe1d1 /cli/i18n/I18nUsageValidator.php
parent604b186638276203c8495a3ee86da0cc240ab4d0 (diff)
Upgrade code to php 8.1 (#6748)
* revert Fix code indentation Fix code Upgrade code to php 8.1 * fix remarques * code review * code review * code review * Apply suggestions from code review * code review * Fixes * Many remainging updates of array syntax * Lost case 'reading-list' * Uneeded PHPDoc --------- Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'cli/i18n/I18nUsageValidator.php')
-rw-r--r--cli/i18n/I18nUsageValidator.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/cli/i18n/I18nUsageValidator.php b/cli/i18n/I18nUsageValidator.php
index dd514236b..89c88d222 100644
--- a/cli/i18n/I18nUsageValidator.php
+++ b/cli/i18n/I18nUsageValidator.php
@@ -5,10 +5,6 @@ require_once __DIR__ . '/I18nValidatorInterface.php';
class I18nUsageValidator implements I18nValidatorInterface {
- /** @var array<string> */
- private array $code;
- /** @var array<string,array<string,I18nValue>> */
- private array $reference;
private int $totalEntries = 0;
private int $failedEntries = 0;
private string $result = '';
@@ -17,9 +13,10 @@ class I18nUsageValidator implements I18nValidatorInterface {
* @param array<string,array<string,I18nValue>> $reference
* @param array<string> $code
*/
- public function __construct(array $reference, array $code) {
- $this->code = $code;
- $this->reference = $reference;
+ public function __construct(
+ private readonly array $reference,
+ private readonly array $code,
+ ) {
}
#[\Override]