1 | <?php |
||
24 | class Queue extends AbstractQueue |
||
|
|||
25 | { |
||
26 | use ElementTypeProperty; |
||
27 | use OptionsProperty; |
||
28 | |||
29 | /** |
||
30 | * Generic collection |
||
31 | * |
||
32 | * example: `new Collection(Foo::class, [new Foo(), new Foo()]` |
||
33 | * |
||
34 | * @param string $elementType |
||
35 | * @param array $elements |
||
36 | * @param int $options |
||
37 | */ |
||
38 | 8 | public function __construct($elementType, array $elements = [], $options = 0) |
|
45 | } |
||
46 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.