src/Collection.php
public function updatePath($oldPath, $newPath)
    {
        if ($this->contains($oldPath)) {
            $this->items[$newPath] = $this->items[$oldPath];
            unset($this->items[$oldPath]);
        }
    }
public function updatePath($oldPath, $newPath)
    {
        if ($this->contains($oldPath)) {
            $this->items[$newPath] = $this->items[$oldPath];
            unset($this->items[$oldPath]);
        }
    }
public function updatePath ( $ oldPath , $ newPath ) { if ( $ this -> contains ( $ oldPath ) ) { $ this -> items [ $ newPath ] = $ this -> items [ $ oldPath ] ; unset ( $ this -> items [ $ oldPath ] ) ; } }
This is called when the path of an item is changed, It updates
the paths array by replacing the old path with the new one.

@param  string $oldPath
@param  string $newPath
@return void
This is called when the path of an item is changed It updates the paths array by replacing the old path with the new one .