1 | <?php |
||
14 | class TestCase extends \PHPUnit_Framework_TestCase |
||
15 | { |
||
16 | /** |
||
17 | * @var EntityManager |
||
18 | */ |
||
19 | protected $entityManager; |
||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $hasDb = false; |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $arrayConfig; |
||
28 | |||
29 | /** |
||
30 | * @return array |
||
31 | */ |
||
32 | public function getArrayConfig(): array |
||
40 | |||
41 | /** |
||
42 | * @return EntityManager |
||
43 | */ |
||
44 | public function getEntityManager(): EntityManager |
||
71 | |||
72 | /** |
||
73 | * Creates a database if not done already. |
||
74 | */ |
||
75 | public function createDb() |
||
86 | |||
87 | /** |
||
88 | * Drops existing database. |
||
89 | */ |
||
90 | public function dropDb() |
||
99 | } |
||
100 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.