diff --git a/src/Components/Validator/RulesValidator.php b/src/Components/Validator/RulesValidator.php index 5812ec15..aab196b4 100644 --- a/src/Components/Validator/RulesValidator.php +++ b/src/Components/Validator/RulesValidator.php @@ -30,7 +30,7 @@ public function getTypeIdentifier(): string */ public function validate(TranslationSet $set, StorageInterface $storage): ValidationResult { - if (count($set->getAllTranslationIDs()) === 0) { + if ($set->getAllTranslationIDs() === []) { return new ValidationResult([], []); } diff --git a/tests/phpunit/Components/Validator/RulesValidatorTest.php b/tests/phpunit/Components/Validator/RulesValidatorTest.php index 0c2f6355..ca20e04a 100644 --- a/tests/phpunit/Components/Validator/RulesValidatorTest.php +++ b/tests/phpunit/Components/Validator/RulesValidatorTest.php @@ -55,7 +55,7 @@ public function testValidationWithoutTranslationsIsOkay(): void /** * @return array[] */ - public function ruleValidationDataProvider() + public function ruleValidationDataProvider(): array { return [ [Rules::NESTING_DEPTH, 2],