| Conditions | 4 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 52 | protected function getHash(Widget $widget) |
||
| 53 | { |
||
| 54 | $hash = sprintf('%s-%s', $widget->getId(), $widget->getUpdatedAt()->getTimestamp()); |
||
| 55 | |||
| 56 | if ($widget->getMode() == Widget::MODE_BUSINESS_ENTITY |
||
| 57 | && ($entity = $widget->getEntity()) |
||
| 58 | && method_exists($widget->getEntity(), 'getUpdatedAt')) { |
||
| 59 | $hash .= sprintf('-%s', $entity->getUpdatedAt()->getTimestamp()); |
||
|
|
|||
| 60 | } |
||
| 61 | |||
| 62 | return $hash; |
||
| 63 | } |
||
| 64 | |||
| 67 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.