Completed
Push — master ( be40cf...311379 )
by Daniel
08:20
created
services/blocks/action/add_block.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 {
14 14
 	public function execute($style_id)
15 15
 	{
16
-		$name	= $this->request->variable('block', '');
17
-		$route	= $this->request->variable('route', '');
16
+		$name = $this->request->variable('block', '');
17
+		$route = $this->request->variable('route', '');
18 18
 
19 19
 		if (($block_instance = $this->block_factory->get_block($name)) === null)
20 20
 		{
Please login to merge, or discard this patch.
services/url_checker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 			$headers = $headers[0];
30 30
 		}
31 31
 
32
-		preg_match('/HTTP\/.* ([0-9]+) .*/', $headers , $status);
32
+		preg_match('/HTTP\/.* ([0-9]+) .*/', $headers, $status);
33 33
 
34 34
 		return ($status[1] == 200) ? true : false;
35 35
 	}
Please login to merge, or discard this patch.
model/base_collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 		{
122 122
 			$this->_entities = array_filter(
123 123
 				$this->_entities,
124
-				function ($v) use ($key)
124
+				function($v) use ($key)
125 125
 				{
126 126
 					return $v !== $key;
127 127
 				}
Please login to merge, or discard this patch.
exception/unexpected_value.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 class unexpected_value extends base
16 16
 {
17 17
 	/**
18
-	* Translate this exception
19
-	*
20
-	* @param \phpbb\user $user
21
-	* @return array|string
22
-	* @access public
23
-	*/
18
+	 * Translate this exception
19
+	 *
20
+	 * @param \phpbb\user $user
21
+	 * @return array|string
22
+	 * @access public
23
+	 */
24 24
 	public function get_message(\phpbb\user $user)
25 25
 	{
26 26
 		return $this->translate_portions($user, $this->message_full, 'EXCEPTION_UNEXPECTED_VALUE');
Please login to merge, or discard this patch.
services/tree/display.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	{
79 79
 		$sql = "SELECT *
80 80
 			FROM $this->items_table
81
-			WHERE $this->pk = " . (int) $node_id ;
81
+			WHERE $this->pk = ".(int) $node_id;
82 82
 		$result = $this->db->sql_query($sql);
83 83
 		$row = $this->db->sql_fetchrow($result);
84 84
 		$this->db->sql_freeresult($result);
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 					$this->items_table => ' t'
108 108
 				),
109 109
 				'WHERE'		=> array(
110
-					't.depth ' . (($level) ? " BETWEEN $start AND " . ($start + $level) : ' >= ' . $start),
111
-					(($this->sql_where) ? 't.' . $this->sql_where : ''),
110
+					't.depth '.(($level) ? " BETWEEN $start AND ".($start + $level) : ' >= '.$start),
111
+					(($this->sql_where) ? 't.'.$this->sql_where : ''),
112 112
 				),
113 113
 				'ORDER_BY'	=> 't.left_id ASC',
114 114
 			),
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * @param \phpbb\template\twig\twig $template
148 148
 	 * @param string $handle
149 149
 	 */
150
-	public function display_list(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree')
150
+	public function display_list(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree')
151 151
 	{
152 152
 		$prev_depth = 0;
153 153
 		$parental_depth = array(0 => -1);
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
 		for ($i = 0, $size = sizeof($data); $i < $size; $i++)
157 157
 		{
158 158
 			$row 		= $data[$i];
159
-			$this_depth	= $parental_depth[$row['parent_id']] + 1;
160
-			$repeat		= abs($prev_depth - $this_depth);
159
+			$this_depth = $parental_depth[$row['parent_id']] + 1;
160
+			$repeat = abs($prev_depth - $this_depth);
161 161
 
162
-			$tpl_data	= array(
162
+			$tpl_data = array(
163 163
 				'PREV_DEPTH'	=> $prev_depth,
164 164
 				'THIS_DEPTH'	=> $this_depth,
165 165
 				'NUM_KIDS'		=> $this->count_descendants($row),
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 			for ($j = 0; $j < $repeat; $j++)
171 171
 			{
172
-				$template->assign_block_vars($handle . '.close', array());
172
+				$template->assign_block_vars($handle.'.close', array());
173 173
 			}
174 174
 
175 175
 			$prev_depth = $this_depth;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
 		for ($i = 0; $i < $prev_depth; $i++)
180 180
 		{
181
-			$template->assign_block_vars('close_' . $handle, array());
181
+			$template->assign_block_vars('close_'.$handle, array());
182 182
 		}
183 183
 	}
184 184
 
@@ -217,10 +217,10 @@  discard block
 block discarded – undo
217 217
 			}
218 218
 
219 219
 			$right = $row['right_id'];
220
-			$title = $padding . '&#x251c;&#x2500; ' . $row[$title_column];
220
+			$title = $padding.'&#x251c;&#x2500; '.$row[$title_column];
221 221
 			$selected = (in_array($row[$this->pk], $selected_ids)) ? ' selected="selected' : '';
222 222
 
223
-			$return_options .= '<option value="' . $row[$this->pk] . '"' . $selected . '>' . $title . '</option>';
223
+			$return_options .= '<option value="'.$row[$this->pk].'"'.$selected.'>'.$title.'</option>';
224 224
 			$return_data[$row[$this->pk]] = $title;
225 225
 		}
226 226
 
Please login to merge, or discard this patch.
exception/out_of_bounds.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 class unexpected_value extends base
16 16
 {
17 17
 	/**
18
-	* Translate this exception
19
-	*
20
-	* @param \phpbb\user $user
21
-	* @return array|string
22
-	* @access public
23
-	*/
18
+	 * Translate this exception
19
+	 *
20
+	 * @param \phpbb\user $user
21
+	 * @return array|string
22
+	 * @access public
23
+	 */
24 24
 	public function get_message(\phpbb\user $user)
25 25
 	{
26 26
 		return $this->translate_portions($user, $this->message_full, 'EXCEPTION_UNEXPECTED_VALUE');
Please login to merge, or discard this patch.
exception/base.php 2 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -16,23 +16,23 @@  discard block
 block discarded – undo
16 16
 class base extends \Exception
17 17
 {
18 18
 	/**
19
-	* Null if the message is a string, array if the message was submitted as an array
20
-	* @var string|array
21
-	*/
19
+	 * Null if the message is a string, array if the message was submitted as an array
20
+	 * @var string|array
21
+	 */
22 22
 	protected $message_full;
23 23
 
24 24
 	protected $previous;
25 25
 
26 26
 	/**
27
-	* Constructor
28
-	*
29
-	* Different from normal exceptions in that we do not enforce $message to be a string.
30
-	*
31
-	* @param string|array $message
32
-	* @param int $code
33
-	* @param \Exception $previous
34
-	* @access public
35
-	*/
27
+	 * Constructor
28
+	 *
29
+	 * Different from normal exceptions in that we do not enforce $message to be a string.
30
+	 *
31
+	 * @param string|array $message
32
+	 * @param int $code
33
+	 * @param \Exception $previous
34
+	 * @access public
35
+	 */
36 36
 	public function __construct($message = null, $code = 0, \Exception $previous = null)
37 37
 	{
38 38
 		// We're slightly changing the way exceptions work
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	}
54 54
 
55 55
 	/**
56
-	* Basic message translation for our exceptions
57
-	*
58
-	* @param \phpbb\user $user
59
-	* @return string|array
60
-	* @access public
61
-	*/
56
+	 * Basic message translation for our exceptions
57
+	 *
58
+	 * @param \phpbb\user $user
59
+	 * @return string|array
60
+	 * @access public
61
+	 */
62 62
 	public function get_message(\phpbb\user $user)
63 63
 	{
64 64
 		// Make sure our language file has been loaded
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
 	}
74 74
 
75 75
 	/**
76
-	* Translate all portions of the message sent to the exception
77
-	*
78
-	* Goes through each element of the array and tries to translate them
79
-	*
80
-	* @param \phpbb\user $user
81
-	* @param string|array $message_portions The message portions to translate
82
-	* @param string|null $parent_message Send a string to translate all of the
83
-	*     portions with the parent message (typically used to format a string
84
-	*     with the given message portions). Null to ignore. Default: Null
85
-	* @return array|string Array if $parent_message === null else a string
86
-	* @access protected
87
-	*/
76
+	 * Translate all portions of the message sent to the exception
77
+	 *
78
+	 * Goes through each element of the array and tries to translate them
79
+	 *
80
+	 * @param \phpbb\user $user
81
+	 * @param string|array $message_portions The message portions to translate
82
+	 * @param string|null $parent_message Send a string to translate all of the
83
+	 *     portions with the parent message (typically used to format a string
84
+	 *     with the given message portions). Null to ignore. Default: Null
85
+	 * @return array|string Array if $parent_message === null else a string
86
+	 * @access protected
87
+	 */
88 88
 	protected function translate_portions(\phpbb\user $user, $message_portions, $parent_message = null)
89 89
 	{
90 90
 		// Make sure our language file has been loaded
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 	}
127 127
 
128 128
 	/**
129
-	* Add our language file
130
-	*
131
-	* @param \phpbb\user $user
132
-	* @return null
133
-	* @access public
134
-	*/
129
+	 * Add our language file
130
+	 *
131
+	 * @param \phpbb\user $user
132
+	 * @return null
133
+	 * @access public
134
+	 */
135 135
 	public function add_lang(\phpbb\user $user)
136 136
 	{
137 137
 		static $is_loaded = false;
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
 	}
151 151
 
152 152
 	/**
153
-	* Output a string of this error message
154
-	*
155
-	* This will hopefully be never called, always catch the expected exceptions
156
-	* and call get_message to translate them into an error that a user can
157
-	* understand
158
-	*
159
-	* @return string
160
-	* @access public
161
-	*/
153
+	 * Output a string of this error message
154
+	 *
155
+	 * This will hopefully be never called, always catch the expected exceptions
156
+	 * and call get_message to translate them into an error that a user can
157
+	 * understand
158
+	 *
159
+	 * @return string
160
+	 * @access public
161
+	 */
162 162
 	public function __toString()
163 163
 	{
164 164
 		return (is_array($this->message_full)) ? var_export($this->message_full, true) : (string) $this->message_full;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,10 +100,10 @@
 block discarded – undo
100 100
 		foreach ($message_portions as &$message)
101 101
 		{
102 102
 			// Attempt to translate each portion
103
-			$translated_message = $user->lang('EXCEPTION_' . $message);
103
+			$translated_message = $user->lang('EXCEPTION_'.$message);
104 104
 
105 105
 			// Check if translating did anything
106
-			if ($translated_message !== 'EXCEPTION_' . $message)
106
+			if ($translated_message !== 'EXCEPTION_'.$message)
107 107
 			{
108 108
 				// It did, so replace message with the translated version
109 109
 				$message = $translated_message;
Please login to merge, or discard this patch.
exception/invalid_argument.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 class unexpected_value extends base
16 16
 {
17 17
 	/**
18
-	* Translate this exception
19
-	*
20
-	* @param \phpbb\user $user
21
-	* @return array|string
22
-	* @access public
23
-	*/
18
+	 * Translate this exception
19
+	 *
20
+	 * @param \phpbb\user $user
21
+	 * @return array|string
22
+	 * @access public
23
+	 */
24 24
 	public function get_message(\phpbb\user $user)
25 25
 	{
26 26
 		return $this->translate_portions($user, $this->message_full, 'EXCEPTION_UNEXPECTED_VALUE');
Please login to merge, or discard this patch.
cron/blocks_cleanup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	private function clean_styles()
93 93
 	{
94
-		$routes_ary	= $this->manager->get_routes_per_style();
95
-		$style_ids	= $this->get_style_ids();
94
+		$routes_ary = $this->manager->get_routes_per_style();
95
+		$style_ids = $this->get_style_ids();
96 96
 
97 97
 		$routes = array();
98 98
 		foreach ($routes_ary as $style_id => $style_routes)
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
 		foreach ($routes as $route => $row)
124 124
 		{
125
-			$url = $board_url . '/' . (($row['ext_name']) ? 'app.php' : '') . $row['route'];
125
+			$url = $board_url.'/'.(($row['ext_name']) ? 'app.php' : '').$row['route'];
126 126
 
127 127
 			// Route no longer exists => remove all blocks for route
128 128
 			if ($this->url_checker->exists($url) !== true)
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
 		if (sizeof($block_ids))
187 187
 		{
188
-			$this->db->sql_query('DELETE FROM ' . $this->cblocks_table . ' WHERE ' . $this->db->sql_in_set('block_id', $block_ids));
188
+			$this->db->sql_query('DELETE FROM '.$this->cblocks_table.' WHERE '.$this->db->sql_in_set('block_id', $block_ids));
189 189
 		}
190 190
 	}
191 191
 
Please login to merge, or discard this patch.