Passed
Push — main ( 0f6316...2e020c )
by mikhail
03:25
created

FileTotalLinesCounter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer;
6
7
use SplFileInfo;
8
9
use function count;
10
11
final readonly class FileTotalLinesCounter
0 ignored issues
show
Bug introduced by
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