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.
Completed
Pull Request — master (#75)
by joseph
14:44
created

  A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 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(): void
19
    {
20
        $testClass = new class ()
21
        {
22
            use UsesPHPMetaDataTrait;
0 ignored issues
show
Bug introduced by
The trait EdmondsCommerce\Doctrine...ts\UsesPHPMetaDataTrait requires the property $fieldMappings which is not provided by anonymous//tests/unit/En...DataTraitUnitTest.php$0.
Loading history...
23
24
            public function __construct()
25
            {
26
                $this->runInitMethods();
27
            }
28
29
            protected static function setCustomRepositoryClass(ClassMetadataBuilder $builder): void
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

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

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