Failed Conditions
Pull Request — develop (#6684)
by Michael
61:07
created

FooGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A generate() 0 4 1
A isPostInsertGenerator() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\Models\ValueGenerators;
6
7
use Doctrine\ORM\EntityManagerInterface;
8
use Doctrine\ORM\Sequencing\Generator;
9
10
class FooGenerator implements Generator
11
{
12
    public const VALUE = 'foo';
13
14
    public function generate(EntityManagerInterface $em, $entity) : string
15
    {
16
        return self::VALUE;
17
    }
18
19
    public function isPostInsertGenerator() : bool
20
    {
21
        return false;
22
    }
23
}
24