@@ -143,6 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
146 | + * @param string $plugin |
|
146 | 147 | * @return bool |
147 | 148 | */ |
148 | 149 | public function hasDependency( $plugin ) |
@@ -304,7 +305,7 @@ discard block |
||
304 | 305 | |
305 | 306 | /** |
306 | 307 | * @param string $error |
307 | - * @param bool $bool |
|
308 | + * @param boolean $isValid |
|
308 | 309 | * @return bool |
309 | 310 | */ |
310 | 311 | protected function catchError( $plugin, $error, $isValid ) |
@@ -403,6 +404,7 @@ discard block |
||
403 | 404 | } |
404 | 405 | |
405 | 406 | /** |
407 | + * @param string $key |
|
406 | 408 | * @return array|string |
407 | 409 | */ |
408 | 410 | protected function getPluginRequirements( $plugin, $key = null ) |
@@ -68,7 +68,9 @@ discard block |
||
68 | 68 | if( $screen->id != 'settings_page_pollux' |
69 | 69 | || $screen->pagenow != 'options-general.php' |
70 | 70 | || filter_input( INPUT_GET, 'action' ) != 'activate' |
71 | - )return; |
|
71 | + ) { |
|
72 | + return; |
|
73 | + } |
|
72 | 74 | check_admin_referer( 'activate-plugin_' . $plugin ); |
73 | 75 | $result = activate_plugin( $plugin, null, is_network_admin(), true ); |
74 | 76 | if( is_wp_error( $result )) { |
@@ -125,7 +127,9 @@ discard block |
||
125 | 127 | */ |
126 | 128 | public function getDependencyAction() |
127 | 129 | { |
128 | - if( get_current_screen()->id != 'settings_page_pollux' )return; |
|
130 | + if( get_current_screen()->id != 'settings_page_pollux' ) { |
|
131 | + return; |
|
132 | + } |
|
129 | 133 | |
130 | 134 | $action = filter_input( INPUT_GET, 'action' ); |
131 | 135 | $plugin = filter_input( INPUT_GET, 'plugin' ); |
@@ -240,7 +244,9 @@ discard block |
||
240 | 244 | public function hasPendingDependencies() |
241 | 245 | { |
242 | 246 | foreach( static::DEPENDENCIES as $plugin => $data ) { |
243 | - if( !$this->isPluginDependency( $plugin ))continue; |
|
247 | + if( !$this->isPluginDependency( $plugin )) { |
|
248 | + continue; |
|
249 | + } |
|
244 | 250 | $this->isPluginActive( $plugin ); |
245 | 251 | $this->isPluginVersionValid( $plugin ); |
246 | 252 | } |
@@ -255,7 +261,9 @@ discard block |
||
255 | 261 | if( get_current_screen()->id != 'settings_page_pollux' |
256 | 262 | || $this->app->config->disable_config |
257 | 263 | || !$this->hasPendingDependencies() |
258 | - )return; |
|
264 | + ) { |
|
265 | + return; |
|
266 | + } |
|
259 | 267 | |
260 | 268 | $plugins = ''; |
261 | 269 | $actions = ''; |