public function readLine(int $line = 1) : string
    {
        $lines = file($this->_path);

        if($line > count($lines)) {
            throw new LineNumberAboveFileLines($this->_path, $line, count($lines));
        }

        if($line <= 0) {
            $line = 1;
        }

        return $lines[($line - 1)];
    }
public function readLine(int $line = 1) : string
    {
        $lines = file($this->_path);

        if($line > count($lines)) {
            throw new LineNumberAboveFileLines($this->_path, $line, count($lines));
        }

        if($line <= 0) {
            $line = 1;
        }

        return $lines[($line - 1)];
    }
public function readLine ( int $ line = 1 ) : string { $ lines = file ( $ this -> _path ) ; if ( $ line > count ( $ lines ) ) { throw new LineNumberAboveFileLines ( $ this -> _path , $ line , count ( $ lines ) ) ; } if ( $ line <= 0 ) { $ line = 1 ; } return $ lines [ ( $ line - 1 ) ] ; }
Returns a single line from file.

@param int $line Line number.

@return string Line as string.

@throws LineNumberAboveFileLines If the line number is bigger than the total number of lines
Returns a single line from file .