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
Push — master ( 0b4676...ecfcbd )
by joseph
17s queued 14s
created

anonymous//tests/Assets/MockEntityFactory.php$0   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 3
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Assets;
4
5
use Doctrine\ORM\Mapping\ClassMetadata;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity as DSM;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Interfaces\EntityInterface;
8
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\ImplementNotifyChangeTrackingPolicy;
9
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\UsesPHPMetaDataTrait;
10
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\ValidatedEntityTrait;
11
use Ramsey\Uuid\Uuid;
12
use Ramsey\Uuid\UuidInterface;
13
14
/**
15
 * Class MockEntityFactory
16
 *
17
 * @package EdmondsCommerce\DoctrineStaticMeta\Tests\Assets
18
 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
19
 * @SuppressWarnings(PHPMD.StaticAccess)
20
 */
21
class MockEntityFactory
22
{
23
    public static function createMockEntity(): EntityInterface
24
    {
25
        return new class() implements EntityInterface
26
        {
27
            use ImplementNotifyChangeTrackingPolicy,
28
                UsesPHPMetaDataTrait,
29
                ValidatedEntityTrait,
30
                DSM\Traits\AlwaysValidTrait;
31
32
            public function __construct()
33
            {
34
                self::getDoctrineStaticMeta()->setMetaData(new ClassMetadata('anon'));
35
            }
36
37
            public function getId(): UuidInterface
38
            {
39
                return Uuid::uuid1();
40
            }
41
42
            public function jsonSerialize()
43
            {
44
                return '';
45
            }
46
        };
47
    }
48
}
49