| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 3 | public function find(ReceivedMessage $message): ?Intent |
|
| 35 | { |
||
| 36 | 3 | foreach ($this->intents as $intent) { |
|
| 37 | 3 | foreach ($intent->activators() as $activator) { |
|
| 38 | 3 | if ($activator->matches($message) && $intent->passesAuthorization($message)) { |
|
| 39 | 3 | return $intent; |
|
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | // Otherwise, return fallback intent |
||
| 45 | 2 | return $this->fallbackIntent; |
|
| 46 | } |
||
| 47 | |||
| 70 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.