Issues (686)

jaxon-examples/examples/flot/page.php (2 issues)

1
<?php $this->extends('templates::examples/layout.php') ?>
2
3
<?php $this->block('content') ?>
4
                <div class="row">
5
                    <div class="col-md-12">
6
                        <div id="flot">
7
                            &nbsp;
8
                        </div>
9
                    </div>
10
                    <div class="col-md-12 buttons">
11
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq(Flot::class)->drawGraph()) ?>>CLICK ME</button>
0 ignored issues
show
The method drawGraph() does not exist on Jaxon\Script\Call\JxnCall. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

11
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq(Flot::class)->/** @scrutinizer ignore-call */ drawGraph()) ?>>CLICK ME</button>
Loading history...
12
                    </div>
13
                </div>
14
<?php $this->endblock() ?>
15
16
<?php $this->block('code') ?>
17
                <div class="card code">
18
                    <div class="card-body">
19
                        <?= highlight_file(__DIR__ . '/code.php', true) ?>
0 ignored issues
show
Are you sure highlight_file(__DIR__ . '/code.php', true) of type string|true 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

19
                        <?= /** @scrutinizer ignore-type */ highlight_file(__DIR__ . '/code.php', true) ?>
Loading history...
20
                    </div>
21
                </div>
22
<?php $this->endblock() ?>
23
24
<?php $this->block('javascript') ?>
25
<script type='text/javascript'>
26
    /* <![CDATA[ */
27
    var plots = {
28
        xaxis: {
29
            label: x => `x${x}`,
30
        },
31
        sqrt: {
32
            value: x => Math.sqrt(x * 50),
33
            label: (series, x, y) => `${series}(${x} * 50) = ${y}`,
34
        },
35
    };
36
    window.onload = function() {
37
        // Call the Flot class to populate the 2nd div
38
        // <?= rq(Flot::class)->drawGraph() ?>;
39
    }
40
    /* ]]> */
41
</script>
42
<?php $this->endblock() ?>
43