Skip to content

Commit

Permalink
Merge pull request #239 from carlosas/because-fix
Browse files Browse the repository at this point in the history
Fix return type after target excludes
  • Loading branch information
carlosas authored Oct 5, 2023
2 parents fa55ddd + deec006 commit 80004c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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()`.
Expand Down
8 changes: 4 additions & 4 deletions docs/documentation/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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**.
2 changes: 1 addition & 1 deletion src/Test/Builder/TargetExcludeOrBuildStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 80004c0

Please sign in to comment.