TestReportProcessor::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the doyo/code-coverage project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Spec\Doyo\Bridge\CodeCoverage\Report;
15
16
use SebastianBergmann\CodeCoverage\CodeCoverage;
0 ignored issues
show
Bug introduced by
The type SebastianBergmann\CodeCoverage\CodeCoverage was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
18
class TestReportProcessor
19
{
20
    private $foo;
21
22
    private $hello;
23
24
    public function __construct($foo = 'Foo Bar', $hello = 'Hello World')
25
    {
26
        $this->foo   = $foo;
27
        $this->hello = $hello;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getFoo(): string
34
    {
35
        return $this->foo;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getHello(): string
42
    {
43
        return $this->hello;
44
    }
45
46
    public function process(CodeCoverage $coverage, $target)
0 ignored issues
show
Unused Code introduced by
The parameter $coverage 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

46
    public function process(/** @scrutinizer ignore-unused */ CodeCoverage $coverage, $target)

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...
Unused Code introduced by
The parameter $target 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

46
    public function process(CodeCoverage $coverage, /** @scrutinizer ignore-unused */ $target)

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...
47
    {
48
    }
49
}
50