1 | <?php |
||
17 | abstract class AbstractTagCommand extends AbstractController implements CommandInterface |
||
18 | { |
||
19 | /** |
||
20 | * GitHub API object. |
||
21 | * |
||
22 | * @var GitHub |
||
23 | * @since 1.0 |
||
24 | */ |
||
25 | protected $github; |
||
26 | |||
27 | /** |
||
28 | * The GitHub repository to query. |
||
29 | * |
||
30 | * @var string |
||
31 | * @since 1.0 |
||
32 | */ |
||
33 | protected $repoName; |
||
34 | |||
35 | /** |
||
36 | * The owner of the GitHub repository to query. |
||
37 | * |
||
38 | * @var string |
||
39 | * @since 1.0 |
||
40 | */ |
||
41 | protected $repoOwner; |
||
42 | |||
43 | /** |
||
44 | * Constructor. |
||
45 | * |
||
46 | * @param GitHub $github GitHub API object |
||
47 | * |
||
48 | * @since 1.0 |
||
49 | */ |
||
50 | public function __construct(GitHub $github) |
||
54 | |||
55 | /** |
||
56 | * Get the tags for a repository |
||
57 | * |
||
58 | * @return array |
||
59 | * |
||
60 | * @since 1.0 |
||
61 | */ |
||
62 | protected function getTags() |
||
94 | } |
||
95 |
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.