protected function filterByType(string $type)
    {
        if (!$this->files) {
            return new Sequence();
        }

        return new Sequence(
            array_filter(
                $this->files,
                function (StatusFile $statusFile) use ($type) {
                    return $type === $statusFile->getIndexStatus();
                }
            )
        );
    }
protected function filterByType(string $type)
    {
        if (!$this->files) {
            return new Sequence();
        }

        return new Sequence(
            array_filter(
                $this->files,
                function (StatusFile $statusFile) use ($type) {
                    return $type === $statusFile->getIndexStatus();
                }
            )
        );
    }
protected function filterByType ( string $ type ) { if ( ! $ this -> files ) { return new Sequence ( ) ; } return new Sequence ( array_filter ( $ this -> files , function ( StatusFile $ statusFile ) use ( $ type ) { return $ type === $ statusFile -> getIndexStatus ( ) ; } ) ) ; }
filter files by index status

@param string $type

@return Sequence
filter files by index status