| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function find(MessageReceived $message): ?Intent |
||
| 37 | { |
||
| 38 | foreach ($this->intents as $intent) { |
||
| 39 | foreach ($intent->activators() as $activator) { |
||
| 40 | if ($activator->matches($message) && $intent->passesAuthorization($message)) { |
||
| 41 | return resolve($intent); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 46 | // Otherwise, return fallback intent |
||
| 47 | return resolve($this->fallbackIntent); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..