From dd13633571be8eb7ac769b6f55c0a1e978c2c2ab Mon Sep 17 00:00:00 2001 From: Carlos A Sastre Date: Thu, 5 Oct 2023 16:08:43 +0200 Subject: [PATCH 1/3] Fix return type after target excludes --- src/Test/Builder/TargetExcludeOrBuildStep.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Test/Builder/TargetExcludeOrBuildStep.php b/src/Test/Builder/TargetExcludeOrBuildStep.php index a0904f1a..c5786b69 100644 --- a/src/Test/Builder/TargetExcludeOrBuildStep.php +++ b/src/Test/Builder/TargetExcludeOrBuildStep.php @@ -6,7 +6,7 @@ class TargetExcludeOrBuildStep extends TipOrBuildStep { - public function excluding(SelectorInterface ...$selectors): BuildStep + public function excluding(SelectorInterface ...$selectors): TipOrBuildStep { $this->rule->targetExcludes = array_values($selectors); From 2416435f4b0295fa31a81060df59bba832080852 Mon Sep 17 00:00:00 2001 From: Carlos A Sastre Date: Thu, 5 Oct 2023 16:13:59 +0200 Subject: [PATCH 2/3] Reorganize assertion docs --- docs/documentation/assertions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/documentation/assertions.md b/docs/documentation/assertions.md index 92707aac..7d5833c4 100644 --- a/docs/documentation/assertions.md +++ b/docs/documentation/assertions.md @@ -15,6 +15,9 @@ Also available: `shouldNotBeAbstract()` ## shouldBeReadonly() It asserts that the selected classes are declared as **readonly**. +## shouldHaveOnlyOnePublicMethod() +It asserts that the selected classes only have **one public method** (besides constructor). + ## shouldExtend() It asserts that the selected classes **extend** the target class. @@ -32,9 +35,6 @@ It asserts that the selected classes **do not depend** on the target classes. It asserts that the selected classes **do not use the constructor** of the target classes. ## canOnlyDependOn() -It asserts that the selected classes **does not depend** on anything else than the target classes. +It asserts that the selected classes **do not depend** on anything else than the target classes. This would be equivalent to `shouldNotDependOn()` with the negation of the target classes. - -## shouldHaveOnlyOnePublicMethod() -It asserts that the selected classes **only have one public method**. From deec00684ccac1409b6fd84e15f2891c3e9d54d0 Mon Sep 17 00:00:00 2001 From: Carlos A Sastre Date: Thu, 5 Oct 2023 16:15:27 +0200 Subject: [PATCH 3/3] Update CHANGELOG --- docs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 74b915fb..9add4e77 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## 0.10.10 +* Add `shouldOnlyHaveOnePublicMethod()` assertion. +* Fix return type of target excludes builder step. + ## 0.10.9 * Add `hasAttribute()` selector. * Deprecate `namespace()` selector in favor of `inNamespace()`.