| 1 | <?php |
||
| 9 | class IntentManager |
||
| 10 | { |
||
| 11 | /** @var Intent[] */ |
||
| 12 | private $intents = []; |
||
| 13 | |||
| 14 | /** @var Intent */ |
||
| 15 | private $fallbackIntent; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Register intents. |
||
| 19 | * |
||
| 20 | * @param array $intents |
||
| 21 | * @param string $fallbackIntent |
||
| 22 | */ |
||
| 23 | public function register(array $intents, string $fallbackIntent): void |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Find intent. |
||
| 31 | * |
||
| 32 | * @param MessageReceived $message |
||
| 33 | * |
||
| 34 | * @return Intent|null |
||
| 35 | */ |
||
| 36 | public function find(MessageReceived $message): ?Intent |
||
| 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..