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

@@ 787-858 (lines=72) @@
784
785
		// List extra variables (text type only for editor component)
786
		$extra_vars = $xml_doc->component->extra_vars;
787
		if($extra_vars)
788
		{
789
			$extra_var_groups = $extra_vars->group;
790
			if(!$extra_var_groups)
791
			{
792
				$extra_var_groups = $extra_vars;
793
			}
794
			if(!is_array($extra_var_groups))
795
			{
796
				$extra_var_groups = array($extra_var_groups);
797
			}
798
799
			foreach($extra_var_groups as $group)
800
			{
801
				$extra_vars = $group->var;
802
				if(!is_array($group->var))
803
				{
804
					$extra_vars = array($group->var);
805
				}
806
807
				foreach($extra_vars as $key => $val)
808
				{
809
					if(!$val)
810
					{
811
						continue;
812
					}
813
814
					$obj = new stdClass();
815
					if(!$val->attrs)
816
					{
817
						$val->attrs = new stdClass();
818
					}
819
					if(!$val->attrs->type)
820
					{
821
						$val->attrs->type = 'text';
822
					}
823
824
					$obj->group = $group->title->body;
825
					$obj->name = $val->attrs->name;
826
					$obj->title = $val->title->body;
827
					$obj->type = $val->attrs->type;
828
					$obj->description = $val->description->body;
829
					if($obj->name)
830
					{
831
						$obj->value = $extra_vals->{$obj->name};
832
					}
833
					if(strpos($obj->value, '|@|') != FALSE)
834
					{
835
						$obj->value = explode('|@|', $obj->value);
836
					}
837
					if($obj->type == 'mid_list' && !is_array($obj->value))
838
					{
839
						$obj->value = array($obj->value);
840
					}
841
842
					// 'Select'type obtained from the option list.
843
					if($val->options && !is_array($val->options))
844
					{
845
						$val->options = array($val->options);
846
					}
847
848
					for($i = 0, $c = count($val->options); $i < $c; $i++)
849
					{
850
						$obj->options[$i] = new stdClass();
851
						$obj->options[$i]->title = $val->options[$i]->title->body;
852
						$obj->options[$i]->value = $val->options[$i]->attrs->value;
853
					}
854
855
					$component_info->extra_vars->{$obj->name} = $obj;
856
				}
857
			}
858
		}
859
860
		$buff = array();
861
		$buff[] = '<?php if(!defined(\'__XE__\')) exit();';