Completed
Push — develop ( 5e581d...39a76d )
by Daniel
05:39
created
services/views/driver/base_view.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 		$update_count = array();
127 127
 		foreach ($posts_data as $topic_id => $posts)
128 128
 		{
129
-			$post_data	= array_shift($posts);
130
-			$topic_data	= $topics_data[$topic_id];
129
+			$post_data = array_shift($posts);
130
+			$topic_data = $topics_data[$topic_id];
131 131
 
132 132
 			$this->template->assign_block_vars('topicrow', array_merge(
133 133
 				$this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info),
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
 		$this->pagination->generate_template_pagination(
234 234
 			array(
235 235
 				'routes' => array(
236
-					'blitze_content_' . $route,
237
-					'blitze_content_' . $route . '_page',
236
+					'blitze_content_'.$route,
237
+					'blitze_content_'.$route.'_page',
238 238
 				),
239 239
 				'params' => $params,
240 240
 			),
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 				->fetch_forum($topic_data['forum_id'])
308 308
 				->fetch_topic_poster($topic_data['topic_poster'])
309 309
 				->fetch_custom(array(
310
-					'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id'])
310
+					'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id'])
311 311
 				))->build(true, true, false);
312 312
 
313 313
 			$topics_data = $this->forum->get_topic_data(5);
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 * @param \blitze\sitemaker\services\forum\data		$forum				Forum Data object
47 47
 	 * @param \blitze\content\services\helper			$helper				Content helper object
48 48
 	 * @param \blitze\content\services\quickmod			$quickmod			Quick moderator tools
49
-	*/
49
+	 */
50 50
 	public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod)
51 51
 	{
52 52
 		$this->phpbb_dispatcher = $phpbb_dispatcher;
@@ -157,14 +157,14 @@  discard block
 block discarded – undo
157 157
 		return $this->display_topic($topic_id, $entity, $update_count, $topic_data_overwrite);
158 158
 	}
159 159
 
160
-    /**
161
-     * @param int $topic_id
162
-     * @param \blitze\content\model\entity\type $entity
163
-     * @param array $update_count
164
-     * @param array $topic_data_overwrite
165
-     * @return array
166
-     * @throws \Exception
167
-     */
160
+	/**
161
+	 * @param int $topic_id
162
+	 * @param \blitze\content\model\entity\type $entity
163
+	 * @param array $update_count
164
+	 * @param array $topic_data_overwrite
165
+	 * @return array
166
+	 * @throws \Exception
167
+	 */
168 168
 	protected function display_topic($topic_id, \blitze\content\model\entity\type $entity, array &$update_count, array $topic_data_overwrite)
169 169
 	{
170 170
 		$forum_id = $entity->get_forum_id();
Please login to merge, or discard this patch.
services/views/driver/tiles.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	 * @param \blitze\content\services\helper			$helper				Content helper object
27 27
 	 * @param \blitze\content\services\quickmod			$quickmod			Quick moderator tools
28 28
 	 * @param \phpbb\request\request_interface			$request			Request object
29
-	*/
29
+	 */
30 30
 	public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod, \phpbb\request\request_interface $request)
