Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3.009 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | 1 | public function handle() |
|
19 | { |
||
20 | 1 | $sent = 0; |
|
21 | 1 | $batchCount = 1; |
|
22 | 1 | while ($sent < 10) { |
|
23 | 1 | $sentEmails = $this->sendBatch($batchCount); |
|
24 | 1 | if ($sentEmails === false) { |
|
25 | 1 | return $sent; |
|
26 | } |
||
27 | 1 | $sent += $this->sendBatch($batchCount); |
|
28 | 1 | $batchCount++; |
|
29 | } |
||
30 | return $sent; |
||
31 | } |
||
85 |
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.