Skip to content
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

[11.x](feat): Add isPlural method to Pluralizer class #53039

Draft
wants to merge 1 commit into
base: 11.x
Choose a base branch
from

Conversation

tal7aouy
Copy link

@tal7aouy tal7aouy commented Oct 5, 2024

In this PR we introduce a new isPlural method to the Pluralizer class. The method determines if a given word is in its plural form by comparing it with its singular form.

Changes:

  • Add isPlural method to check if a word is plural
  • Method returns true if the word is plural, false otherwise

This addition enhances the functionality of the Pluralizer class, providing a simple way to check for plural words.

@tal7aouy tal7aouy changed the title (feat): Add isPlural method to Pluralizer class [11.x](feat): Add isPlural method to Pluralizer class Oct 5, 2024
public function testIsPlural()
{
$this->assertTrue(Str::isPlural('children'));
$this->assertFalse(Str::isPlural('child'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Str class doesn't extends Pluralizer which cause the tests to failed.

@crynobone crynobone marked this pull request as draft October 6, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants