Test Failed
Push — master ( e3c39f...fe570d )
by Mihail
07:20
created

View/Api/default/_core/exceptions/notfound.php (2 issues)

1
<?php
2
3
$this->layout('_layouts/default');
4
5
/** @var string $msg */
6
/** @var \Ffcms\Templex\Template\Template $this */
7
8
if (\Ffcms\Core\Helper\Type\Str::likeEmpty($msg)) {
9
    $msg = 'No error information available yet';
10
}
11
?>
12
13
<?php $this->start('body') ?>
14
15
<?= $this->bootstrap()->alert('warning', $msg); ?>
16
17
<?= $this->insert('_core/exceptions/_back') ?>
0 ignored issues
show
Are you sure the usage of $this->insert('_core/exceptions/_back') targeting League\Plates\Template\Template::insert() 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 getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
18
19
<?php $this->stop() ?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...