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 (#59)
by joseph
17:21
created

EntityFactory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Factory;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Entity\Interfaces\EntityInterface;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Validation\EntityValidatorFactory;
7
8
class EntityFactory
9
{
10
    /**
11
     * @var EntityValidatorFactory
12
     */
13
    protected $entityValidatorFactory;
14
15 15
    public function __construct(EntityValidatorFactory $entityValidatorFactory)
16
    {
17 15
        $this->entityValidatorFactory = $entityValidatorFactory;
18 15
    }
19
20
    /**
21
     * Build a new empty entity with the validator factory preloaded
22
     *
23
     * @param string $entityFqn
24
     *
25
     * @return EntityInterface
26
     */
27 14
    public function create(string $entityFqn): EntityInterface
28
    {
29 14
        return new $entityFqn($this->entityValidatorFactory);
30
    }
31
}
32