Code Duplication    Length = 5-6 lines in 2 locations

src/Display/Display.php 2 locations

@@ 179-184 (lines=6) @@
176
            return $this->extensions->get($method);
177
        }
178
179
        if (starts_with($name, 'set') && $this->extensions->has($method)) {
180
            $extension = $this->extensions->get($method);
181
            call_user_func_array([$extension, 'set'], $parameters);
182
183
            return $this;
184
        }
185
186
        if (starts_with($name, 'add') && $this->extensions->has(str_plural($method))) {
187
            $extension = $this->extensions->get(str_plural($method));
@@ 186-190 (lines=5) @@
183
            return $this;
184
        }
185
186
        if (starts_with($name, 'add') && $this->extensions->has(str_plural($method))) {
187
            $extension = $this->extensions->get(str_plural($method));
188
            call_user_func_array([$extension, 'add'], $parameters);
189
190
            return $this;
191
        }
192
193
        throw new \BadMethodCallException("Call to undefined method [{$name}]");