Issues (686)

jaxon-examples/examples/confirm/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
                            <option value="black" selected="selected">Black</option>
11
                            <option value="red">Red</option>
12
                            <option value="green">Green</option>
13
                            <option value="blue">Blue</option>
14
                        </select>
15
                    </div>
16
                    <div class="col-md-12 buttons">
17
                        <button type="button" class="btn btn-primary" id="btn-uppercase">CLICK ME</button>
18
                        <button type="button" class="btn btn-primary" id="btn-lowercase">Click Me</button>
19
                    </div>
20
                </div>
21
<?php $this->endblock() ?>
22
23
<?php $this->block('code') ?>
24
                <div class="card code">
25
                    <div class="card-body">
26
                        <?= 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

26
                        <?= /** @scrutinizer ignore-type */ highlight_file(__DIR__ . '/code.php', true) ?>
Loading history...
27
                    </div>
28
                </div>
29
<?php $this->endblock() ?>
30
31
<?php $this->block('javascript') ?>
32
<script type='text/javascript'>
33
    /* <![CDATA[ */
34
    window.onload = function() {
35
        // Set event handlers
36
        <?= jq('#colorselect')
37
            ->on('change', rq('HelloWorld')
38
            ->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

38
            ->/** @scrutinizer ignore-call */ setColor(je('colorselect')->rd()->select())
Loading history...
39
            ->confirm('Set color to {1}', je('colorselect')->rd()->select())) ?>;
40
        <?= jq('#btn-uppercase')
41
            ->on('click', rq('HelloWorld')
42
            ->sayHello(1)
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

42
            ->/** @scrutinizer ignore-call */ sayHello(1)
Loading history...
43
            ->confirm('Convert to uppercase?')) ?>;
44
        <?= jq('#btn-lowercase')
45
            ->on('click', rq('HelloWorld')
46
            ->sayHello(0)
47
            ->confirm('Convert to lowercase?')) ?>;
48
        // Call the HelloWorld class to populate the 2nd div
49
        <?= rq('HelloWorld')->sayHello(0) ?>;
50
    }
51
    /* ]]> */
52
</script>
53
<?php $this->endblock() ?>
54