| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function handle(DataBag $commandParameters, DataBag $validatedParameters, ? UserAccountId $userAccountId, callable $next): DataBag |
||
| 26 | { |
||
| 27 | if ($commandParameters->has('contacts')) { |
||
| 28 | $contacts = $commandParameters->has('contacts'); |
||
| 29 | Assertion::isArray($contacts, 'The parameter \'contacts\' must be a list of e-mail addresses.'); |
||
| 30 | Assertion::allEmail($contacts, sprintf('The parameter \'contacts\' must be a list of e-mail addresses.', $k)); |
||
|
|
|||
| 31 | |||
| 32 | $validatedParameters = $validatedParameters->with('contacts', $contacts); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $next($commandParameters, $validatedParameters, $userAccountId); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.