1 | <?php |
||
7 | class DeployDispatcher extends Dispatcher { |
||
8 | |||
9 | const ACTION_DEPLOY = 'deploy'; |
||
10 | |||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private static $action_types = [ |
||
15 | self::ACTION_DEPLOY |
||
16 | ]; |
||
17 | |||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | public static $allowed_actions = [ |
||
22 | 'history' |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * @var \DNProject |
||
27 | */ |
||
28 | protected $project = null; |
||
29 | |||
30 | /** |
||
31 | * @var \DNEnvironment |
||
32 | */ |
||
33 | protected $environment = null; |
||
34 | |||
35 | public function init() { |
||
44 | |||
45 | /** |
||
46 | * |
||
47 | * @param \SS_HTTPRequest $request |
||
48 | * |
||
49 | * @return \HTMLText|\SS_HTTPResponse |
||
50 | */ |
||
51 | public function index(\SS_HTTPRequest $request) { |
||
54 | |||
55 | /** |
||
56 | * @return SS_HTTPResponse |
||
57 | */ |
||
58 | public function history(SS_HTTPRequest $request) { |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | public function Link() { |
||
81 | |||
82 | /** |
||
83 | * @param string $name |
||
84 | * |
||
85 | * @return array |
||
86 | */ |
||
87 | public function getModel($name = '') { |
||
90 | |||
91 | } |
||
92 |
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.