imanghafoori1 /
laravel-widgetize
| 1 | <?php |
||
| 2 | |||
| 3 | if (! function_exists('render_widget')) { |
||
| 4 | function render_widget($widget, ...$args) |
||
| 5 | { |
||
| 6 | return app(\Imanghafoori\Widgets\Utils\WidgetRenderer::class)->renderWidget($widget, ...$args); |
||
| 7 | } |
||
| 8 | } |
||
| 9 | |||
| 10 | if (! function_exists('expire_widgets')) { |
||
| 11 | function expire_widgets($tags) |
||
|
0 ignored issues
–
show
|
|||
| 12 | { |
||
| 13 | return app(\Imanghafoori\Widgets\Utils\Cache::class)->expireTaggedWidgets($tags); |
||
|
0 ignored issues
–
show
Are you sure the usage of
app(Imanghafoori\Widgets...ireTaggedWidgets($tags) targeting Imanghafoori\Widgets\Uti...::expireTaggedWidgets() seems to always return null.
This check looks for function or method calls that always return null and whose return value is used. class A
{
function getObject()
{
return null;
}
}
$a = new A();
if ($a->getObject()) {
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. Loading history...
|
|||
| 14 | } |
||
| 15 | } |
||
| 16 | |||
| 17 | if (! function_exists('json_widget')) { |
||
| 18 | function json_widget($widget, ...$args) |
||
|
0 ignored issues
–
show
|
|||
| 19 | { |
||
| 20 | return app(\Imanghafoori\Widgets\Utils\WidgetJsonifier::class)->jsonResponse($widget, ...$args); |
||
| 21 | } |
||
| 22 | } |
||
| 23 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.