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 (#51)
by joseph
102:38 queued 99:24
created

IdFieldTraitTest::generateCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey;
4
5
use EdmondsCommerce\DoctrineStaticMeta\AbstractTest;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Interfaces\PrimaryKey\IdFieldInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\AbstractFieldTraitTest;
8
9
class IdFieldTraitTest extends AbstractFieldTraitTest
10
{
11
    public const    WORK_DIR        = AbstractTest::VAR_PATH.'/IdFieldTraitTest/';
12
    protected const TEST_FIELD_FQN  = IdFieldTrait::class;
13
    protected const TEST_FIELD_PROP = IdFieldInterface::PROP_ID;
14
15
    public function generateCode()
16
    {
17
        $this->getEntityGenerator()
18
             ->generateEntity(static::TEST_ENTITY_FQN_BASE.$this->entitySuffix);
19
        $this->setupCopiedWorkDir();
20
    }
21
22
23
    /**
24
     * Can't really do setters etc on ID fields
25
     *
26
     * @throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
27
     * @throws \ReflectionException
28
     */
29
    public function testCreateEntityWithField(): void
30
    {
31
        $entityFqn = $this->getCopiedFqn(static::TEST_ENTITY_FQN_BASE.$this->entitySuffix);
32
        $entity    = new $entityFqn();
33
        $getter    = $this->getGetter($entity);
34
        $this->assertTrue(\method_exists($entity, $getter));
35
        $value = $entity->$getter();
36
        $this->assertEmpty($value);
37
    }
38
}
39