From e4c94d70e58ad79e31d375948d25a2629d99494a Mon Sep 17 00:00:00 2001 From: Michael Woodward Date: Sat, 16 Jan 2021 20:37:54 +0000 Subject: [PATCH] Add lowercase 'property' to pluralise --- src/Utils/StringUtils.php | 1 + test/Util/StringUtilsTest.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/Utils/StringUtils.php b/src/Utils/StringUtils.php index b7c84d9b..d64ce0c8 100644 --- a/src/Utils/StringUtils.php +++ b/src/Utils/StringUtils.php @@ -14,6 +14,7 @@ class StringUtils private static $pluraliseSearchReplace = [ 'Property "%s" was' => 'Properties "%s" were', 'Property' => 'Properties', + 'property' => 'properties', ]; public static function canonicalisePath(string $filename): string diff --git a/test/Util/StringUtilsTest.php b/test/Util/StringUtilsTest.php index 92e774c7..a45fdb5c 100644 --- a/test/Util/StringUtilsTest.php +++ b/test/Util/StringUtilsTest.php @@ -48,6 +48,7 @@ public function pluraliseMultipleProvider(): array ], ['Property "%s" was not promoted', 'Properties "propOne" & "propTwo" were not promoted'], ['Property "%s" was missing', 'Properties "propOne" & "propTwo" were missing'], + ['Visibility changed for property "%s"', 'Visibility changed for properties "propOne" & "propTwo"'], ]; } @@ -66,6 +67,7 @@ public function pluraliseSingularProvider(): array ['Property "%s" should not have changed type', 'Property "propOne" should not have changed type'], ['Property "%s" was not promoted', 'Property "propOne" was not promoted'], ['Property "%s" was missing', 'Property "propOne" was missing'], + ['Visibility changed for property "%s"', 'Visibility changed for property "propOne"'], ]; } }