GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#54)
by joseph
17:02
created

UsesPHPMetaDataTraitUnitTest   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 10
dl 0
loc 59
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A hp$0 ➔ setThat() 0 2 1
A hp$0 ➔ getSomething() 0 2 1
testGetGettersAndSetters() 0 55 ?
A hp$0 ➔ setCustomRepositoryClass() 0 2 1
A hp$0 ➔ setThis() 0 2 1
A hp$0 ➔ getThat() 0 2 1
A hp$0 ➔ getThis() 0 2 1
A hp$0 ➔ setSomething() 0 2 1
A hp$0 ➔ getSomethingElse() 0 2 1
A hp$0 ➔ testGetGettersAndSetters() 0 55 1
A hp$0 ➔ setSomethingElse() 0 2 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Traits;
4
5
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Class UsesPHPMetaDataTraitUnitTest
10
 *
11
 * @package EdmondsCommerce\DoctrineStaticMeta\Entity\Traits
12
 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
13
 */
14
class UsesPHPMetaDataTraitUnitTest extends TestCase
15
{
16
17
18
    public function testGetGettersAndSetters()
19
    {
20
        $testClass = new class ()
21
        {
22
            use UsesPHPMetaDataTrait;
23
24
            protected static function setCustomRepositoryClass(ClassMetadataBuilder $builder)
0 ignored issues
show
Unused Code introduced by
The parameter $builder 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

24
            protected static function setCustomRepositoryClass(/** @scrutinizer ignore-unused */ ClassMetadataBuilder $builder)

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...
25
            {
26
                // TODO: Implement setCustomRepositoryClass() method.
27
            }
28
29
            public function getThis()
30
            {
31
            }
32
33
            public function getThat()
34
            {
35
            }
36
37
            public function setThis()
38
            {
39
            }
40
41
            public function setThat()
42
            {
43
            }
44
45
            private function getSomething()
46
            {
47
            }
48
49
            private function setSomething()
50
            {
51
            }
52
53
            protected function getSomethingElse()
54
            {
55
            }
56
57
            protected function setSomethingElse()
58
            {
59
            }
60
        };
61
        $expected  = [
62
            'getThis',
63
            'getThat',
64
        ];
65
        $actual    = $testClass->getGetters();
66
        $this->assertSame($expected, $actual);
67
        $expected = [
68
            'setThis',
69
            'setThat',
70
        ];
71
        $actual   = $testClass->getSetters();
72
        $this->assertSame($expected, $actual);
73
    }
74
}
75