1 | <?php |
||
14 | class blocks extends routes |
||
15 | { |
||
16 | /** @var \phpbb\config\config */ |
||
17 | protected $config; |
||
18 | |||
19 | /** @var \phpbb\template\template */ |
||
20 | protected $template; |
||
21 | |||
22 | /** @var \phpbb\user */ |
||
23 | protected $user; |
||
24 | |||
25 | /** @var \blitze\sitemaker\services\blocks\factory */ |
||
26 | protected $block_factory; |
||
27 | |||
28 | /** @var \blitze\sitemaker\services\groups */ |
||
29 | protected $groups; |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param \phpbb\cache\driver\driver_interface $cache Cache driver interface |
||
35 | * @param \phpbb\config\config $config Config object |
||
36 | * @param \phpbb\template\template $template Template object |
||
37 | * @param \phpbb\user $user User object |
||
38 | * @param \blitze\sitemaker\services\blocks\factory $block_factory Blocks factory object |
||
39 | * @param \blitze\sitemaker\services\groups $groups Groups Object |
||
40 | * @param \blitze\sitemaker\model\mapper_factory $mapper_factory Mapper factory object |
||
41 | */ |
||
42 | 6 | public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\blocks\factory $block_factory, \blitze\sitemaker\services\groups $groups, \blitze\sitemaker\model\mapper_factory $mapper_factory) |
|
51 | |||
52 | /** |
||
53 | * Display blocks for current route |
||
54 | * |
||
55 | * @param bool $edit_mode |
||
56 | * @param array $route_info |
||
57 | * @param int $style_id |
||
58 | * @param $display_modes |
||
59 | */ |
||
60 | 6 | public function display($edit_mode, array $route_info, $style_id, array $display_modes) |
|
80 | |||
81 | /** |
||
82 | * Render block |
||
83 | * |
||
84 | * @param array $display_modes |
||
85 | * @param bool $edit_mode |
||
86 | * @param array $data |
||
87 | * @param array $users_groups |
||
88 | * @param int $position_counter |
||
89 | */ |
||
90 | 4 | public function render(array $display_modes, $edit_mode, array $data, array $users_groups, &$position_counter) |
|
111 | |||
112 | /** |
||
113 | * @param string $position |
||
114 | * @param array $blocks |
||
115 | * @param array $ex_positions |
||
116 | * @param array $users_groups |
||
117 | * @param array $blocks_per_position |
||
|
|||
118 | * @param array $display_modes |
||
119 | * @param bool $edit_mode |
||
120 | */ |
||
121 | 4 | protected function show_position($position, array $blocks, array $ex_positions, array $users_groups, &$position_counter, $display_modes, $edit_mode) |
|
131 | |||
132 | /** |
||
133 | * @param string $db_title |
||
134 | * @param string $df_title |
||
135 | * @return string |
||
136 | */ |
||
137 | 4 | protected function _get_block_title($db_title, $df_title) |
|
141 | |||
142 | /** |
||
143 | * @param array $block |
||
144 | * @param bool $edit_mode |
||
145 | * @return string|null |
||
146 | */ |
||
147 | 4 | protected function _get_block_content(array $block, $edit_mode) |
|
161 | |||
162 | /** |
||
163 | * Should we display this block? |
||
164 | * |
||
165 | * @param array $data |
||
166 | * @param array $display_modes |
||
167 | * @param array $users_groups |
||
168 | * @param bool $edit_mode |
||
169 | * @return bool |
||
170 | */ |
||
171 | 4 | protected function _block_is_viewable(array $data, array $display_modes, array $users_groups, $edit_mode) |
|
178 | |||
179 | /** |
||
180 | * @param mixed $allowed_groups |
||
181 | * @param array $users_groups |
||
182 | * @return bool |
||
183 | */ |
||
184 | 4 | protected function _user_is_permitted($allowed_groups, array $users_groups) |
|
188 | |||
189 | /** |
||
190 | * @param string $position |
||
191 | * @param array $ex_positions |
||
192 | * @param bool $edit_mode |
||
193 | * @return bool |
||
194 | */ |
||
195 | 4 | protected function _exclude_position($position, array $ex_positions, $edit_mode) |
|
199 | } |
||
200 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.