31 31
 	{
32 32
 		parent::__construct($phpbb_dispatcher, $language, $pagination, $template, $fields, $forum, $helper, $quickmod);
Please login to merge, or discard this patch.
controller/main_controller.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		else
137 137
 		{
138 138
 			$template_file = 'views/print.html';
139
-			$this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']);
139
+			$this->template->assign_var('TOPIC_URL', generate_board_url(true).$topic_data['topic_url']);
140 140
 		}
141 141
 
142 142
 		return $this->helper->render($template_file, $topic_data['topic_title']);
@@ -184,15 +184,15 @@  discard block
 block discarded – undo
184 184
 	{
185 185
 		if (!$this->user->data['is_bot'] && !$this->request->is_set('page'))
186 186
 		{
187
-			$sql = 'UPDATE ' . TOPICS_TABLE . '
188
-				SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
187
+			$sql = 'UPDATE '.TOPICS_TABLE.'
188
+				SET topic_views = topic_views + 1, topic_last_view_time = ' . time()."
189 189
 				WHERE topic_id = $topic_id";
190 190
 			$this->db->sql_query($sql);
191 191
 
192 192
 			// Update the attachment download counts
193 193
 			if (sizeof($update_count))
194 194
 			{
195
-				$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
195
+				$sql = 'UPDATE '.ATTACHMENTS_TABLE.'
196 196
 					SET download_count = download_count + 1
197 197
 					WHERE ' . $this->db->sql_in_set('attach_id', array_unique($update_count));
198 198
 				$this->db->sql_query($sql);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,8 +132,7 @@
 block discarded – undo
132 132
 		{
133 133
 			$this->update_views($topic_id, $update_count);
134 134
 			$template_file = $view_handler->get_detail_template();
135
-		}
136
-		else
135
+		} else
137 136
 		{
138 137
 			$template_file = 'views/print.html';
139 138
 			$this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']);
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @param \blitze\content\services\poll							$poll				Poll object
51 51
 	 * @param \blitze\content\services\types						$content_types		Content types object
52 52
 	 * @param \blitze\content\services\views\views_factory			$views_factory		Views handlers
53
-	*/
53
+	 */
54 54
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\comments\comments_interface $comments, \blitze\content\services\poll $poll, \blitze\content\services\types $content_types, \blitze\content\services\views\views_factory $views_factory)
55 55
 	{
56 56
 		$this->db = $db;
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function filter($filter_type, $filter_value, $page)
97 97
 	{
98
-        /** @var \blitze\content\services\views\driver\portal $view_handler */
99
-        $view_handler = $this->views_factory->get('blitze.content.view.portal');
98
+		/** @var \blitze\content\services\views\driver\portal $view_handler */
99
+		$view_handler = $this->views_factory->get('blitze.content.view.portal');
100 100
 		$view_handler->render_filter($filter_type, $filter_value, $page);
101 101
 
102 102
 		return $this->helper->render($view_handler->get_index_template());
Please login to merge, or discard this patch.
event/bbcodes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		// Let's create the new BBCode
43 43
 		$configurator->BBCodes->addCustom(
44 44
 			'[pagebreak title={SIMPLETEXT;optional;postFilter=ucwords}]',
45
-			'<p><!-- pagebreak --></p>' .
45
+			'<p><!-- pagebreak --></p>'.
46 46
 			'<xsl:if test="@title"><h4>{SIMPLETEXT}</h4><br /></xsl:if>'
47 47
 		);
48 48
 	}
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 		// Let's create the new BBCode
64 64
 		$configurator->BBCodes->addCustom(
65 65
 			'[tag={IDENTIFIER}]{TEXT}[/tag]',
66
-			"<!-- begin field -->\n" .
67
-			"<div data-field=\"{IDENTIFIER}\">{TEXT}</div><br />\n" .
66
+			"<!-- begin field -->\n".
67
+			"<div data-field=\"{IDENTIFIER}\">{TEXT}</div><br />\n".
68 68
 			"<!-- end field -->\n"
69 69
 		);
70 70
 	}
Please login to merge, or discard this patch.
services/fields.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$this->display_mode = $view_mode;
98 98
 		$this->content_type = $entity->get_content_name();
99
-		$this->tpl_name	= ($custom_tpl) ? $this->content_type . '_' . $view_mode : '';
99
+		$this->tpl_name = ($custom_tpl) ? $this->content_type.'_'.$view_mode : '';
100 100
 		$this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary';
101 101
 		$this->form_fields = array_intersect_key($this->fields_factory->get_all(), array_flip($view_mode_fields));
102 102
 		$this->db_fields = $db_fields;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	public function show($type, array $topic_data, array $post_data, array $users_cache, array &$attachments, array &$update_count, array $topic_tracking_info, array $topic_data_overwrite = array(), $mode = '')
119 119
 	{
120
-		$callable = 'get_' . $this->view_mode . '_template_data';
120
+		$callable = 'get_'.$this->view_mode.'_template_data';
121 121
 		$tpl_data = array_merge(array(
122 122
 				'TOPIC_COMMENTS'	=> $this->comments->count($topic_data),
123 123
 				'S_USER_LOGGED_IN'	=> $this->user->data['is_registered'],
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
 			$field_data['field_props'] = array_replace_recursive($this->form_fields[$field_type]->get_default_props(), $field_data['field_props']);
186 186
 			$field_data['field_value'] = &$field_values[$field_name];
187 187
 
188
-			$field_contents	= $this->form_fields[$field_type]->display_field($field_data, $this->display_mode, $tpl_data, $this->content_type);
188
+			$field_contents = $this->form_fields[$field_type]->display_field($field_data, $this->display_mode, $tpl_data, $this->content_type);
189 189
 
190 190
 			// this essentially hides other fields if the field returns an array
191 191
 			if (is_array($field_contents))
192 192
 			{
193 193
 				$display_data['all'] = $field_contents;
194
-				$display_data[$field_data['field_' . $this->view_mode . '_show']] = $field_contents;
194
+				$display_data[$field_data['field_'.$this->view_mode.'_show']] = $field_contents;
195 195
 				break;
196 196
 			}
197 197
 
198 198
 			if (!empty($field_contents))
199 199
 			{
200
-				$field = '<div class="field-label ' . $this->label[$field_data['field_' . $this->view_mode . '_ldisp']] . '">' . $field_data['field_label'] . $this->language->lang('COLON') . ' </div>' . $field_contents;
200
+				$field = '<div class="field-label '.$this->label[$field_data['field_'.$this->view_mode.'_ldisp']].'">'.$field_data['field_label'].$this->language->lang('COLON').' </div>'.$field_contents;
201 201
 				$display_data['all'][$field_name] = $field;
202
-				$display_data[$field_data['field_' . $this->view_mode . '_show']][$field_name] = $field;
202
+				$display_data[$field_data['field_'.$this->view_mode.'_show']][$field_name] = $field;
203 203
 			}
204 204
 		}
205 205
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,8 +142,7 @@
 block discarded – undo
142 142
 			$this->template->assign_vars(array_change_key_case(array_merge($tpl_data, $fields_data['all']), CASE_UPPER));
143 143
 			$this->template->set_filenames(array('content' => $this->tpl_name));
144 144
 			$tpl_data['CUSTOM_DISPLAY'] = $this->template->assign_display('content');
145
-		}
146
-		else
145
+		} else
147 146
 		{
148 147
 			$tpl_data['FIELDS'] = $fields_data;
149 148
 		}
Please login to merge, or discard this patch.
services/form/field/textarea.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	{
100 100
 		$toc_pattern = '(<h4>(.*?)</h4>)?';
101 101
 		$pages_pattern = '<p><!-- pagebreak --></p>';
102
-		$split_pattern = $pages_pattern . (($view_mode !== 'detail') ? $toc_pattern : '');
102
+		$split_pattern = $pages_pattern.(($view_mode !== 'detail') ? $toc_pattern : '');
103 103
 
104
-		$pages = array_filter(preg_split('#' . $split_pattern . '#s', $data['field_value']));
104
+		$pages = array_filter(preg_split('#'.$split_pattern.'#s', $data['field_value']));
105 105
 
106 106
 		if ($view_mode !== 'detail')
107 107
 		{
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		}
110 110
 
111 111
 		// get page titles to generate TOC
112
-		preg_match_all('#' . $pages_pattern . $toc_pattern . '#s', $data['field_value'], $matches);
112
+		preg_match_all('#'.$pages_pattern.$toc_pattern.'#s', $data['field_value'], $matches);
113 113
 
114 114
 		return $this->get_detail_value($pages, $matches[2], $data);
115 115
 	}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 			$asset_path = $this->util->get_web_path();
125 125
 			$this->util->add_assets(array(
126 126
 				'js'   => array(
127
-					$asset_path . 'assets/javascript/editor.js',
127
+					$asset_path.'assets/javascript/editor.js',
128 128
 					'@blitze_content/assets/form/textarea.min.js'
129 129
 				)
130 130
 			));
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 				$this->template->assign_block_vars('toc', array(
233 233
 					'TITLE'		=> ($title) ? $title : $this->language->lang('CONTENT_TOC_UNTITLED'),
234 234
 					'S_PAGE'	=> ($page === $start),
235
-					'U_VIEW'	=> append_sid($topic_url, ($page) ? 'page=' . $page : false),
235
+					'U_VIEW'	=> append_sid($topic_url, ($page) ? 'page='.$page : false),
236 236
 				));
237 237
 			}
238 238
 		}
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 		// Assigning custom bbcodes
283 283
 		if (!function_exists('display_custom_bbcodes'))
284 284
 		{
285
-			include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext);
285
+			include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext);
286 286
 		}
