1 | <?php |
||
2 | |||
3 | namespace GeodisBundle\Manager; |
||
4 | |||
5 | use Doctrine\ORM\EntityManager; |
||
0 ignored issues
–
show
|
|||
6 | use GeodisBundle\DAO\Connection; |
||
7 | use GeodisBundle\DAO\Exception\ApiException; |
||
8 | |||
9 | abstract class GeodisManager |
||
10 | { |
||
11 | protected $list = []; |
||
12 | protected $model; |
||
13 | protected $config; |
||
14 | protected $em; |
||
15 | |||
16 | public function __construct(EntityManager $em) |
||
17 | { |
||
18 | $this->em = $em; |
||
19 | } |
||
20 | |||
21 | public function setConfig($config) |
||
22 | { |
||
23 | $this->config = $config; |
||
24 | } |
||
25 | |||
26 | public function init() |
||
27 | { |
||
28 | try { |
||
29 | Connection::setConfig($this->config, $this->em); |
||
30 | } catch (ApiException $e) { |
||
31 | throw new Exception("Can't initiate connection: ", $e->getCode()); |
||
0 ignored issues
–
show
|
|||
32 | } |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return object |
||
37 | */ |
||
38 | public function getModel($name) |
||
39 | { |
||
40 | try { |
||
41 | $classname = $cname = 'GeodisBundle\\Model\\'.$name; |
||
0 ignored issues
–
show
|
|||
42 | |||
43 | $this->model = new $classname(); |
||
44 | |||
45 | return $this; |
||
46 | } catch (ApiException $e) { |
||
47 | throw new ApiException("Model doesn't existe : ", $e->getStatusCode()); |
||
48 | } |
||
49 | } |
||
50 | } |
||
51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths