Skip to content

Commit

Permalink
Merge pull request #301 from lptn/fix-parent-method-check
Browse files Browse the repository at this point in the history
Remove a wrong parent method check
  • Loading branch information
lptn authored Jan 26, 2023
2 parents b09df6b + 3dd6360 commit 19dddc3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Fakes/FakeModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
use function get_class;
use function in_array;
use function implode;
use function method_exists;
use function sprintf;

/** @psalm-suppress PropertyNotSetInConstructor */
class FakeModelsCommand extends ModelsCommand
Expand Down Expand Up @@ -46,15 +44,6 @@ public function getModels(): array
*/
public function getPropertiesFromTable($model): void
{
$is_parent_method_still_exist = method_exists(ModelsCommand::class, __METHOD__);
if (! $is_parent_method_still_exist) {
throw new \BadMethodCallException(sprintf(
'Method %s::%s() does not exist anymore. Please rename overridden method accordingly.',
ModelsCommand::class,
__METHOD__
));
}

$table_name = $model->getTable();

if (!isset($this->schema->tables[$table_name])) {
Expand Down

0 comments on commit 19dddc3

Please sign in to comment.