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 = 20-21 lines in 2 locations

Form/FacetChoiceLoader.php 2 locations

@@ 39-58 (lines=20) @@
36
	 *
37
	 * @see \Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface::loadValuesForChoices()
38
	 */
39
	public function loadValuesForChoices(array $choices, $value = null) {
40
		// is called on form creat with $choices containing the preset of the bound entity
41
		$values = array();
42
		foreach($choices as $key => $choice) {
43
			// we use a DataTransformer, thus only plain values arrive as choices which can be used directly as value
44
			if(is_callable($value)) {
45
				$values[$key] = (string)call_user_func($value, $choice, $key);
46
			} else {
47
				$values[$key] = $choice;
48
			}
49
		}
50
		
51
		// this has to be done by yourself: array( label => value )
52
		// $labeledValues = MyLabelService::getLabels($values);
53
		
54
		// // create internal choice list from loaded values
55
		// $this->choiceList = new ArrayChoiceList($labeledValues, $value);
56
		
57
		return $values;
58
	}
59
60
	/**
61
	 *
@@ 85-105 (lines=21) @@
82
	 * @see \Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface::loadChoicesForValues()
83
	 *
84
	 */
85
	public function loadChoicesForValues(array $values, $value = null) {
86
		// is called on form submit after loadValuesForChoices of form create and loadChoiceList of form view create
87
		$choices = array();
88
		foreach($values as $key => $val) {
89
			// we use a DataTransformer, thus only plain values arrive as choices which can be used directly as value
90
			if(is_callable($value)) {
91
				$choices[$key] = (string)call_user_func($value, $val, $key);
92
			} else {
93
				$choices[$key] = $val;
94
			}
95
		}
96
		
97
// 		dump($values);
98
		// this has to be done by yourself: array( label => value )
99
		// $labeledValues = MyLabelService::getLabels($values);
100
		
101
		// // reset internal choice list
102
		// $this->choiceList = new ArrayChoiceList($labeledValues, $value);
103
		
104
		return $choices;
105
	}
106
}