| Conditions | 4 |
| Paths | 6 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 13 | 1 | public function chunkCount() : int |
|
| 14 | { |
||
| 15 | 1 | $length = $this->length(); |
|
| 16 | 1 | $lengthThreshold = $this->isGsm7() ? 160 : 70; |
|
| 17 | |||
| 18 | 1 | if ($length > $lengthThreshold) { |
|
| 19 | 1 | $chunkDivisor = $this->isGsm7() ? 153 : 67; |
|
| 20 | 1 | return (int)ceil($length / $chunkDivisor); |
|
| 21 | } |
||
| 22 | |||
| 23 | 1 | return 1; |
|
| 24 | } |
||
| 25 | |||
| 55 |