287 287
 
288 288
 		display_custom_bbcodes();
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -238,14 +238,14 @@
 block discarded – undo
238 238
 		}
239 239
 	}
240 240
 
241
-    /**
242
-     * When Previewing topic, we show all pages
243
-     *
244
-     * @param int $start
245
-     * @param string $field_name
246
-     * @param array $pages
247
-     * @return mixed
248
-     */
241
+	/**
242
+	 * When Previewing topic, we show all pages
243
+	 *
244
+	 * @param int $start
245
+	 * @param string $field_name
246
+	 * @param array $pages
247
+	 * @return mixed
248
+	 */
249 249
 	protected function get_page_content($start, $field_name, array $pages)
250 250
 	{
251 251
 		$value = trim($pages[$start]);
Please login to merge, or discard this patch.
services/views/driver/portal.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 			$this->template->assign_vars($entity->to_array());
119 119
 			foreach ($posts_data as $topic_id => $post_data)
120 120
 			{
121
-				$topic_data	= $topics_data[$topic_id];
121
+				$topic_data = $topics_data[$topic_id];
122 122
 				$topic = $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info);
123 123
 
124 124
 				$this->template->assign_block_vars('topicrow', $topic);
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -65,6 +65,9 @@
 block discarded – undo
65 65
 
66 66
 	/**
67 67
 	 * {@inheritdoc}
68
+	 * @param string $filter_type
69
+	 * @param string $filter_value
70
+	 * @param integer $page
68 71
 	 */
69 72
 	public function render_filter($filter_type, $filter_value, $page)
70 73
 	{
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * @param \blitze\content\services\quickmod			$quickmod			Quick moderator tools
31 31
 	 * @param \phpbb\config\config						$config				Config object
32 32
 	 * @param \blitze\content\services\types			$content_types		Content types object
33
-	*/
33
+	 */
34 34
 	public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod, \phpbb\config\config $config, \blitze\content\services\types $content_types)
35 35
 	{
36 36
 		parent::__construct($phpbb_dispatcher, $language, $pagination, $template, $fields, $forum, $helper, $quickmod);
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
 		}
96 96
 	}
