EntityManagerNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 7
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LAG\AdminBundle\Bridge\Doctrine\ORM\Exception;
6
7
use LAG\AdminBundle\Exception\Exception;
8
use LAG\AdminBundle\Metadata\OperationInterface;
9
10
class EntityManagerNotFoundException extends Exception
11
{
12
    public function __construct(OperationInterface $operation)
13
    {
14
        parent::__construct(sprintf(
15
            'The data class of the admin resource "%s" is not managed by any Doctrine entity manager',
16
            $operation->getResourceName(),
0 ignored issues
show
Bug introduced by
The method getResourceName() does not exist on LAG\AdminBundle\Metadata\OperationInterface. Did you maybe mean getResource()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
            $operation->/** @scrutinizer ignore-call */ 
17
                        getResourceName(),

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
17
        ));
18
    }
19
}
20