From f0c315e4fcbb27655b3866cfae3e19137ca0b370 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Wed, 12 Jun 2024 07:17:36 +0200 Subject: [PATCH] composer fix-style --- src/Console/ModelsCommand.php | 6 +++--- tests/Console/ModelsCommand/Pivot/Models/ModelWithPivot.php | 2 ++ .../ModelsCommand/Pivot/Models/Pivots/CustomPivot.php | 3 ++- tests/Console/ModelsCommand/Pivot/Test.php | 2 ++ .../ModelsCommand/Pivot/__snapshots__/Test__test__1.php | 5 ++++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index fd6c72b..fb2106b 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -628,7 +628,7 @@ class ModelsCommand extends Command get_class($model->newModelQuery()) ); $modelName = $this->getClassNameInDestinationFile( - new \ReflectionClass($model), + new ReflectionClass($model), get_class($model) ); $this->setMethod($name, $builder . '|' . $modelName, $args, $comment); @@ -712,10 +712,10 @@ class ModelsCommand extends Command ) { if ($relationObj instanceof BelongsToMany) { $pivot = get_class($relationObj->newPivot()); - if (!in_array($pivot,[ Pivot::class, MorphPivot::class])) { + if (!in_array($pivot, [Pivot::class, MorphPivot::class])) { $this->setProperty( $relationObj->getPivotAccessor(), - $this->getClassNameInDestinationFile($model,$pivot), + $this->getClassNameInDestinationFile($model, $pivot), true, false ); diff --git a/tests/Console/ModelsCommand/Pivot/Models/ModelWithPivot.php b/tests/Console/ModelsCommand/Pivot/Models/ModelWithPivot.php index f579cf9..3f9e0bd 100644 --- a/tests/Console/ModelsCommand/Pivot/Models/ModelWithPivot.php +++ b/tests/Console/ModelsCommand/Pivot/Models/ModelWithPivot.php @@ -1,5 +1,7 @@