From d7817ec017cad87d617fab8f6bdd3db17215f560 Mon Sep 17 00:00:00 2001 From: laravel-ide-helper Date: Fri, 18 Oct 2024 14:40:37 +0000 Subject: [PATCH] composer fix-style --- src/Console/ModelsCommand.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index cd81b80..2368048 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -714,13 +714,12 @@ class ModelsCommand extends Command if ($relationObj instanceof BelongsToMany) { $pivot = get_class($relationObj->newPivot()); if (!in_array($pivot, [Pivot::class, MorphPivot::class])) { - $pivot = $this->getClassNameInDestinationFile($model, $pivot); - if($existingPivot = ($this->properties[$relationObj->getPivotAccessor()] ?? null)){ + if ($existingPivot = ($this->properties[$relationObj->getPivotAccessor()] ?? null)) { // If the pivot is already set, we need to append the type to it - $pivot .= '|'. $existingPivot['type']; - } else{ + $pivot .= '|' . $existingPivot['type']; + } else { // pivots are not always set $pivot .= '|null'; }