| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function resolveConstraints(ArgumentDescriptions $descriptions) |
||
| 15 | { |
||
| 16 | $constraints = []; |
||
| 17 | $types = []; |
||
| 18 | foreach ($descriptions as $description) { |
||
| 19 | if (in_array($description->getType(), $types)) { |
||
| 20 | $constraints[] = new ResolutionConstraint(ResolutionConstraint::STRICT_MATCHING, [ |
||
| 21 | 'type' => $description->getType(), |
||
| 22 | ]); |
||
| 23 | } |
||
| 24 | |||
| 25 | $types[] = $description->getType(); |
||
| 26 | } |
||
| 27 | |||
| 28 | return new ResolutionConstraintCollection($constraints); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |