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.
Passed
Pull Request — master (#59)
by joseph
18:36
created

EntityFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 22
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 3 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 16
    public function __construct(EntityValidatorFactory $entityValidatorFactory)
16
    {
17 16
        $this->entityValidatorFactory = $entityValidatorFactory;
18 16
    }
19
20
    /**
21
     * Build a new empty entity with the validator factory preloaded
22
     *
23
     * @param string $entityFqn
24
     *
25
     * @return EntityInterface
26
     */
27 15
    public function create(string $entityFqn): EntityInterface
28
    {
29 15
        return new $entityFqn($this->entityValidatorFactory);
30
    }
31
}
32