PhpSpec\Locator\PSR0\PSR0Locator::findResources PHP Method

findResources() public method

public findResources ( string $query ) : Resource[]
$query string
return Resource[]
    public function findResources($query)
    {
        $path = $this->getQueryPath($query);
        if ('.php' !== substr($path, -4)) {
            $path .= DIRECTORY_SEPARATOR;
        }
        if ($path && 0 === strpos($path, $this->fullSpecPath)) {
            return $this->findSpecResources($path);
        }
        if ($path && 0 === strpos($path, $this->fullSrcPath)) {
            $path = $this->fullSpecPath . substr($path, strlen($this->fullSrcPath));
            $path = preg_replace('/\\.php/', 'Spec.php', $path);
            return $this->findSpecResources($path);
        }
        if ($path && 0 === strpos($path, $this->srcPath)) {
            $path = $this->fullSpecPath . substr($path, strlen($this->srcPath));
            $path = preg_replace('/\\.php/', 'Spec.php', $path);
            return $this->findSpecResources($path);
        }
        return array();
    }