src/File.php
protected function getLines()
    {
        $ret = file($this->fileName);
        if ($ret === false) {
            throw new Exception('Unable to read file');
        }
        $lines = array();
        foreach ($ret as $line) {
            $lines[] = rtrim($line);
        }

        return $lines;
    }
protected function getLines()
    {
        $ret = file($this->fileName);
        if ($ret === false) {
            throw new Exception('Unable to read file');
        }
        $lines = array();
        foreach ($ret as $line) {
            $lines[] = rtrim($line);
        }

        return $lines;
    }
protected function getLines ( ) { $ ret = file ( $ this -> fileName ) ; if ( $ ret === false ) { throw new Exception ( 'Unable to read file' ) ; } $ lines = array ( ) ; foreach ( $ ret as $ line ) { $ lines [ ] = rtrim ( $ line ) ; } return $ lines ; }
get an array of all lines in this file

@return string[]
@throws InvalidArgumentException if file can not be read
get an array of all lines in this file