mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-21 11:33:11 +00:00
composer fix-style
This commit is contained in:
committed by
github-actions[bot]
parent
0831b7e8e5
commit
d7817ec017
@@ -714,13 +714,12 @@ class ModelsCommand extends Command
|
|||||||
if ($relationObj instanceof BelongsToMany) {
|
if ($relationObj instanceof BelongsToMany) {
|
||||||
$pivot = get_class($relationObj->newPivot());
|
$pivot = get_class($relationObj->newPivot());
|
||||||
if (!in_array($pivot, [Pivot::class, MorphPivot::class])) {
|
if (!in_array($pivot, [Pivot::class, MorphPivot::class])) {
|
||||||
|
|
||||||
$pivot = $this->getClassNameInDestinationFile($model, $pivot);
|
$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
|
// If the pivot is already set, we need to append the type to it
|
||||||
$pivot .= '|'. $existingPivot['type'];
|
$pivot .= '|' . $existingPivot['type'];
|
||||||
} else{
|
} else {
|
||||||
// pivots are not always set
|
// pivots are not always set
|
||||||
$pivot .= '|null';
|
$pivot .= '|null';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user