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