| @@ -260,8 +260,7 @@ | ||
| 260 | 260 | 'depth' => $new_parent['depth'] + 1, | 
| 261 | 261 | 'right_id' => --$new_parent['right_id'], | 
| 262 | 262 | ); | 
| 263 | - } | |
| 264 | - else | |
| 263 | + } else | |
| 265 | 264 |  		{ | 
| 266 | 265 | return array( | 
| 267 | 266 | 'depth' => 0, | 
| @@ -41,8 +41,7 @@ | ||
| 41 | 41 | if (is_array($message)) | 
| 42 | 42 |  		{ | 
| 43 | 43 | $this->message = (string) $message[0]; | 
| 44 | - } | |
| 45 | - else | |
| 44 | + } else | |
| 46 | 45 |  		{ | 
| 47 | 46 | $this->message = $message; | 
| 48 | 47 | } | 
| @@ -33,13 +33,13 @@ | ||
| 33 | 33 | protected $data = array(); | 
| 34 | 34 | |
| 35 | 35 | /** | 
| 36 | - * Construct | |
| 37 | - * | |
| 38 | - * @param \phpbb\db\driver\driver_interface $db Database connection | |
| 39 | - * @param string $items_table Table name | |
| 40 | - * @param string $pk Primary key | |
| 41 | - * @param string $sql_where Column restriction | |
| 42 | - */ | |
| 36 | + * Construct | |
| 37 | + * | |
| 38 | + * @param \phpbb\db\driver\driver_interface $db Database connection | |
| 39 | + * @param string $items_table Table name | |
| 40 | + * @param string $pk Primary key | |
| 41 | + * @param string $sql_where Column restriction | |
| 42 | + */ | |
| 43 | 43 | public function __construct(\phpbb\db\driver\driver_interface $db, $items_table, $pk, $sql_where = '') | 
| 44 | 44 |  	{ | 
| 45 | 45 | $this->db = $db; | 
| @@ -254,8 +254,7 @@ | ||
| 254 | 254 |  		{ | 
| 255 | 255 | $padding .= $pad_with; | 
| 256 | 256 | $padding_store[$row[$this->column_parent_id]] = $padding; | 
| 257 | - } | |
| 258 | - else if ($row[$this->column_left_id] > $right + 1) | |
| 257 | + } else if ($row[$this->column_left_id] > $right + 1) | |
| 259 | 258 |  		{ | 
| 260 | 259 | $padding = (isset($padding_store[$row[$this->column_parent_id]])) ? $padding_store[$row[$this->column_parent_id]] : ''; | 
| 261 | 260 | } | 
| @@ -40,8 +40,7 @@ | ||
| 40 | 40 | if ($this->can_track_by_lastread()) | 
| 41 | 41 |  		{ | 
| 42 | 42 |  			$info = $this->build_tracking_info('get_topic_tracking', $forums, $topics); | 
| 43 | - } | |
| 44 | - else if ($this->can_track_anonymous()) | |
| 43 | + } else if ($this->can_track_anonymous()) | |
| 45 | 44 |  		{ | 
| 46 | 45 |  			$info = $this->build_tracking_info('get_complete_topic_tracking', $forums, $topics); | 
| 47 | 46 | } | 
| @@ -56,8 +56,8 @@ discard block | ||
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | 58 | /** | 
| 59 | -	* {@inheritdoc} | |
| 60 | - */ | |
| 59 | +	 * {@inheritdoc} | |
| 60 | + */ | |
| 61 | 61 | public function to_array() | 
| 62 | 62 |  	{ | 
| 63 | 63 | $attributes = $this->get_attributes(); | 
| @@ -74,8 +74,8 @@ discard block | ||
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | 76 | /** | 
| 77 | -	* {@inheritdoc} | |
| 78 | - */ | |
| 77 | +	 * {@inheritdoc} | |
| 78 | + */ | |
| 79 | 79 | public function to_db() | 
| 80 | 80 |  	{ | 
| 81 | 81 | $this->check_required(); | 
| @@ -43,8 +43,7 @@ | ||
| 43 | 43 |  			if ('get' == $match[1]) | 
| 44 | 44 |  			{ | 
| 45 | 45 | return $this->$attribute; | 
| 46 | - } | |
| 47 | - else | |
| 46 | + } else | |
| 48 | 47 |  			{ | 
| 49 | 48 | $this->$attribute = $this->validate_attribute($match[2], $args[0]); | 
| 50 | 49 | return $this; | 
| @@ -14,12 +14,12 @@ | ||
| 14 | 14 | class nestedset extends builder | 
| 15 | 15 |  { | 
| 16 | 16 | /** | 
| 17 | - * Construct | |
| 18 | - * | |
| 19 | - * @param \phpbb\db\driver\driver_interface $db Database connection | |
| 20 | - * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around | |
| 21 | - * @param string $table_name Table name | |
| 22 | - */ | |
| 17 | + * Construct | |
| 18 | + * | |
| 19 | + * @param \phpbb\db\driver\driver_interface $db Database connection | |
| 20 | + * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around | |
| 21 | + * @param string $table_name Table name | |
| 22 | + */ | |
| 23 | 23 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock, $table_name) | 
| 24 | 24 |  	{ | 
| 25 | 25 | parent::__construct( | 
| @@ -177,13 +177,11 @@ | ||
| 177 | 177 |  		{ | 
| 178 | 178 | $route = ltrim(dirname($page_dir) . '/index.php', './'); | 
| 179 | 179 | $parent_route = $this->get_parent_route_info($routes, $route); | 
| 180 | - } | |
| 181 | - else if ($current_route === 'viewtopic.' . $this->php_ext) | |
| 180 | + } else if ($current_route === 'viewtopic.' . $this->php_ext) | |
| 182 | 181 |  		{ | 
| 183 | 182 | $route = 'viewforum.' . $this->php_ext; | 
| 184 | 183 | $parent_route = $this->get_parent_route_info($routes, $route); | 
| 185 | - } | |
| 186 | - else | |
| 184 | + } else | |
| 187 | 185 |  		{ | 
| 188 | 186 | $parent_route = $this->get_virtual_parent($routes, $current_route); | 
| 189 | 187 | } | 
| @@ -104,8 +104,7 @@ | ||
| 104 | 104 | if (!isset($key)) | 
| 105 | 105 |  			{ | 
| 106 | 106 | $this->entities[] = $entity; | 
| 107 | - } | |
| 108 | - else | |
| 107 | + } else | |
| 109 | 108 |  			{ | 
| 110 | 109 | $this->entities[$key] = $entity; | 
| 111 | 110 | } | 
| @@ -96,8 +96,7 @@ | ||
| 96 | 96 | if ($entity->get_item_id()) | 
| 97 | 97 |  		{ | 
| 98 | 98 | $item = $this->tree->update_item($entity->get_item_id(), $sql_data); | 
| 99 | - } | |
| 100 | - else | |
| 99 | + } else | |
| 101 | 100 |  		{ | 
| 102 | 101 | $item = $this->tree->insert($sql_data); | 
| 103 | 102 | } |