src/fs/entity/FileEntity.php
public function getLineCount(): int
    {
        $ret = 0;
        $fh = fopen($this->path, "r");
        while (!feof($fh)) {
            $buffer = fread($fh, 8192);
            $ret += substr_count($buffer, PHP_EOL);
        }
        fclose($fh);
        return $ret;
    }
public function getLineCount(): int
    {
        $ret = 0;
        $fh = fopen($this->path, "r");
        while (!feof($fh)) {
            $buffer = fread($fh, 8192);
            $ret += substr_count($buffer, PHP_EOL);
        }
        fclose($fh);
        return $ret;
    }
public function getLineCount ( ) : int { $ ret = 0 ; $ fh = fopen ( $ this -> path , "r" ) ; while ( ! feof ( $ fh ) ) { $ buffer = fread ( $ fh , 8192 ) ; $ ret += substr_count ( $ buffer , PHP_EOL ) ; } fclose ( $ fh ) ; return $ ret ; }
Get the number of lines in the file

@return int
Get the number of lines in the file