| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 5.1971 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 3 | public function performConversions(ConversionCollection $conversions, Media $media) |
|
| 44 | { |
||
| 45 | 3 | if ($conversions->isEmpty()) { |
|
| 46 | 3 | return; |
|
| 47 | } |
||
| 48 | |||
| 49 | $i = 0; |
||
| 50 | foreach ($conversions as $conversion) { |
||
| 51 | $this->performConversion($media, $conversion); |
||
| 52 | $i++; |
||
| 53 | } |
||
| 54 | |||
| 55 | return $i; |
||
| 56 | } |
||
| 79 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: