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