1 | <?php |
||
7 | class Tags |
||
8 | { |
||
9 | /** |
||
10 | * @var TagRepository |
||
11 | */ |
||
12 | private $tagRepository; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | private $sidebarTagsLimit; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $sidebarTagSizes; |
||
23 | |||
24 | /** |
||
25 | * @param TagRepository $tagRepository |
||
26 | * @param int $sidebarTagsLimit |
||
27 | * @param array $sidebarTagSizes |
||
28 | */ |
||
29 | public function __construct(TagRepository $tagRepository, int $sidebarTagsLimit, array $sidebarTagSizes) |
||
35 | |||
36 | /** |
||
37 | * @return array |
||
38 | */ |
||
39 | public function getList() |
||
65 | } |
||
66 |
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.