Completed
Push — develop ( da46c8...85331c )
by Daniel
07:12
created
services/actions/type/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 	 * @param string								$phpbb_root_path		Path to the phpbb includes directory.
45 45
 	 * @param string								$relative_admin_path	Relative admin root path
46 46
 	 * @param string								$php_ext				php file extension
47
-	*/
47
+	 */
48 48
 	public function __construct(\phpbb\controller\helper $controller_helper, \phpbb\language\language $language, \phpbb\template\template $template, \blitze\content\services\types $content_types, $phpbb_root_path, $relative_admin_path, $php_ext)
49 49
 	{
50 50
 		$this->controller_helper = $controller_helper;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		$this->template = $template;
53 53
 		$this->content_types = $content_types;
54 54
 		$this->phpbb_root_path = $phpbb_root_path;
55
-		$this->phpbb_admin_path = $this->phpbb_root_path . $relative_admin_path;
55
+		$this->phpbb_admin_path = $this->phpbb_root_path.$relative_admin_path;
56 56
 		$this->php_ext = $php_ext;
57 57
 	}
58 58
 
@@ -76,19 +76,19 @@  discard block
 block discarded – undo
76 76
 
77 77
 				'S_ENABLED'		=> $entity->get_content_enabled(),
78 78
 
79
-				'U_DELETE'		=> $u_action . '&do=pre_delete&type=' . $type,
80
-				'U_EDIT'		=> $u_action . '&do=edit&type=' . $type,
81
-				'U_STATUS'		=> $u_action . '&do=toggle_status&type=' . $type,
79
+				'U_DELETE'		=> $u_action.'&do=pre_delete&type='.$type,
80
+				'U_EDIT'		=> $u_action.'&do=edit&type='.$type,
81
+				'U_STATUS'		=> $u_action.'&do=toggle_status&type='.$type,
82 82
 				'U_VIEW'		=> $this->controller_helper->route('blitze_content_index', array('type' => $type)),
83
-				'U_POST'		=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, "i=-blitze-content-ucp-content_module&mode=content&action=post&type={$type}"),
84
-				'U_GROUP_PERMS'	=> append_sid("{$this->phpbb_admin_path}index." . $this->php_ext, "i=acp_permissions&mode=setting_group_global"),
85
-				'U_FORUM_PERMS'	=> append_sid("{$this->phpbb_admin_path}index." . $this->php_ext, "i=acp_permissions&mode=setting_forum_local&forum_id[]=$forum_id"),
83
+				'U_POST'		=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, "i=-blitze-content-ucp-content_module&mode=content&action=post&type={$type}"),
84
+				'U_GROUP_PERMS'	=> append_sid("{$this->phpbb_admin_path}index.".$this->php_ext, "i=acp_permissions&mode=setting_group_global"),
85
+				'U_FORUM_PERMS'	=> append_sid("{$this->phpbb_admin_path}index.".$this->php_ext, "i=acp_permissions&mode=setting_forum_local&forum_id[]=$forum_id"),
86 86
 			);
87 87
 		}
88 88
 
89 89
 		$this->template->assign_vars(array(
90 90
 			'TYPES'			=> $types_list,
91
-			'U_ADD_TYPE'	=> $u_action . "&do=add",
91
+			'U_ADD_TYPE'	=> $u_action."&do=add",
92 92
 		));
93 93
 	}
94 94
 }
Please login to merge, or discard this patch.
services/actions/type/save.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	 * @param string									$phpbb_admin_path       Relative admin root path
63 63
 	 * @param string									$php_ext				php file extension
64 64
 	 * @param boolean									$auto_refresh			Used for testing
