Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 0 |
1 | <?php |
||
36 | 5 | public function matches(MessageReceived $message): bool |
|
37 | { |
||
38 | 5 | $text = $message->getText(); |
|
39 | 5 | if ($text === null) { |
|
40 | return false; |
||
41 | } |
||
42 | |||
43 | 5 | if (!$this->caseSensitive) { |
|
44 | 3 | $text = Str::lower($text); |
|
45 | 3 | $this->value = Str::lower($this->value); |
|
46 | } |
||
47 | |||
48 | 5 | return hash_equals($this->value, $text); |
|
49 | } |
||
50 | } |
||
51 |