| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | protected function spellCheck(array $jsonProps) : array |
||
| 24 | { |
||
| 25 | if (extension_loaded(PhpInterface::PHP_EXTENSION_PSPELL) === false) { |
||
| 26 | return [ConfigInterface::SPELL_CHECK => 'php-pspell library has not been installed on Your system.']; |
||
| 27 | } |
||
| 28 | |||
| 29 | $arr = []; |
||
| 30 | $spellCheck = new SpellCheck($this->entity); |
||
|
|
|||
| 31 | $field = $spellCheck->getField(); |
||
| 32 | if ($spellCheck->isEnabled() === true) { |
||
| 33 | $arr = $spellCheck->check($jsonProps[$field]); |
||
| 34 | } |
||
| 35 | |||
| 36 | return [ConfigInterface::SPELL_CHECK => [$field => $arr]]; |
||
| 37 | } |
||
| 38 | } |