Code Duplication    Length = 11-11 lines in 2 locations

Form/ChoiceLoader/LdapObjectChoiceLoader.php 2 locations

@@ 80-90 (lines=11) @@
77
    /**
78
     * {@inheritdoc}
79
     */
80
    public function loadValuesForChoices(array $choices, $value = null)
81
    {
82
        if (empty(array_filter($choices))) {
83
            return [];
84
        }
85
        if (!$this->choiceList) {
86
            return $this->getLdapValuesForChoices(...$choices);
87
        }
88
89
        return $this->loadChoiceList($value)->getValuesForChoices($choices);
90
    }
91
92
    /**
93
     * {@inheritdoc}
@@ 95-105 (lines=11) @@
92
    /**
93
     * {@inheritdoc}
94
     */
95
    public function loadChoicesForValues(array $values, $value = null)
96
    {
97
        if (empty(array_filter($values))) {
98
            return [];
99
        }
100
        if (!$this->choiceList) {
101
            $this->loadChoiceList($value);
102
        }
103
104
        return $this->choiceList->getChoicesForValues($values);
105
    }
106
}
107