We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | public function run(): StepResult |
||
| 16 | { |
||
| 17 | $matches = $this->context()->searchTokens(['wysiwyg']); |
||
| 18 | $paths = $matches['wysiwyg'] ?? []; |
||
| 19 | |||
| 20 | if (empty($paths)) { |
||
| 21 | return StepResult::success('No wysiwyg aliases detected.'); |
||
| 22 | } |
||
| 23 | |||
| 24 | $preview = array_slice($paths, 0, 10); |
||
| 25 | $details = array_map(fn ($path) => "- {$path}", $preview); |
||
| 26 | |||
| 27 | if (count($paths) > count($preview)) { |
||
| 28 | $details[] = sprintf('… %d more occurrence(s) omitted.', count($paths) - count($preview)); |
||
| 29 | } |
||
| 30 | |||
| 31 | return StepResult::warning( |
||
| 32 | 'Replace the wysiwyg field/column with ckeditor or text (the alias was removed).', |
||
| 33 | $details |
||
| 34 | ); |
||
| 37 |