Passed
Push — main ( 7b5e92...e72088 )
by Ricards
03:46 queued 17s
created

speller()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 3
rs 10
1
<?php
2
3
use Fecony\YandexSpeller\YandexSpeller;
4
use Illuminate\Http\JsonResponse;
5
6
if (! function_exists('speller')) {
7
8
    /**
9
     * Checks spelling in the specified $text passage.
10
     *
11
     * $text variable may be an array of strings.
12
     *
13
     * @param $text
14
     * @param string|null $lang
15
     * @param int|null $options
16
     * @param string|null $format
17
     * @return JsonResponse|mixed
18
     */
19
    function speller($text, string $lang = null, int $options = null, string $format = null)
20
    {
21
        return app(YandexSpeller::class)->check($text, $lang, $options, $format);
22
    }
23
}
24