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 (#47)
by joseph
07:51 queued 05:21
created

getPropertyDoctrineMetaForTemplateEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
// phpcs:disable
3
namespace TemplateNamespace\Entity\Relations\TemplateEntity\Traits\HasTemplateEntity;
4
5
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
6
use TemplateNamespace\Entities\TemplateEntity as TemplateEntity;
7
use TemplateNamespace\Entity\Relations\TemplateEntity\Traits\HasTemplateEntityAbstract;
8
use TemplateNamespace\Entity\Relations\TemplateEntity\Traits\ReciprocatesTemplateEntity;
9
10
/**
11
 * Trait HasTemplateEntityManyToOne
12
 *
13
 * ManyToOne - Many instances of the current Entity (that is using this trait) refer to
14
 *             One instance of TemplateEntity.
15
 *
16
 * TemplateEntity has a corresponding OneToMany relationship to the current
17
 * Entity (that is using this trait)
18
 *
19
 * @see https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#one-to-many-bidirectional
20
 *
21
 * @package TemplateNamespace\Entities\Traits\Relations\TemplateEntity\HasTemplateEntity
22
 */
23
// phpcs:enable
24
trait HasTemplateEntityManyToOne
25
{
26
    use HasTemplateEntityAbstract;
27
28
    use ReciprocatesTemplateEntity;
29
30
    /**
31
     * @param ClassMetadataBuilder $builder
32
     *
33
     * @throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
34
     * @SuppressWarnings(PHPMD.StaticAccess)
35
     */
36
    public static function metaForTemplateEntity(
37
        ClassMetadataBuilder $builder
38
    ): void {
39
        $builder->addManyToOne(
40
            TemplateEntity::getSingular(),
41
            TemplateEntity::class,
42
            static::getPlural()
43
        );
44
    }
45
}
46