| Conditions | 3 |
| Paths | 4 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | public function published() |
||
| 45 | { |
||
| 46 | $class = $this->entity->published ? 'fa fa-check-circle-o' : 'fa fa-circle-o'; |
||
| 47 | $state = $this->entity->published ? 'Published' : 'Unpublished'; |
||
| 48 | |||
| 49 | return html()->tag('i', '', ["class" => $class, "data-toggle" => "tooltip", "data-title" => $state]); |
||
| 50 | } |
||
| 51 | |||
| 78 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: