Skip to content

Commit

Permalink
Update Selector.php
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Sep 1, 2024
1 parent 83e97d6 commit b1a8bba
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/Selector/Selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

namespace PHPat\Selector;

use PHPat\Selector\Modifier\AllOfSelectorModifier;
use PHPat\Selector\Modifier\AndModifier;
use PHPat\Selector\Modifier\AnyOfSelectorModifier;
use PHPat\Selector\Modifier\AtLeastCountOfSelectorModifier;
use PHPat\Selector\Modifier\AtMostCountOfSelectorModifier;
use PHPat\Selector\Modifier\NoneOfSelectorModifier;
use PHPat\Selector\Modifier\NotModifier;
use PHPat\Selector\Modifier\OneOfSelectorModifier;

final class Selector extends SelectorPrimitive
{
Expand All @@ -16,4 +22,34 @@ public static function NOT(SelectorInterface $selector): NotModifier
{
return new NotModifier($selector);
}

public static function AllOf(SelectorInterface ...$selectors): AllOfSelectorModifier
{
return new AllOfSelectorModifier(...$selectors);
}

public static function AnyOf(SelectorInterface ...$selectors): AnyOfSelectorModifier
{
return new AnyOfSelectorModifier(...$selectors);
}

public static function NoneOf(SelectorInterface ...$selectors): NoneOfSelectorModifier
{
return new NoneOfSelectorModifier(...$selectors);
}

public static function AtLeastCountOf(int $count, SelectorInterface ...$selectors): AtLeastCountOfSelectorModifier
{
return new AtLeastCountOfSelectorModifier($count, ...$selectors);
}

public static function AtMostCountOf(int $count, SelectorInterface ...$selectors): AtMostCountOfSelectorModifier
{
return new AtMostCountOfSelectorModifier($count, ...$selectors);
}

public static function OneOf(SelectorInterface ...$selectors): AtLeastCountOfSelectorModifier
{
return new OneOfSelectorModifier(...$selectors);

Check failure on line 53 in src/Selector/Selector.php

View workflow job for this annotation

GitHub Actions / Static Code and Architecture analysis (7.4, highest)

Method PHPat\Selector\Selector::OneOf() should return PHPat\Selector\Modifier\AtLeastCountOfSelectorModifier but returns PHPat\Selector\Modifier\OneOfSelectorModifier.

Check failure on line 53 in src/Selector/Selector.php

View workflow job for this annotation

GitHub Actions / Static Code and Architecture analysis (8.0, highest)

Method PHPat\Selector\Selector::OneOf() should return PHPat\Selector\Modifier\AtLeastCountOfSelectorModifier but returns PHPat\Selector\Modifier\OneOfSelectorModifier.

Check failure on line 53 in src/Selector/Selector.php

View workflow job for this annotation

GitHub Actions / Static Code and Architecture analysis (8.2, highest)

Method PHPat\Selector\Selector::OneOf() should return PHPat\Selector\Modifier\AtLeastCountOfSelectorModifier but returns PHPat\Selector\Modifier\OneOfSelectorModifier.

Check failure on line 53 in src/Selector/Selector.php

View workflow job for this annotation

GitHub Actions / Static Code and Architecture analysis (8.3, highest)

Method PHPat\Selector\Selector::OneOf() should return PHPat\Selector\Modifier\AtLeastCountOfSelectorModifier but returns PHPat\Selector\Modifier\OneOfSelectorModifier.
}
}

0 comments on commit b1a8bba

Please sign in to comment.