65
-	*/
65
+	 */
66 66
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request_interface $request, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $mapper_factory, $phpbb_admin_path, $php_ext, $auto_refresh = true)
67 67
 	{
68 68
 		$this->auth = $auth;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * @param \blitze\content\model\entity\type $unsaved_entity
109 109
 	 * @return void
110 110
 	 */
111
-	protected function handle_content_type($type, \blitze\content\model\entity\type &$unsaved_entity)
111
+	protected function handle_content_type($type, \blitze\content\model\entity\type & $unsaved_entity)
112 112
 	{
113 113
 		$forum_perm_from = $this->request->variable('copy_forum_perm', 0);
114 114
 
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 	{
188 188
 		if (!$type)
189 189
 		{
190
-			$u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $forum_id, true);
191
-			$message = $this->language->lang('CONTENT_TYPE_CREATED', '<a href="' . $u_set_permission . '">', '</a>');
190
+			$u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]='.$forum_id, true);
191
+			$message = $this->language->lang('CONTENT_TYPE_CREATED', '<a href="'.$u_set_permission.'">', '</a>');
192 192
 		}
193 193
 		else
194 194
 		{
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 		if ($old_langname !== $new_langname)
238 238
 		{
239 239
 			$forum_name = $this->language->lang($new_langname);
240
-			$sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_name = '" . $this->db->sql_escape($forum_name) . "' WHERE forum_id = " . (int) $forum_id;
240
+			$sql = 'UPDATE '.FORUMS_TABLE." SET forum_name = '".$this->db->sql_escape($forum_name)."' WHERE forum_id = ".(int) $forum_id;
241 241
 			$this->db->sql_query($sql);
242 242
 		}
243 243
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@  discard block
 block discarded – undo
121 121
 			$unsaved_entity->set_content_id($entity->get_content_id());
122 122
 			$this->handle_langname_change($forum_id, $entity->get_content_langname(), $unsaved_entity->get_content_langname());
123 123
 			$this->copy_forum_permissions($forum_id, $forum_perm_from);
124
-		}
125
-		else
124
+		} else
126 125
 		{
127 126
 			$forum_id = $this->create_content_forum($unsaved_entity->get_content_langname(), $forum_perm_from);
128 127
 			$unsaved_entity->set_forum_id($forum_id);
@@ -189,8 +188,7 @@  discard block
 block discarded – undo
189 188
 		{
190 189
 			$u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $forum_id, true);
191 190
 			$message = $this->language->lang('CONTENT_TYPE_CREATED', '<a href="' . $u_set_permission . '">', '</a>');
192
-		}
193
-		else
191
+		} else
194 192
 		{
195 193
 			$this->meta_refresh(3, $u_action);
196 194
 			$message = $this->language->lang('CONTENT_TYPE_UPDATED');
Please login to merge, or discard this patch.
services/actions/type/load_field.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 	 * @param \phpbb\request\request_interface				$request			Request object
30 30
 	 * @param \phpbb\template\template						$template			Template object
31 31
 	 * @param \blitze\content\services\form\fields_factory	$fields_factory		Fields factory  object
32
-	 * @param string										$admin_path			Admin path
32
+	 * @param \blitze\content\services\form\fields_factory										$admin_path			Admin path
33 33
 	 */
34 34
 	public function __construct(\phpbb\request\request_interface $request, \phpbb\template\template $template, \blitze\content\services\form\fields_factory $fields_factory, $admin_path)
35 35
 	{
Please login to merge, or discard this patch.
controller/field_controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 	 */
112 112
 	protected function set_prop($prop, array &$data)
113 113
 	{
114
-		$field_prop = $this->request->variable('field_' . $prop, array('' => array(0 => '')), true);
114
+		$field_prop = $this->request->variable('field_'.$prop, array('' => array(0 => '')), true);
115 115
 
116 116
 		if (null !== ($array = array_pop($field_prop)))
117 117
 		{
Please login to merge, or discard this patch.
model/entity/field.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -168,8 +168,7 @@  discard block
 block discarded – undo
168 168
 		{
169 169
 			$data = generate_text_for_edit($this->field_explain, $this->field_exp_uid, $this->field_exp_options);
170 170
 			return $data['text'];
171
-		}
172
-		else
171
+		} else
173 172
 		{
174 173
 			$parse_flags = ($this->field_exp_bitfield ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
175 174
 			return generate_text_for_display($this->field_explain, $this->field_exp_uid, $this->field_exp_bitfield, $parse_flags);
@@ -186,8 +185,7 @@  discard block
 block discarded – undo
186 185
 		if (!is_array($props))
187 186
 		{
188 187
 			$this->field_props = $props;
189
-		}
190
-		else if (sizeof($props))
188
+		} else if (sizeof($props))
191 189
 		{
192 190
 			$this->field_props = json_encode($props);
193 191
 		}
Please login to merge, or discard this patch.
services/actions/type/add.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			'ITEMS_PER_PAGE'	=> 10,
86 86
 			'TOPICS_PER_GROUP'	=> 4,
87 87
 
88
-			'U_ACTION'			=> $u_action . "&amp;do=save&amp;type=$type",
88
+			'U_ACTION'			=> $u_action."&amp;do=save&amp;type=$type",
89 89
 			'UA_AJAX_URL'		=> $this->controller_helper->route('blitze_content_field_settings', array(), false),
90 90
 
91 91
 			'S_TYPE_OPS'				=> $this->get_field_options(),
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		$options = '';
109 109
 		foreach ($fields as $field => $object)
110 110
 		{
111
-			$options .= '<option value="' . $field . '">' . $this->language->lang($object->get_langname()) . '</option>';
111
+			$options .= '<option value="'.$field.'">'.$this->language->lang($object->get_langname()).'</option>';
112 112
 		}
113 113
 
114 114
 		return $options;
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 	 * @param \blitze\sitemaker\services\auto_lang				$auto_lang				Auto add lang file
56 56
 	 * @param \blitze\content\services\form\fields_factory		$fields_factory			Fields factory  object
57 57
 	 * @param \blitze\content\services\views\views_factory		$views_factory			Views factory object
58
-	*/
58
+	 */
59 59
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\services\views\views_factory $views_factory)
60 60
 	{
61 61
 		$this->auth = $auth;
Please login to merge, or discard this patch.
services/form/field/color.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	public function get_field_value($name, $default)
57 57
 	{
58 58
 		$default = is_array($default) ? $default : explode("\n", $default);
59
-		$value =  $this->request->variable($name, array(0 => ''), true);
59
+		$value = $this->request->variable($name, array(0 => ''), true);
60 60
 
61 61
 		return $value ? $value : $default;
62 62
 	}
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	protected function make_box($color)
104 104
 	{
105
-		$style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: ' . $color;
106
-		return ($color) ? '<div style="' . $style . '" title="' . $color . '"></div>' : '';
105
+		$style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: '.$color;
106
+		return ($color) ? '<div style="'.$style.'" title="'.$color.'"></div>' : '';
107 107
 	}
108 108
 }
Please login to merge, or discard this patch.
services/form/builder.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 	 * @param int $topic_id
95 95
 	 * @param string $mode
96 96
 	 * @param bool $save_draft
97
-	 * @return string|false
97
+	 * @return string|boolean
98 98
 	 */
99 99
 	public function init($forum_id, $topic_id, $mode, $save_draft)
100 100
 	{
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -223,8 +223,7 @@  discard block
 block discarded – undo
223 223
 		if (!$field_data['field_mod_only'] || $this->mode === 'mcp')
224 224
 		{
225 225
 			$this->form->add($field, $field_data['field_type'], $field_data, $topic_id);
226
-		}
227
-		else if (!empty($field_data['field_value']))
226
+		} else if (!empty($field_data['field_value']))
228 227
 		{
229 228
 			$this->form->add($field, 'hidden', $field_data, $topic_id);
230 229
 		}
@@ -271,8 +270,7 @@  discard block
 block discarded – undo
271 270
 			{
272 271
 				$data['force_approved_state'] = $force_status;
273 272
 			}
274
-		}
275
-		else
273
+		} else
276 274
 		{
277 275
 			if ($this->force_state())
278 276
 			{
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		foreach ($fields_data as $field => $value)
141 141
 		{
142 142
 			$value = is_array($value) ? join("\n", $value) : $value;
143
-			$message .= '[tag=' . $field . ']' . $value . '[/tag]';
143
+			$message .= '[tag='.$field.']'.$value.'[/tag]';
144 144
 		}
145 145
 
146 146
 		return $message;
@@ -192,13 +192,13 @@  discard block
 block discarded – undo
192 192
 		$text = '';
193 193
 		if ($entity = $this->types->get_type($content_type))
194 194
 		{
195
-			$get_tags = 'get_' . $view . '_tags';
196
-			$get_template = 'get_' . $view . '_tpl';
195
+			$get_tags = 'get_'.$view.'_tags';
196
+			$get_template = 'get_'.$view.'_tpl';
197 197
 	
198 198
 			$this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$get_tags(), $entity->$get_template(), $view);
199 199
 			$content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER));
200 200
 	
201
-			$text =  $content['SEQ_DISPLAY'] ?: $content['CUSTOM_DISPLAY'];
201
+			$text = $content['SEQ_DISPLAY'] ?: $content['CUSTOM_DISPLAY'];
202 202
 		}
203 203
 		return $text;
204 204
 	}
Please login to merge, or discard this patch.
services/form/field/range.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 	}
94 94
 
95 95
 	/**
96
-	 * @param string $values
96
+	 * @param string $value
97 97
 	 * @return array
98 98
 	 */
99 99
 	protected function get_range($value)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 			),
69 69
 			'css'   => array(
70 70
 				'@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.min.css',
71
-				'@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.' . $data['field_props']['theme'] . '.min.css',
71
+				'@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.'.$data['field_props']['theme'].'.min.css',
72 72
 			)
73 73
 		));
74 74
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			array_walk($range, array($this, 'set_prefix'), $data['field_props']['prefix']);
90 90
 		}
91 91
 
92
-		return join($range, ' - ') . $data['field_props']['postfix'];
92
+		return join($range, ' - ').$data['field_props']['postfix'];
93 93
 	}
94 94
 
95 95
 	/**
@@ -129,6 +129,6 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	protected function set_prefix(&$item, $key, $prefix)
131 131
 	{
132
-		$item = $prefix . $item;
132
+		$item = $prefix.$item;
133 133
 	}
134 134
 }
Please login to merge, or discard this patch.