| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function shouldReceiveNotification(NotificationInterface $notification) |
||
| 19 | { |
||
| 20 | $notificationAlias = Inflector::camel2id(get_class($notification)); |
||
| 21 | if (isset($this->notificationSettings[$notificationAlias])) { |
||
| 22 | return (bool) $this->notificationSettings[$notificationAlias]; |
||
|
|
|||
| 23 | } |
||
| 24 | return true; |
||
| 25 | } |
||
| 26 | |||
| 58 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: