Issues (34)

view/weather/validationJSON.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Anax\View;
4
5
/**
6
 * Render content within an article.
7
 */
8
9
?>
10
<head>
11
    <meta charset="utf-8">
12
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
13
    <title>WEATHER-JSON</title>
14
</head>
15
16
</p>
17
<?php
18
if ($data) {
19
        var_dump($data);
20
}
21
?>
22
23
<!--
24
<pre>
25
<?= var_dump($data); ?> -->
0 ignored issues
show
Are you sure the usage of var_dump($data) is correct as it 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...
Are you sure var_dump($data) of type void can be used in echo? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

25
<?= /** @scrutinizer ignore-type */ var_dump($data); ?> -->
Loading history...
26