Passed
Push — master ( 152a70...0c8393 )
by Jose
03:00
created

SymfonyProgressBar   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 4
c 1
b 0
f 0
dl 0
loc 19
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A advance() 0 3 1
A finish() 0 3 1
A start() 0 3 1
A __construct() 0 2 1
1
<?php
2
3
namespace JMGQ\AStar\Benchmark;
4
5
use Symfony\Component\Console\Helper\ProgressBar;
6
7
class SymfonyProgressBar implements ProgressBarInterface
8
{
9 5
    public function __construct(private ProgressBar $progressBar)
0 ignored issues
show
Unused Code introduced by
The parameter $progressBar is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

9
    public function __construct(/** @scrutinizer ignore-unused */ private ProgressBar $progressBar)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
10
    {
11 5
    }
12
13 2
    public function start(int $numberOfSteps): void
14
    {
15 2
        $this->progressBar->start($numberOfSteps);
0 ignored issues
show
Bug Best Practice introduced by
The property progressBar does not exist on JMGQ\AStar\Benchmark\SymfonyProgressBar. Did you maybe forget to declare it?
Loading history...
16 2
    }
17
18 2
    public function advance(): void
19
    {
20 2
        $this->progressBar->advance();
0 ignored issues
show
Bug Best Practice introduced by
The property progressBar does not exist on JMGQ\AStar\Benchmark\SymfonyProgressBar. Did you maybe forget to declare it?
Loading history...
21 2
    }
22
23 2
    public function finish(): void
24
    {
25 2
        $this->progressBar->finish();
0 ignored issues
show
Bug Best Practice introduced by
The property progressBar does not exist on JMGQ\AStar\Benchmark\SymfonyProgressBar. Did you maybe forget to declare it?
Loading history...
26 2
    }
27
}
28