protected function checkFileReadable($file)
    {
        if (!file_exists($file)) {
            throw new \RuntimeException("File [$file] does not exist");
        }
        if (!is_file($file)) {
            throw new \RuntimeException("File [$file] is not a file");
        }
        if (!is_readable($file)) {
            throw new \RuntimeException("File [$file] is not readable");
        }
    }
protected function checkFileReadable($file)
    {
        if (!file_exists($file)) {
            throw new \RuntimeException("File [$file] does not exist");
        }
        if (!is_file($file)) {
            throw new \RuntimeException("File [$file] is not a file");
        }
        if (!is_readable($file)) {
            throw new \RuntimeException("File [$file] is not readable");
        }
    }
protected function checkFileReadable ( $ file ) { if ( ! file_exists ( $ file ) ) { throw new \ RuntimeException ( "File [$file] does not exist" ) ; } if ( ! is_file ( $ file ) ) { throw new \ RuntimeException ( "File [$file] is not a file" ) ; } if ( ! is_readable ( $ file ) ) { throw new \ RuntimeException ( "File [$file] is not readable" ) ; } }
Check that a given file is readable

Check that the file exists and that we can read from it.
Otherwise throw an exception with a reason.

@throws RuntimeException
@return void
Check that a given file is readable