GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 72-72 lines in 2 locations

modules/addon/addon.admin.model.php 1 location

@@ 237-308 (lines=72) @@
234
			}
235
236
			// Expand the variable order
237
			if($xml_obj->extra_vars)
238
			{
239
				$extra_var_groups = $xml_obj->extra_vars->group;
240
				if(!$extra_var_groups)
241
				{
242
					$extra_var_groups = $xml_obj->extra_vars;
243
				}
244
				if(!is_array($extra_var_groups))
245
				{
246
					$extra_var_groups = array($extra_var_groups);
247
				}
248
249
				foreach($extra_var_groups as $group)
250
				{
251
					$extra_vars = $group->var;
252
					if(!is_array($group->var))
253
					{
254
						$extra_vars = array($group->var);
255
					}
256
257
					foreach($extra_vars as $key => $val)
258
					{
259
						if(!$val)
260
						{
261
							continue;
262
						}
263
264
						$obj = new stdClass();
265
						if(!$val->attrs)
266
						{
267
							$val->attrs = new stdClass();
268
						}
269
						if(!$val->attrs->type)
270
						{
271
							$val->attrs->type = 'text';
272
						}
273
274
						$obj->group = $group->title->body;
275
						$obj->name = $val->attrs->name;
276
						$obj->title = $val->title->body;
277
						$obj->type = $val->attrs->type;
278
						$obj->description = $val->description->body;
279
						if($obj->name)
280
						{
281
							$obj->value = $extra_vals->{$obj->name};
282
						}
283
						if(strpos($obj->value, '|@|') != FALSE)
284
						{
285
							$obj->value = explode('|@|', $obj->value);
286
						}
287
						if($obj->type == 'mid_list' && !is_array($obj->value))
288
						{
289
							$obj->value = array($obj->value);
290
						}
291
292
						// 'Select'type obtained from the option list.
293
						if($val->options && !is_array($val->options))
294
						{
295
							$val->options = array($val->options);
296
						}
297
298
						for($i = 0, $c = count($val->options); $i < $c; $i++)
299
						{
300
							$obj->options[$i] = new stdClass();
301
							$obj->options[$i]->title = $val->options[$i]->title->body;
302
							$obj->options[$i]->value = $val->options[$i]->attrs->value;
303
						}
304
305
						$addon_info->extra_vars[] = $obj;
306
					}
307
				}
308
			}
309
		}
310
		else
311
		{

modules/editor/editor.model.php 1 location

@@ 820-891 (lines=72) @@
817
818
		// List extra variables (text type only for editor component)
819
		$extra_vars = $xml_doc->component->extra_vars;
820
		if($extra_vars)
821
		{
822
			$extra_var_groups = $extra_vars->group;
823
			if(!$extra_var_groups)
824
			{
825
				$extra_var_groups = $extra_vars;
826
			}
827
			if(!is_array($extra_var_groups))
828
			{
829
				$extra_var_groups = array($extra_var_groups);
830
			}
831
832
			foreach($extra_var_groups as $group)
833
			{
834
				$extra_vars = $group->var;
835
				if(!is_array($group->var))
836
				{
837
					$extra_vars = array($group->var);
838
				}
839
840
				foreach($extra_vars as $key => $val)
841
				{
842
					if(!$val)
843
					{
844
						continue;
845
					}
846
847
					$obj = new stdClass();
848
					if(!$val->attrs)
849
					{
850
						$val->attrs = new stdClass();
851
					}
852
					if(!$val->attrs->type)
853
					{
854
						$val->attrs->type = 'text';
855
					}
856
857
					$obj->group = $group->title->body;
858
					$obj->name = $val->attrs->name;
859
					$obj->title = $val->title->body;
860
					$obj->type = $val->attrs->type;
861
					$obj->description = $val->description->body;
862
					if($obj->name)
863
					{
864
						$obj->value = $extra_vals->{$obj->name};
865
					}
866
					if(strpos($obj->value, '|@|') != FALSE)
867
					{
868
						$obj->value = explode('|@|', $obj->value);
869
					}
870
					if($obj->type == 'mid_list' && !is_array($obj->value))
871
					{
872
						$obj->value = array($obj->value);
873
					}
874
875
					// 'Select'type obtained from the option list.
876
					if($val->options && !is_array($val->options))
877
					{
878
						$val->options = array($val->options);
879
					}
880
881
					for($i = 0, $c = count($val->options); $i < $c; $i++)
882
					{
883
						$obj->options[$i] = new stdClass();
884
						$obj->options[$i]->title = $val->options[$i]->title->body;
885
						$obj->options[$i]->value = $val->options[$i]->attrs->value;
886
					}
887
888
					$component_info->extra_vars->{$obj->name} = $obj;
889
				}
890
			}
891
		}
892
893
		$buff = array();
894
		$buff[] = '<?php if(!defined(\'__XE__\')) exit();';