src/Console/ChatCommand.php
private function loadFiles($files)
    {
        if (is_dir($files)) {
            $directory = realpath($files);
            $files     = [];
            $brains    = glob($directory.'/*.rive');

            foreach ($brains as $brain) {
                $files[] = $brain;
            }

            return $files;
        }

        return (array) $files;
    }
private function loadFiles($files)
    {
        if (is_dir($files)) {
            $directory = realpath($files);
            $files     = [];
            $brains    = glob($directory.'/*.rive');

            foreach ($brains as $brain) {
                $files[] = $brain;
            }

            return $files;
        }

        return (array) $files;
    }
private function loadFiles ( $ files ) { if ( is_dir ( $ files ) ) { $ directory = realpath ( $ files ) ; $ files = [ ] ; $ brains = glob ( $ directory . '/*.rive' ) ; foreach ( $ brains as $ brain ) { $ files [ ] = $ brain ; } return $ files ; } return ( array ) $ files ; }
Load and return an array of files.

@param  string  $files
@return array
Load and return an array of files .