Skip to content

Commit 62b502d

Browse files
committed
Merge branch 'avoid_duplicate_class_names' of github.com:pataar/laravel-ide-helper into avoid_duplicate_class_names
# Conflicts: # src/Console/ModelsCommand.php
2 parents 8b4348a + ce93b59 commit 62b502d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Console/ModelsCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,13 @@ public function getPropertiesFromMethods($model)
730730

731731
if ($existingPivot = ($this->properties[$relationObj->getPivotAccessor()] ?? null)) {
732732
$existingClasses = explode('|', $existingPivot['type']);
733+
<<<<<<< HEAD
733734
if(!in_array($pivot, $existingClasses)) {
734735
array_unshift($existingClasses, $pivot);
736+
=======
737+
if (!in_array($pivot, $existingClasses)) {
738+
$existingClasses = [$pivot, ...$existingClasses];
739+
>>>>>>> ce93b596b7b5bbbb9b5df0d4fa310a015c92c3b0
735740
}
736741
} else {
737742
// No existing pivot property, so we need to add a null type

0 commit comments

Comments
 (0)