@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return array |
| 41 | 41 | */ |
| 42 | - public static function for(string $text, int $n = 3) |
|
| 42 | + public static function for (string $text, int $n = 3) |
|
| 43 | 43 | { |
| 44 | 44 | return (new static($n, $text))->get(); |
| 45 | 45 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public static function bigram(string $text) : array |
| 57 | 57 | { |
| 58 | - return self::for($text, 2); |
|
| 58 | + return self::for ($text, 2); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public static function trigram(string $text) : array |
| 71 | 71 | { |
| 72 | - return self::for($text, 3); |
|
| 72 | + return self::for ($text, 3); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use TextUtils\NGram; |
| 4 | 4 | |
| 5 | -if (! function_exists('bigram')) { |
|
| 5 | +if (!function_exists('bigram')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Generate a bi-gram for the provided string. |
| 8 | 8 | * |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | -if (! function_exists('trigram')) { |
|
| 21 | +if (!function_exists('trigram')) { |
|
| 22 | 22 | /** |
| 23 | 23 | * Generate a tri-gram for the provided string. |
| 24 | 24 | * |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | -if (! function_exists('ngram')) { |
|
| 37 | +if (!function_exists('ngram')) { |
|
| 38 | 38 | /** |
| 39 | 39 | * Generate a tri-gram for the provided string. |
| 40 | 40 | * |
@@ -47,6 +47,6 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | function ngram(string $text, int $length = 3) |
| 49 | 49 | { |
| 50 | - return NGram::for($text, $length); |
|
| 50 | + return NGram::for ($text, $length); |
|
| 51 | 51 | } |
| 52 | 52 | } |