Failed Conditions
Pull Request — develop (#6743)
by Grégoire
62:30
created

InvalidEntityRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromClassName() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Configuration;
6
7
use Doctrine\Common\Persistence\ObjectRepository;
8
use Doctrine\ORM\ConfigurationException;
9
10
final class InvalidEntityRepository extends \Exception implements ConfigurationException
11
{
12
    public static function fromClassName(string $className) : self
13
    {
14
        return new self(
15
            "Invalid repository class '".$className."'. It must be a ".ObjectRepository::class."."
16
        );
17
    }
18
}
19