Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 1 | public function handle(iterable $misspellings): void |
|
15 | { |
||
16 | 1 | foreach ($misspellings as $misspelling) { |
|
17 | 1 | $output = sprintf( |
|
18 | 1 | 'word: %s | line: %d | offset: %d | suggestions: %s | context: %s' . PHP_EOL, |
|
19 | 1 | $misspelling->getWord(), |
|
20 | 1 | $misspelling->getLineNumber(), |
|
21 | 1 | $misspelling->getOffset(), |
|
22 | 1 | $misspelling->hasSuggestions() ? implode(',', $misspelling->getSuggestions()) : '', |
|
23 | 1 | \Safe\json_encode($misspelling->getContext()) |
|
24 | ); |
||
25 | |||
26 | 1 | echo $output; |
|
27 | } |
||
30 |