mirror of
https://github.com/pestphp/pest.git
synced 2026-09-05 22:33:35 +02:00
chore: coding style changes
This commit is contained in:
@@ -9,17 +9,11 @@ use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class AssigneeTestCaseFilter implements TestCaseMethodFilter
|
||||
{
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*/
|
||||
public function __construct(private string $assignee)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the test case methods.
|
||||
*/
|
||||
public function accept(TestCaseMethodFactory $factory): bool
|
||||
{
|
||||
return array_filter($factory->assignees, fn (string $assignee): bool => str_starts_with($assignee, $this->assignee)) !== [];
|
||||
|
||||
@@ -9,9 +9,6 @@ use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class FlakyTestCaseFilter implements TestCaseMethodFilter
|
||||
{
|
||||
/**
|
||||
* Filter the test case methods.
|
||||
*/
|
||||
public function accept(TestCaseMethodFactory $factory): bool
|
||||
{
|
||||
return $factory->flakyTries !== null;
|
||||
|
||||
@@ -9,17 +9,11 @@ use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class IssueTestCaseFilter implements TestCaseMethodFilter
|
||||
{
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*/
|
||||
public function __construct(private int $number)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the test case methods.
|
||||
*/
|
||||
public function accept(TestCaseMethodFactory $factory): bool
|
||||
{
|
||||
return in_array($this->number, $factory->issues, true);
|
||||
|
||||
@@ -9,9 +9,6 @@ use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class NotesTestCaseFilter implements TestCaseMethodFilter
|
||||
{
|
||||
/**
|
||||
* Filter the test case methods.
|
||||
*/
|
||||
public function accept(TestCaseMethodFactory $factory): bool
|
||||
{
|
||||
return $factory->notes !== [];
|
||||
|
||||
@@ -9,17 +9,11 @@ use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class PrTestCaseFilter implements TestCaseMethodFilter
|
||||
{
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*/
|
||||
public function __construct(private int $number)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the test case methods.
|
||||
*/
|
||||
public function accept(TestCaseMethodFactory $factory): bool
|
||||
{
|
||||
return in_array($this->number, $factory->prs, true);
|
||||
|
||||
@@ -9,9 +9,6 @@ use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class TodoTestCaseFilter implements TestCaseMethodFilter
|
||||
{
|
||||
/**
|
||||
* Filter the test case methods.
|
||||
*/
|
||||
public function accept(TestCaseMethodFactory $factory): bool
|
||||
{
|
||||
return $factory->todo;
|
||||
|
||||
Reference in New Issue
Block a user