src/Collection.php
public function files()
    {
        $filesList = array_filter($this->items, function($item) {
            return ($item['instance'] instanceof FileInterface);
        });

        $filesList = array_map(function($item) {
            return $item['instance'];
        }, $filesList);

        return new Collection($filesList);
    }
public function files()
    {
        $filesList = array_filter($this->items, function($item) {
            return ($item['instance'] instanceof FileInterface);
        });

        $filesList = array_map(function($item) {
            return $item['instance'];
        }, $filesList);

        return new Collection($filesList);
    }
public function files ( ) { $ filesList = array_filter ( $ this -> items , function ( $ item ) { return ( $ item [ 'instance' ] instanceof FileInterface ) ; } ) ; $ filesList = array_map ( function ( $ item ) { return $ item [ 'instance' ] ; } , $ filesList ) ; return new Collection ( $ filesList ) ; }
Returns a new collection containing only files.

@return self
Returns a new collection containing only files .