We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function __construct(?EntityManager $entityManager) |
||
16 | { |
||
17 | if (null === $entityManager) { |
||
18 | throw new ServiceNotFoundException( |
||
19 | "Couldn't convert value, because no EntityManager service is found. |
||
20 | To use the 'EntityConverter' you need to install Doctrine ORM first. |
||
21 | See: 'https://symfony.com/doc/current/doctrine.html'" |
||
22 | ); |
||
23 | } |
||
24 | |||
25 | $this->em = $entityManager; |
||
26 | } |
||
38 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.