| @@ -77,8 +77,7 @@ | ||
| 77 | 77 | $return_data = $command->execute($style_id); | 
| 78 | 78 | |
| 79 | 79 | $this->action_handler->clear_cache(); | 
| 80 | - } | |
| 81 | - catch (\blitze\sitemaker\exception\base $e) | |
| 80 | + } catch (\blitze\sitemaker\exception\base $e) | |
| 82 | 81 |  		{ | 
| 83 | 82 | $json_data['message'] = $e->get_message($this->user); | 
| 84 | 83 | } | 
| @@ -58,12 +58,10 @@ | ||
| 58 | 58 | $return_data = $command->execute(); | 
| 59 | 59 | |
| 60 | 60 | $this->action_handler->clear_cache(); | 
| 61 | - } | |
| 62 | - catch (\blitze\sitemaker\exception\base $e) | |
| 61 | + } catch (\blitze\sitemaker\exception\base $e) | |
| 63 | 62 |  		{ | 
| 64 | 63 | $return_data['message'] = $e->get_message($this->user); | 
| 65 | - } | |
| 66 | - catch (\Exception $e) | |
| 64 | + } catch (\Exception $e) | |
| 67 | 65 |  		{ | 
| 68 | 66 | $return_data['message'] = $this->user->lang($e->getMessage()); | 
| 69 | 67 | } | 
| @@ -79,8 +79,7 @@ | ||
| 79 | 79 | 'title' => 'LOGIN', | 
| 80 | 80 |  				'content'	=> $this->ptemplate->render_view('blitze/sitemaker', 'blocks/login.html', 'login_block') | 
| 81 | 81 | ); | 
| 82 | - } | |
| 83 | - else if ($settings['show_member_menu']) | |
| 82 | + } else if ($settings['show_member_menu']) | |
| 84 | 83 |  		{ | 
| 85 | 84 |  			$block = $this->phpbb_container->get('blitze.sitemaker.block.member_menu'); | 
| 86 | 85 | $block->set_template($this->ptemplate); | 
| @@ -237,8 +237,7 @@ | ||
| 237 | 237 |  			{ | 
| 238 | 238 | $padding .= $pad_with; | 
| 239 | 239 | $padding_store[$row['parent_id']] = $padding; | 
| 240 | - } | |
| 241 | - else if ($row['left_id'] > $right + 1) | |
| 240 | + } else if ($row['left_id'] > $right + 1) | |
| 242 | 241 |  			{ | 
| 243 | 242 | $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : ''; | 
| 244 | 243 | } | 
| @@ -50,8 +50,7 @@ discard block | ||
| 50 | 50 | if (!empty($collection)) | 
| 51 | 51 |  		{ | 
| 52 | 52 | return $collection->get_entities(); | 
| 53 | - } | |
| 54 | - else | |
| 53 | + } else | |
| 55 | 54 |  		{ | 
| 56 | 55 | return array(); | 
| 57 | 56 | } | 
| @@ -88,8 +87,7 @@ discard block | ||
| 88 | 87 | if (!$has_blocks && !$hiding_blocks && !sizeof($ex_positions)) | 
| 89 | 88 |  		{ | 
| 90 | 89 | $this->route_mapper->delete($route); | 
| 91 | - } | |
| 92 | - else | |
| 90 | + } else | |
| 93 | 91 |  		{ | 
| 94 | 92 | $route->set_has_blocks($has_blocks); | 
| 95 | 93 | $this->route_mapper->save($route); | 
| @@ -135,8 +135,7 @@ discard block | ||
| 135 | 135 |  		if ($this->request->is_set('style')) | 
| 136 | 136 |  		{ | 
| 137 | 137 |  			return $this->request->variable('style', 0); | 
| 138 | - } | |
| 139 | - else | |
| 138 | + } else | |
| 140 | 139 |  		{ | 
| 141 | 140 | return (!$this->config['override_user_style']) ? $this->user->data['user_style'] : $this->config['default_style']; | 
| 142 | 141 | } | 
| @@ -172,8 +171,7 @@ discard block | ||
| 172 | 171 | self::SHOW_BLOCK_LANDING => true, | 
| 173 | 172 | self::SHOW_BLOCK_SUBPAGE => false, | 
| 174 | 173 | ); | 
| 175 | - } | |
| 176 | - else | |
| 174 | + } else | |
| 177 | 175 |  		{ | 
| 178 | 176 | $modes = array( | 
| 179 | 177 | self::SHOW_BLOCK_BOTH => true, | 
| @@ -200,8 +198,7 @@ discard block | ||
| 200 | 198 | } | 
| 201 | 199 | |
| 202 | 200 |  			$u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'style')), '?'), './../'), 'edit_mode=' . (($edit_mode) ? 0 : 1)); | 
| 203 | - } | |
| 204 | - else | |
| 201 | + } else | |
| 205 | 202 |  		{ | 
| 206 | 203 | $edit_mode = false; | 
| 207 | 204 | } | 
| @@ -164,8 +164,7 @@ | ||
| 164 | 164 | if (!is_array($settings)) | 
| 165 | 165 |  		{ | 
| 166 | 166 | $this->settings = $settings; | 
| 167 | - } | |
| 168 | - else if (sizeof($settings)) | |
| 167 | + } else if (sizeof($settings)) | |
| 169 | 168 |  		{ | 
| 170 | 169 | $this->settings = serialize($settings); | 
| 171 | 170 | $this->hash = md5($this->settings); | 
| @@ -101,8 +101,7 @@ | ||
| 101 | 101 | if (!isset($key)) | 
| 102 | 102 |  			{ | 
| 103 | 103 | $this->_entities[] = $entity; | 
| 104 | - } | |
| 105 | - else | |
| 104 | + } else | |
| 106 | 105 |  			{ | 
| 107 | 106 | $this->_entities[$key] = $entity; | 
| 108 | 107 | } | 
| @@ -36,14 +36,12 @@ | ||
| 36 | 36 |  			if ('get' == $match[1]) | 
| 37 | 37 |  			{ | 
| 38 | 38 | return $this->$attribute; | 
| 39 | - } | |
| 40 | - else | |
| 39 | + } else | |
| 41 | 40 |  			{ | 
| 42 | 41 | $this->$attribute = $this->_validate_attribute($match[2], $args[0]); | 
| 43 | 42 | return $this; | 
| 44 | 43 | } | 
| 45 | - } | |
| 46 | - else | |
| 44 | + } else | |
| 47 | 45 |  		{ | 
| 48 | 46 | throw new \blitze\sitemaker\exception\unexpected_value(array($name, 'UNDEFINED_METHOD')); | 
| 49 | 47 | } |