Issues (52)

src/AnalyzeComments/File/FileTotalLinesCounter.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SavinMikhail\CommentsDensity\AnalyzeComments\File;
6
7
use SplFileInfo;
8
9
use function count;
10
11
final readonly class FileTotalLinesCounter
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 11 at column 6
Loading history...
12
{
13
    public function __construct(
14
        private SplFileInfo $file,
15
    ) {}
16
17
    public function __invoke(): int
18
    {
19
        return count(file($this->file->getRealPath()));
20
    }
21
}
22