src/Package.php
public function preparePath(string $file): string
    {
        if (0 === strncmp($file, '$', 1)) {
            return $file;
        }

        $skippable = 0 === strncmp($file, '?', 1) ? '?' : '';
        if ($skippable) {
            $file = substr($file, 1);
        }

        if (!$this->getFilesystem()->isAbsolutePath($file)) {
            $prefix = $this->isRoot()
                ? $this->getBaseDir()
                : $this->getVendorDir() . '/' . $this->getPrettyName();
            $file = $prefix . '/' . $file;
        }

        return $skippable . $this->getFilesystem()->normalizePath($file);
    }
public function preparePath(string $file): string
    {
        if (0 === strncmp($file, '$', 1)) {
            return $file;
        }

        $skippable = 0 === strncmp($file, '?', 1) ? '?' : '';
        if ($skippable) {
            $file = substr($file, 1);
        }

        if (!$this->getFilesystem()->isAbsolutePath($file)) {
            $prefix = $this->isRoot()
                ? $this->getBaseDir()
                : $this->getVendorDir() . '/' . $this->getPrettyName();
            $file = $prefix . '/' . $file;
        }

        return $skippable . $this->getFilesystem()->normalizePath($file);
    }
public function preparePath ( string $ file ) : string { if ( 0 === strncmp ( $ file , '$' , 1 ) ) { return $ file ; } $ skippable = 0 === strncmp ( $ file , '?' , 1 ) ? '?' : '' ; if ( $ skippable ) { $ file = substr ( $ file , 1 ) ; } if ( ! $ this -> getFilesystem ( ) -> isAbsolutePath ( $ file ) ) { $ prefix = $ this -> isRoot ( ) ? $ this -> getBaseDir ( ) : $ this -> getVendorDir ( ) . '/' . $ this -> getPrettyName ( ) ; $ file = $ prefix . '/' . $ file ; } return $ skippable . $ this -> getFilesystem ( ) -> normalizePath ( $ file ) ; }
Builds path inside of a package.
@param string $file
@return string absolute paths will stay untouched
Builds path inside of a package .