public function getRelativeFilename($filename)
    {
        // strip path from filename
        $result = ltrim(substr($filename, strlen($this->parser->getPath())), DIRECTORY_SEPARATOR);
        if ($result === '') {
            throw new \InvalidArgumentException(
                'File is not present in the given project path: ' . $filename
            );
        }

        return $result;
    }
public function getRelativeFilename($filename)
    {
        // strip path from filename
        $result = ltrim(substr($filename, strlen($this->parser->getPath())), DIRECTORY_SEPARATOR);
        if ($result === '') {
            throw new \InvalidArgumentException(
                'File is not present in the given project path: ' . $filename
            );
        }

        return $result;
    }
public function getRelativeFilename ( $ filename ) { // strip path from filename $ result = ltrim ( substr ( $ filename , strlen ( $ this -> parser -> getPath ( ) ) ) , DIRECTORY_SEPARATOR ) ; if ( $ result === '' ) { throw new \ InvalidArgumentException ( 'File is not present in the given project path: ' . $ filename ) ; } return $ result ; }
Returns the filename, relative to the root of the project directory.

@param string $filename The filename to make relative.

@throws \InvalidArgumentException if file is not in the project root.

@return string
Returns the filename relative to the root of the project directory .