Skip to content

Commit

Permalink
Fix builder declaration tips return type
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosas committed Mar 3, 2024
1 parent 209ae1d commit f051ea6
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/Test/Builder/AssertionStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,54 @@

class AssertionStep extends AbstractStep
{
public function shouldBeNamed(string $classname, bool $regex = false): Rule
public function shouldBeNamed(string $classname, bool $regex = false): TipOrBuildStep
{
$this->rule->assertion = ShouldBeNamed::class;
$this->rule->params = ['isRegex' => $regex, 'classname' => $classname];

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldBeAbstract(): Rule
public function shouldBeAbstract(): TipOrBuildStep
{
$this->rule->assertion = ShouldBeAbstract::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldNotBeAbstract(): Rule
public function shouldNotBeAbstract(): TipOrBuildStep
{
$this->rule->assertion = ShouldNotBeAbstract::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldBeReadonly(): Rule
public function shouldBeReadonly(): TipOrBuildStep
{
$this->rule->assertion = ShouldBeReadonly::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldNotBeReadonly(): Rule
public function shouldNotBeReadonly(): TipOrBuildStep
{
$this->rule->assertion = ShouldNotBeReadonly::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldBeFinal(): Rule
public function shouldBeFinal(): TipOrBuildStep
{
$this->rule->assertion = ShouldBeFinal::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldNotBeFinal(): Rule
public function shouldNotBeFinal(): TipOrBuildStep
{
$this->rule->assertion = ShouldNotBeFinal::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldNotDependOn(): TargetStep
Expand Down Expand Up @@ -137,11 +137,11 @@ public function shouldExtend(): TargetStep
return new TargetStep($this->rule);
}

public function shouldHaveOnlyOnePublicMethod(): Rule
public function shouldHaveOnlyOnePublicMethod(): TipOrBuildStep
{
$this->rule->assertion = ShouldHaveOnlyOnePublicMethod::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}

public function shouldApplyAttribute(): TargetStep
Expand All @@ -151,10 +151,10 @@ public function shouldApplyAttribute(): TargetStep
return new TargetStep($this->rule);
}

public function shouldBeInterface(): Rule
public function shouldBeInterface(): TipOrBuildStep
{
$this->rule->assertion = ShouldBeInterface::class;

return new BuildStep($this->rule);
return new TipOrBuildStep($this->rule);
}
}

0 comments on commit f051ea6

Please sign in to comment.