| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | private function validate($message) |
||
| 42 | { |
||
| 43 | $conditions = [ |
||
| 44 | 'Invalid data for sms notification.' => ! is_a($message, SmsBuilder::class), |
||
| 45 | 'Message body could not be empty.' => empty($message->getBody()), |
||
| 46 | 'Message recipient could not be empty.' => empty($message->getRecipients()), |
||
| 47 | ]; |
||
| 48 | |||
| 49 | foreach ($conditions as $ex => $condition) { |
||
| 50 | throw_if($condition, new Exception($ex)); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.