src/Core/Manifest/PrioritySorter.php
protected function includeRest(array $list)
    {
        $otherItemsIndex = false;
        if ($this->restKey) {
            $otherItemsIndex = array_search($this->restKey, $this->priorities);
        }
        if ($otherItemsIndex !== false) {
            array_splice($this->priorities, $otherItemsIndex, 1, $list);
        } else {
            // Otherwise just jam them on the end
            $this->priorities = array_merge($this->priorities, $list);
        }
    }
protected function includeRest(array $list)
    {
        $otherItemsIndex = false;
        if ($this->restKey) {
            $otherItemsIndex = array_search($this->restKey, $this->priorities);
        }
        if ($otherItemsIndex !== false) {
            array_splice($this->priorities, $otherItemsIndex, 1, $list);
        } else {
            // Otherwise just jam them on the end
            $this->priorities = array_merge($this->priorities, $list);
        }
    }
protected function includeRest ( array $ list ) { $ otherItemsIndex = false ; if ( $ this -> restKey ) { $ otherItemsIndex = array_search ( $ this -> restKey , $ this -> priorities ) ; } if ( $ otherItemsIndex !== false ) { array_splice ( $ this -> priorities , $ otherItemsIndex , 1 , $ list ) ; } else { // Otherwise just jam them on the end $ this -> priorities = array_merge ( $ this -> priorities , $ list ) ; } }
If the "rest" key exists in the order array,
replace it by the unspecified items
If the rest key exists in the order array replace it by the unspecified items