TestObject::getSibling()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Fixtures;
5
6
class TestObject
7
{
8
    /**
9
     * @var string
10
     */
11
    private $test;
12
    /**
13
     * @var bool
14
     */
15
    private $testBool;
16
17
    public function __construct(string $test, bool $testBool = false)
18
    {
19
        $this->test = $test;
20
        $this->testBool = $testBool;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getTest(): string
27
    {
28
        return $this->test;
29
    }
30
31
    /**
32
     * @return bool
33
     */
34
    public function isTestBool(): bool
35
    {
36
        return $this->testBool;
37
    }
38
39
    /**
40
     * @return ?string
41
     */
42
    public function testRight()
43
    {
44
        return "foo";
45
    }
46
47
    public function getSibling(self $foo): self
0 ignored issues
show
Unused Code introduced by
The parameter $foo 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

47
    public function getSibling(/** @scrutinizer ignore-unused */ self $foo): self

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...
48
    {
49
        return new self('foo');
50
    }
51
}
52