PHPMD\TextUI\CommandLineOptions::readInputFile PHP Method

readInputFile() protected method

This method takes the given input file, reads the newline separated paths from that file and creates a comma separated string of the file paths. If the given $inputFile not exists, this method will throw an exception.
Since: 1.1.0
protected readInputFile ( string $inputFile ) : string
$inputFile string Specified input file name.
return string
    protected function readInputFile($inputFile)
    {
        if (file_exists($inputFile)) {
            return join(',', array_map('trim', file($inputFile)));
        }
        throw new \InvalidArgumentException("Input file '{$inputFile}' not exists.");
    }