| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 13 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 12 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 28 | public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars): int | ||
| 29 |     { | ||
| 30 | $strlen = strlen($string); | ||
| 31 | $ignoredChars = ''; | ||
| 32 |         for ($i = 0; $i < $strlen; ++$i) { | ||
| 33 |             if ($string[$i] > "\x07F") { | ||
| 34 | // Invalid char | ||
| 35 | $currentMap[$i + $startOffset] = $string[$i]; | ||
| 36 | } | ||
| 37 | } | ||
| 38 | |||
| 39 | return $strlen; | ||
| 40 | } | ||
| 41 | |||
| 91 | 
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.