Passed
Pull Request — master (#12)
by Tom
02:44
created

IgnoredGetter::__call()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLTests\Doctrine\Blog\Model\Special;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use GraphQL\Doctrine\Annotation as API;
9
use GraphQLTests\Doctrine\Blog\Model\AbstractModel;
10
11
/**
12
 * @ORM\Entity
13
 */
14
final class IgnoredGetter extends AbstractModel
15
{
16
    private $privateProperty = 'privateProperty';
0 ignored issues
show
introduced by
The private property $privateProperty is not used, and could be removed.
Loading history...
17
18
    protected $protectedProperty = 'protectedProperty';
19
20
    public $publicProperty = 'publicProperty';
21
22
    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...
23
    {
24
        return __FUNCTION__;
25
    }
26
27
    protected function getProtected(): string
28
    {
29
        return __FUNCTION__;
30
    }
31
32
    public function getPublic(): string
33
    {
34
        return __FUNCTION__;
35
    }
36
37
    /**
38
     * @API\Field(type="string[]")
39
     *
40
     * @param string $arg1
41
     * @param int $arg2
42
     * @param string[] $arg3
43
     *
44
     * @return array
45
     */
46
    public function getPublicWithArgs(string $arg1, int $arg2, array $arg3 = ['foo']): array
47
    {
48
        return [$arg1, $arg2, $arg3];
49
    }
50
51
    public function __call($name, $arguments): string
52
    {
53
        return __FUNCTION__;
54
    }
55
56
    public static function getStaticPublic(): string
57
    {
58
        return __FUNCTION__;
59
    }
60
61
    public function isValid(): bool
62
    {
63
        return true;
64
    }
65
66
    public function isIsser(): bool
67
    {
68
        return true;
69
    }
70
71
    public function hasMoney(): bool
72
    {
73
        return true;
74
    }
75
}
76