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 (#185)
by joseph
33:47
created

validateSavedEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
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