From f051ea63bcd4242f83d79be737d1557b2c86b4f3 Mon Sep 17 00:00:00 2001 From: Carlos A Sastre Date: Sun, 3 Mar 2024 18:44:53 +0100 Subject: [PATCH] Fix builder declaration tips return type --- src/Test/Builder/AssertionStep.php | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Test/Builder/AssertionStep.php b/src/Test/Builder/AssertionStep.php index b6a2da99..1d04cbf0 100644 --- a/src/Test/Builder/AssertionStep.php +++ b/src/Test/Builder/AssertionStep.php @@ -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 @@ -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 @@ -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); } }