Skip to content

Commit 3702531

Browse files
committed
refactor!: deprecate meets method in favor of satisfies
1 parent cfde444 commit 3702531

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/HasSpecifications.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ trait HasSpecifications
99
/**
1010
* @param Specification<self> $specification
1111
*/
12-
public function meets(Specification $specification): bool
12+
public function satisfies(Specification $specification): bool
1313
{
1414
return $specification->isSatisfiedBy($this);
1515
}
16+
17+
/**
18+
* @deprecated use `satisfies()` instead
19+
*
20+
* @param Specification<self> $specification
21+
*/
22+
public function meets(Specification $specification): bool
23+
{
24+
return $this->satisfies($specification);
25+
}
1626
}

tests/Commands/MakeSpecificationCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@ public function test_it_should_be_possible_to_create_a_composite_specification_w
9696

9797
protected function assertSpecificationMatchesSnapshot(string $name): void
9898
{
99-
$this->assertMatchesFileSnapshot(app_path(\sprintf('Specifications/%s.php', $name)));
99+
$this->assertMatchesFileSnapshot(app_path("Specifications/{$name}.php"));
100100
}
101101
}

0 commit comments

Comments
 (0)