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 (#58)
by joseph
17:08
created

FullNameEmbeddableTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A itCanGetAndSetAllTheThings() 0 23 2
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Identity;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Objects\Identity\FullNameEmbeddableInterface;
6
use PHPUnit\Framework\TestCase;
7
8
class FullNameEmbeddableTest extends TestCase
9
{
10
    /**
11
     * @test
12
     * @small
13
     * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Identity\FullNameEmbeddable::<public>
14
     */
15
    public function itCanGetAndSetAllTheThings()
16
    {
17
        $expected   = [
18
            FullNameEmbeddableInterface::EMBEDDED_PROP_TITLE       => 'Sir',
19
            FullNameEmbeddableInterface::EMBEDDED_PROP_FIRSTNAME   => 'Roger',
20
            FullNameEmbeddableInterface::EMBEDDED_PROP_MIDDLENAMES => [
21
                'Michael',
22
                'Stephen',
23
                "O'Neil",
24
            ],
25
            FullNameEmbeddableInterface::EMBEDDED_PROP_LASTNAME    => 'Marmaduke',
26
            FullNameEmbeddableInterface::EMBEDDED_PROP_SUFFIX      => 'The Third',
27
        ];
28
        $embeddable = new FullNameEmbeddable();
29
        $actual     = [];
30
        foreach ($expected as $property => $value) {
31
            $setter = "set$property";
32
            $getter = "get$property";
33
            $embeddable->$setter($value);
34
            $actual[$property] = $embeddable->$getter();
35
        }
36
        $this->assertSame($expected, $actual);
37
        $this->assertSame('Sir Roger Michael Stephen O\'Neil Marmaduke The Third', $embeddable->getFormatted());
38
    }
39
}
40