public function getFileList($config)
    {
        if (strpos($config, ',')) {
            return array_filter(explode(',', $config));
        }

        if (!$this->isAbsolutePath($config)) {
            $config = getcwd().'/'.$config;
        }

        if (!file_exists($config)) {
            throw new InvalidArgumentException(sprintf('Configuration file "%s" does not exist.', $config));
        }

        $result = require $config;

        if ($result instanceof Config) {
            return $result->getFilenames();
        }

        if (is_array($result)) {
            return $result;
        }

        throw new InvalidArgumentException('Config must return an array of filenames or a Config object.');
    }