Issues (686)

jaxon-examples/examples/bind-component/page.php (3 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" id="div2">
6
                        &nbsp;
7
                    </div>
8
                    <div class="col-md-12">
9
                        <select class="form-select" id="colorselect" name="colorselect"
10
                            <?= attr()->on('change', rq('HelloWorld')
11
                                ->setColor(je('colorselect')->rd()->select())) ?>>
0 ignored issues
show
The method setColor() 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
                                ->/** @scrutinizer ignore-call */ setColor(je('colorselect')->rd()->select())) ?>>
Loading history...
12
                            <option value="black" selected="selected">Black</option>
13
                            <option value="red">Red</option>
14
                            <option value="green">Green</option>
15
                            <option value="blue">Blue</option>
16
                        </select>
17
                    </div>
18
                    <div class="col-md-12 buttons">
19
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('HelloWorld')->sayHello(1)) ?> >CLICK ME</button>
0 ignored issues
show
The method sayHello() 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

19
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('HelloWorld')->/** @scrutinizer ignore-call */ sayHello(1)) ?> >CLICK ME</button>
Loading history...
20
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('HelloWorld')->sayHello(0)) ?> >Click Me</button>
21
                    </div>
22
                </div>
23
<?php $this->endblock() ?>
24
25
<?php $this->block('code') ?>
26
                <div class="card code">
27
                    <div class="card-body">
28
                        <?= 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

28
                        <?= /** @scrutinizer ignore-type */ highlight_file(__DIR__ . '/code.php', true) ?>
Loading history...
29
                    </div>
30
                </div>
31
<?php $this->endblock() ?>
32
33
<?php $this->block('javascript') ?>
34
<script type='text/javascript'>
35
    /* <![CDATA[ */
36
    window.onload = function() {
37
        // Call the HelloWorld class to populate the 2nd div
38
        <?= rq('HelloWorld')->sayHello(0) ?>;
39
        // call the HelloWorld->setColor() method on load
40
        <?= rq('HelloWorld')->setColor(je('colorselect')->rd()->select()) ?>;
41
    }
42
    /* ]]> */
43
</script>
44
<?php $this->endblock() ?>
45