diff --git a/src/SolutionProviders/MissingColumnSolutionProvider.php b/src/SolutionProviders/MissingColumnSolutionProvider.php index c11700cd..bdacfdc2 100644 --- a/src/SolutionProviders/MissingColumnSolutionProvider.php +++ b/src/SolutionProviders/MissingColumnSolutionProvider.php @@ -30,8 +30,6 @@ protected function isBadTableErrorCode($code): bool public function getSolutions(Throwable $throwable): array { - $solution = new RunMigrationsSolution('A column was not found'); - - return [$solution]; + return [new RunMigrationsSolution('A column was not found')]; } } diff --git a/src/SolutionProviders/TableNotFoundSolutionProvider.php b/src/SolutionProviders/TableNotFoundSolutionProvider.php index 9ce2f4ba..ed8e20de 100644 --- a/src/SolutionProviders/TableNotFoundSolutionProvider.php +++ b/src/SolutionProviders/TableNotFoundSolutionProvider.php @@ -30,6 +30,6 @@ protected function isBadTableErrorCode($code): bool public function getSolutions(Throwable $throwable): array { - return [new RunMigrationsSolution()]; + return [new RunMigrationsSolution('A table was not found')]; } } diff --git a/src/Solutions/RunMigrationsSolution.php b/src/Solutions/RunMigrationsSolution.php index 8cbde0c6..346ecc8f 100644 --- a/src/Solutions/RunMigrationsSolution.php +++ b/src/Solutions/RunMigrationsSolution.php @@ -9,18 +9,14 @@ class RunMigrationsSolution implements RunnableSolution { private $customTitle; - public function __construct($customTitle = null) + public function __construct($customTitle = '') { $this->customTitle = $customTitle; } public function getSolutionTitle(): string { - if (isset($this->customTitle)) { - return $this->customTitle; - } - - return 'A table was not found'; + return $this->customTitle; } public function getSolutionDescription(): string