We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afa2851 commit 4345b05Copy full SHA for 4345b05
src/PreprocessWord.php
@@ -7,8 +7,12 @@
7
8
trait PreprocessWord
9
{
10
- protected static function preprocessedWord(string $word, Morphy $morphy): string
+ protected static function preprocessedWord(?string $word, Morphy $morphy): ?string
11
12
+ if ($word === null) {
13
+ return null;
14
+ }
15
+
16
return $morphy->isInUpperCase() ? Str::upper(trim($word)) : Str::lower(trim($word));
17
}
18
0 commit comments