src/Charcoal/Model/Service/MetadataLoader.php
private function resolvePath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(
                'Path needs to be a string'
            );
        }

        $basePath = $this->basePath();
        $path = trim($path, '/\\');

        if ($basePath && strpos($path, $basePath) === false) {
            $path = $basePath.$path;
        }

        return $path;
    }
private function resolvePath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(
                'Path needs to be a string'
            );
        }

        $basePath = $this->basePath();
        $path = trim($path, '/\\');

        if ($basePath && strpos($path, $basePath) === false) {
            $path = $basePath.$path;
        }

        return $path;
    }
private function resolvePath ( $ path ) { if ( ! is_string ( $ path ) ) { throw new InvalidArgumentException ( 'Path needs to be a string' ) ; } $ basePath = $ this -> basePath ( ) ; $ path = trim ( $ path , '/\\' ) ; if ( $ basePath && strpos ( $ path , $ basePath ) === false ) { $ path = $ basePath . $ path ; } return $ path ; }
Parse a relative path using the base path if needed.

@param  string $path The path to resolve.
@throws InvalidArgumentException If the path is invalid.
@return string
Parse a relative path using the base path if needed .