Skip to content

Add lowercase 'property' to pluralise #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Utils/StringUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/Util/StringUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"'],
];
}

Expand All @@ -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"'],
];
}
}