Skip to content

Commit add4f1c

Browse files
committed
formatRecordsList replaced with deprecated formatSyncList method;
1 parent 874a7d3 commit add4f1c

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

src/Relations/MorphToMany.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function sync($ids, $detaching = true)
150150
$current = $this->parseIds($current);
151151
}
152152

153-
$records = $this->formatSyncList($ids);
153+
$records = $this->formatRecordsList($ids);
154154

155155
$current = Arr::wrap($current);
156156

@@ -375,28 +375,6 @@ public function getQualifiedRelatedPivotKeyName()
375375
return $this->relatedPivotKey;
376376
}
377377

378-
/**
379-
* Format the sync list so that it is keyed by ID. (Legacy Support)
380-
* The original function has been renamed to formatRecordsList since Laravel 5.3.
381-
*
382-
* @deprecated
383-
*
384-
* @return array
385-
*/
386-
protected function formatSyncList(array $records)
387-
{
388-
$results = [];
389-
foreach ($records as $id => $attributes) {
390-
if (! is_array($attributes)) {
391-
[$id, $attributes] = [$attributes, []];
392-
}
393-
394-
$results[$id] = $attributes;
395-
}
396-
397-
return $results;
398-
}
399-
400378
/**
401379
* Get the name of the "where in" method for eager loading.
402380
*

0 commit comments

Comments
 (0)