Skip to content

Commit c2818dc

Browse files
committed
Move protected function to the bottom
1 parent 9ca3f15 commit c2818dc

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/Jenssegers/Mongodb/Relations/EmbedsMany.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -437,24 +437,6 @@ public function dissociate($ids = array())
437437
return count($ids);
438438
}
439439

440-
/**
441-
* Transform single ID, single Model or array of Models into an array of IDs
442-
*
443-
* @param mixed $ids
444-
* @return array
445-
*/
446-
protected function getIdsArrayFrom($ids)
447-
{
448-
if (! is_array($ids)) $ids = array($ids);
449-
450-
foreach ($ids as &$id)
451-
{
452-
if ($id instanceof Model) $id = $id->getKey();
453-
}
454-
455-
return $ids;
456-
}
457-
458440
/**
459441
* Delete alias.
460442
*
@@ -477,6 +459,24 @@ public function attach(Model $model)
477459
return $this->save($model);
478460
}
479461

462+
/**
463+
* Transform single ID, single Model or array of Models into an array of IDs
464+
*
465+
* @param mixed $ids
466+
* @return array
467+
*/
468+
protected function getIdsArrayFrom($ids)
469+
{
470+
if (! is_array($ids)) $ids = array($ids);
471+
472+
foreach ($ids as &$id)
473+
{
474+
if ($id instanceof Model) $id = $id->getKey();
475+
}
476+
477+
return $ids;
478+
}
479+
480480
/**
481481
* Convert an array of embedded documents to a Collection.
482482
*

0 commit comments

Comments
 (0)