Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 10 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
41 | private function registerRequirements(Container $container) |
||
42 | { |
||
43 | $container['errorHandler.acceptNegation'] = function () use ($container) { |
||
44 | return new Negotiator(); |
||
45 | }; |
||
46 | |||
47 | $container['errorHandler.contentTypeResolver'] = function () use ($container) { |
||
48 | return new ContentTypeResolver($container['errorHandler.acceptNegation']); |
||
49 | }; |
||
50 | } |
||
51 | } |
||
52 |
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.