diff --git a/src/Solutions/SuggestLivewireMethodNameSolution.php b/src/Solutions/SuggestLivewireMethodNameSolution.php index 53409571..3c39b9bd 100644 --- a/src/Solutions/SuggestLivewireMethodNameSolution.php +++ b/src/Solutions/SuggestLivewireMethodNameSolution.php @@ -24,7 +24,7 @@ public function __construct($methodName = null, $componentClass = null, $suggest public function getSolutionTitle(): string { - return "Possible typo `{$this->componentClass}::{$this->methodName}`"; + return "Possible typo `{$this->componentClass}::{$this->methodName}()`"; } public function getDocumentationLinks(): array @@ -34,7 +34,7 @@ public function getDocumentationLinks(): array public function getSolutionDescription(): string { - return "Did you mean `{$this->componentClass}::{$this->suggested}`?"; + return "Did you mean `{$this->suggested}()`?"; } public function isRunnable(): bool diff --git a/src/Solutions/SuggestLivewirePropertyNameSolution.php b/src/Solutions/SuggestLivewirePropertyNameSolution.php index 339719f7..198152ed 100644 --- a/src/Solutions/SuggestLivewirePropertyNameSolution.php +++ b/src/Solutions/SuggestLivewirePropertyNameSolution.php @@ -24,7 +24,7 @@ public function __construct($variableName = null, $componentClass = null, $sugge public function getSolutionTitle(): string { - return "Possible typo {$this->variableName}"; + return "Possible typo {$this->componentClass}::{$this->variableName}"; } public function getDocumentationLinks(): array diff --git a/tests/Solutions/UndefinedLivewireMethodSolutionProviderTest.php b/tests/Solutions/UndefinedLivewireMethodSolutionProviderTest.php index b746a4a1..5a5024b7 100644 --- a/tests/Solutions/UndefinedLivewireMethodSolutionProviderTest.php +++ b/tests/Solutions/UndefinedLivewireMethodSolutionProviderTest.php @@ -22,7 +22,7 @@ public function it_can_solve_an_unknown_livewire_method() $this->assertTrue($canSolve); - $this->assertSame('Possible typo `Facade\Ignition\Tests\stubs\Components\TestLivewireComponent::chnge`', $solution->getSolutionTitle()); - $this->assertSame('Did you mean `Facade\Ignition\Tests\stubs\Components\TestLivewireComponent::change`?', $solution->getSolutionDescription()); + $this->assertSame('Possible typo `Facade\Ignition\Tests\stubs\Components\TestLivewireComponent::chnge()`', $solution->getSolutionTitle()); + $this->assertSame('Did you mean `change()`?', $solution->getSolutionDescription()); } } diff --git a/tests/Solutions/UndefinedLivewirePropertySolutionProviderTest.php b/tests/Solutions/UndefinedLivewirePropertySolutionProviderTest.php index 9039e0d8..1640aad8 100644 --- a/tests/Solutions/UndefinedLivewirePropertySolutionProviderTest.php +++ b/tests/Solutions/UndefinedLivewirePropertySolutionProviderTest.php @@ -22,10 +22,10 @@ public function it_can_solve_an_unknown_livewire_property() $this->assertTrue($canSolve); - $this->assertSame('Possible typo $strng', $firstSolution->getSolutionTitle()); + $this->assertSame('Possible typo Facade\Ignition\Tests\stubs\Components\TestLivewireComponent::$strng', $firstSolution->getSolutionTitle()); $this->assertSame('Did you mean `$string`?', $firstSolution->getSolutionDescription()); - $this->assertSame('Possible typo $strng', $secondSolution->getSolutionTitle()); + $this->assertSame('Possible typo Facade\Ignition\Tests\stubs\Components\TestLivewireComponent::$strng', $secondSolution->getSolutionTitle()); $this->assertSame('Did you mean `$stringable`?', $secondSolution->getSolutionDescription()); } @@ -41,7 +41,7 @@ public function it_can_solve_an_unknown_livewire_computed_property() $this->assertTrue($canSolve); - $this->assertSame('Possible typo $compted', $solution->getSolutionTitle()); + $this->assertSame('Possible typo Facade\Ignition\Tests\stubs\Components\TestLivewireComponent::$compted', $solution->getSolutionTitle()); $this->assertSame('Did you mean `$computed`?', $solution->getSolutionDescription()); } }