Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function createExpression(GridMetadata $gridMetadata, array $data): Expression |
||
35 | { |
||
36 | $expression = $this->innerFactory->createExpression($gridMetadata, $data); |
||
37 | |||
38 | $event = new ExpressionEvent($gridMetadata, $expression); |
||
|
|||
39 | $this->dispatcher->dispatch(Events::EXPRESSION_CREATED, $event); |
||
40 | |||
41 | return $event->getExpression(); |
||
42 | } |
||
43 | } |
||
44 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: