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 ( d43d4c...d68f0e )
by Ross
24s queued 21s
created

NonOrderedUuidFieldTraitTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validateSavedEntity() 0 5 1
A generateCode() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Large\C\Entity\Fields\Traits\PrimaryKey;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Generator\Field\IdTrait;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Interfaces\PrimaryKey\IdFieldInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\NonOrderedUuidFieldTrait;
8
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\UuidFieldTrait;
9
use EdmondsCommerce\DoctrineStaticMeta\Tests\Assets\AbstractTest;
10
use Ramsey\Uuid\UuidInterface;
11
12
/**
13
 * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\UuidFieldTrait
14
 * @SuppressWarnings(PHPMD.DepthOfInheritance)
15
 */
16
class NonOrderedUuidFieldTraitTest extends IdFieldTraitTest
17
{
18
    public const    WORK_DIR        = AbstractTest::VAR_PATH .
19
                                      '/' .
20
                                      self::TEST_TYPE_LARGE .
21
                                      '/NonOrderedUuidFieldTraitTest/';
22
    protected const TEST_FIELD_FQN  = NonOrderedUuidFieldTrait::class;
23
    protected const TEST_FIELD_PROP = IdFieldInterface::PROP_ID;
24
    protected const VALIDATES       = false;
25
26
    public function generateCode()
27
    {
28
        $this->getEntityGenerator()
0 ignored issues
show
Deprecated Code introduced by
The function EdmondsCommerce\Doctrine...or::setPrimaryKeyType() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

28
        /** @scrutinizer ignore-deprecated */ $this->getEntityGenerator()
Loading history...
29
             ->setPrimaryKeyType(IdTrait::UUID_FIELD_TRAIT)
30
             ->generateEntity(static::TEST_ENTITY_FQN_BASE . $this->entitySuffix);
31
    }
32
33
    protected function validateSavedEntity($entity)
34
    {
35
        $id = $entity->getId();
36
        self::assertNotEmpty($id);
37
        self::assertInstanceOf(UuidInterface::class, $id);
38
    }
39
}
40