public function isLast($path)
    {
        return $this->items && $path === array_keys($this->items)[\count($this->items) - 1];
    }
public function isLast($path)
    {
        return $this->items && $path === array_keys($this->items)[\count($this->items) - 1];
    }
public function isLast ( $ path ) { return $ this -> items && $ path === array_keys ( $ this -> items ) [ \ count ( $ this -> items ) - 1 ] ; }
Check to see if this item is the last in the collection.

@param  string $path

@return bool True if item is last.
Check to see if this item is the last in the collection .