IgnoredGetter::getPublicWithArgs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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