src/TerminalObject/Helper/Art.php
protected function artFile($art)
    {
        $files = $this->fileSearch($art, '[^' . \DIRECTORY_SEPARATOR . ']*$');

        if (count($files) === 0) {
            $this->addDir(__DIR__ . '/../../ASCII');
            $files = $this->fileSearch($this->default_art, '.*');
        }

        if (count($files) === 0) {
            throw new UnexpectedValueException("Unable to find an art file with the name '{$art}'");
        }

        return reset($files);
    }
protected function artFile($art)
    {
        $files = $this->fileSearch($art, '[^' . \DIRECTORY_SEPARATOR . ']*$');

        if (count($files) === 0) {
            $this->addDir(__DIR__ . '/../../ASCII');
            $files = $this->fileSearch($this->default_art, '.*');
        }

        if (count($files) === 0) {
            throw new UnexpectedValueException("Unable to find an art file with the name '{$art}'");
        }

        return reset($files);
    }
protected function artFile ( $ art ) { $ files = $ this -> fileSearch ( $ art , '[^' . \ DIRECTORY_SEPARATOR . ']*$' ) ; if ( count ( $ files ) === 0 ) { $ this -> addDir ( __DIR__ . '/../../ASCII' ) ; $ files = $ this -> fileSearch ( $ this -> default_art , '.*' ) ; } if ( count ( $ files ) === 0 ) { throw new UnexpectedValueException ( "Unable to find an art file with the name '{$art}'" ) ; } return reset ( $ files ) ; }
Find a valid art path

@param string $art

@return string
Find a valid art path