1 | <?php |
||
23 | abstract class AbstractCommand extends BaseCommand |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * Config editor. |
||
28 | * |
||
29 | * @var ConfigEditor |
||
30 | */ |
||
31 | private $_configEditor; |
||
32 | |||
33 | /** |
||
34 | * Jira REST client. |
||
35 | * |
||
36 | * @var Api |
||
37 | */ |
||
38 | protected $jiraApi; |
||
39 | |||
40 | /** |
||
41 | * Prepare dependencies. |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | protected function prepareDependencies() |
||
52 | |||
53 | /** |
||
54 | * Returns command setting value. |
||
55 | * |
||
56 | * @param string $name Name. |
||
57 | * |
||
58 | * @return mixed |
||
59 | */ |
||
60 | protected function getSetting($name) |
||
64 | |||
65 | /** |
||
66 | * Checks if an issue key is valid. |
||
67 | * |
||
68 | * @param string $issue_key Issue key. |
||
69 | * |
||
70 | * @return boolean |
||
71 | */ |
||
72 | public function isValidIssueKey($issue_key) |
||
76 | |||
77 | /** |
||
78 | * Return possible values for the named argument |
||
79 | * |
||
80 | * @param string $argumentName Argument name. |
||
81 | * @param CompletionContext $context Completion context. |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | public function completeArgumentValues($argumentName, CompletionContext $context) |
||
95 | |||
96 | /** |
||
97 | * Returns possible link names. |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | protected function getProjectKeys() |
||
116 | |||
117 | } |
||
118 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.