| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function getInstance(string $mailableClass, string $toEmail, $defaultValues): Mailable |
||
| 20 | { |
||
| 21 | $argumentValues = $this->getArguments($mailableClass, $defaultValues); |
||
| 22 | |||
| 23 | $mailable = new $mailableClass(...$argumentValues); |
||
| 24 | |||
| 25 | $mailable = $this->setRecipient($mailable, $toEmail); |
||
| 26 | |||
| 27 | return $mailable; |
||
| 28 | } |
||
| 29 | |||
| 56 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.