| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class LineAndOffset |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * When spellcheckers only gives the offset position of a word from the first character of the whole text |
||
| 14 | * and not from the first character of the word's line, this function helps computing it anyway. |
||
| 15 | * |
||
| 16 | * @return array(int,int) Line number as the first element and offset from beginning of line as second element |
||
| 17 | */ |
||
| 18 | public static function findFromFirstCharacterOffset(string $text, int $offsetFromFirstCharacter, string $encoding = TextEncoding::UTF8): array |
||
| 39 |