Passed
Pull Request — master (#63)
by Mark
23:06
created

IgnoredGetter::getProtected()   A

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 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLTests\Doctrine\AttributeBlog\Model\Special;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use GraphQL\Doctrine\Annotation as API;
9
use GraphQLTests\Doctrine\AttributeBlog\Model\AbstractModel;
10
11
#[ORM\Entity]
12
final class IgnoredGetter extends AbstractModel
13
{
14
    private string $privateProperty = 'privateProperty';
0 ignored issues
show
introduced by
The private property $privateProperty is not used, and could be removed.
Loading history...
15
16
    protected $protectedProperty = 'protectedProperty';
17
18
    public $publicProperty = 'publicProperty';
19
20
    private function getPrivate(): string
0 ignored issues
show
Unused Code introduced by
The method getPrivate() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
21
    {
22
        return __FUNCTION__;
23
    }
24
25
    protected function getProtected(): string
26
    {
27
        return __FUNCTION__;
28
    }
29
30
    public function getPublic(): string
31
    {
32
        return __FUNCTION__;
33
    }
34
35
    /**
36
     * @param string[] $arg3
37
     */
38
    #[API\Field(type: 'string[]')]
39
    public function getPublicWithArgs(string $arg1, int $arg2, array $arg3 = ['foo']): array
40
    {
41
        return [$arg1, $arg2, $arg3];
42
    }
43
44
    public function __call($name, $arguments): string
45
    {
46
        return __FUNCTION__;
47
    }
48
49
    public static function getStaticPublic(): string
50
    {
51
        return __FUNCTION__;
52
    }
53
54
    public function isValid(): bool
55
    {
56
        return true;
57
    }
58
59
    public function hasMoney(): bool
60
    {
61
        return true;
62
    }
63
}
64