97 97
 
98
-    /**
99
-     * @param array $forums_data
100
-     * @param array $topics_data
101
-     * @param array $users_cache
102
-     * @return void
103
-     */
98
+	/**
99
+	 * @param array $forums_data
100
+	 * @param array $topics_data
101
+	 * @param array $users_cache
102
+	 * @return void
103
+	 */
104 104
 	protected function display_filtered_topics(array $forums_data, array $topics_data, array $users_cache)
105 105
 	{
106 106
 		$update_count = array();
Please login to merge, or discard this patch.
blocks/archive.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 				'count'	=> $row['total'],
80 80
 				'url'	=> $this->helper->route($route_name, $route_params + array(
81 81
 					'filter_type'	=> 'archive',
82
-					'filter_value'	=> $row['year'] . '-' . $row['month'],
82
+					'filter_value'	=> $row['year'].'-'.$row['month'],
83 83
 				)),
84 84
 			);
85 85
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,8 +106,7 @@
 block discarded – undo
106 106
 				'route_name'	=> 'blitze_content_index',
107 107
 				'route_params'	=> array('type' => $this->content_types->get_forum_type($settings['forum_id'])),
108 108
 			);
109
-		}
110
-		else
109
+		} else
111 110
 		{
112 111
 			return array(
113 112
 				'forum_ids'		=> array_keys($this->content_types->get_forum_types()),
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 		$content_type_options = array('' => 'CONTENT_TYPE_ANY');
147 147
 		foreach ($content_types as $type => $entity)
148 148
 		{
149
-		    /** @var \blitze\content\model\entity\type $entity */
149
+			/** @var \blitze\content\model\entity\type $entity */
150 150
 			$content_type_options[$entity->get_forum_id()] = $entity->get_content_langname();
151 151
 		}
152 152
 
Please login to merge, or discard this patch.
services/comments/comments_interface.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 
12 12
 interface comments_interface
13 13
 {
14
-    /**
15
-     * Get comments count for topic
16
-     * @param array $topic_data
17
-     * @return
18
-     */
14
+	/**
15
+	 * Get comments count for topic
16
+	 * @param array $topic_data
17
+	 * @return
18
+	 */
19 19
 	public function count(array $topic_data);
20 20
 
21 21
 	/**
Please login to merge, or discard this patch.