Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php namespace Comodojo\Extender\Traits; |
||
21 | trait EntityManagerTrait { |
||
22 | |||
23 | /** |
||
24 | * @var EntityManager |
||
25 | */ |
||
26 | protected $em; |
||
27 | |||
28 | /** |
||
29 | * Get EntityManager |
||
30 | * |
||
31 | * @return EntityManager |
||
32 | */ |
||
33 | public function getEntityManager() { |
||
34 | |||
35 | return $this->em; |
||
36 | |||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Set EntityManager |
||
41 | * |
||
42 | * @param string $id |
||
43 | * @return Schedule |
||
|
|||
44 | */ |
||
45 | public function setEntityManager(EntityManager $em) { |
||
46 | |||
47 | $this->em = $em; |
||
48 | |||
49 | return $this; |
||
50 | |||
51 | } |
||
52 | |||
53 | public function closeEntityManager() { |
||
54 | |||
55 | $em = $this->getEntityManager(); |
||
56 | |||
57 | if ( $em instanceof EntityManager ) { |
||
58 | $em->getConnection()->close(); |
||
59 | $em->close(); |
||
60 | } |
||
61 | |||
62 | } |
||
63 | |||
64 | public function __destruct() { |
||
67 | |||
68 | } |
||
69 | |||
70 | } |
||
71 |
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