| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 118 | 2 | protected function isPrimeNumber($number) { |
|
| 119 | 2 | $n = abs($number); |
|
| 120 | 2 | $i = 2; |
|
| 121 | |||
| 122 | 2 | while ($i <= sqrt($n)) { |
|
| 123 | 2 | if ($n % $i == 0) { |
|
| 124 | 2 | return FALSE; |
|
|
1 ignored issue
–
show
|
|||
| 125 | } |
||
| 126 | 2 | $i++; |
|
| 127 | 2 | } |
|
| 128 | |||
| 129 | 2 | return TRUE; |
|
| 130 | } |
||
| 131 | |||
| 147 |