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

FileTotalLinesCounter::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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