Issues (686)

jaxon-examples/examples/event-target/page.php (4 issues)

1
<?php $this->extends('templates::examples/layout.php') ?>
2
3
<?php
4
use App\Test\Test as AppTest;
5
use App\Test\Buttons as AppButtons;
6
use Ext\Test\Test as ExtTest;
7
use Ext\Test\Buttons as ExtButtons;
8
?>
9
10
<?php $this->block('content') ?>
11
                <!-- Custom attribute: Multiple event handlers on child nodes, using dedicated divs. -->
12
                <div class="row" <?= attr()
13
                    ->select('.app-color-choice')->on('change',
14
                        rq(AppTest::class)->setColor(jq()->val()))
0 ignored issues
show
The method val() does not exist on Jaxon\Script\Call\JqSelectorCall. 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

14
                        rq(AppTest::class)->setColor(jq()->/** @scrutinizer ignore-call */ val()))
Loading history...
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

14
                        rq(AppTest::class)->/** @scrutinizer ignore-call */ setColor(jq()->val()))
Loading history...
15
                    ->select('.ext-color-choice')->on('change',
16
                        rq(ExtTest::class)->setColor(jq()->val())) ?>>
17
18
                    <div class="col-md-12" <?= attr()->bind(rq(AppTest::class)) ?>>
19
                        Initial content : <?= cl(AppTest::class)->html() ?>
20
                    </div>
21
                    <div class="col-md-12">
22
                        <select class="form-control app-color-choice">
23
                            <option value="black" selected="selected">Black</option>
24
                            <option value="red">Red</option>
25
                            <option value="green">Green</option>
26
                            <option value="blue">Blue</option>
27
                        </select>
28
                    </div>
29
                    <div class="col-md-12 buttons" <?= attr()->bind(rq(AppButtons::class)) ?>>
30
                    </div>
31
32
                    <div class="col-md-12" <?= attr()->bind(rq(ExtTest::class)) ?>>
33
                        Initial content : <?= attr()->html(rq(ExtTest::class)) ?>
34
                    </div>
35
                    <div class="col-md-12">
36
                        <select class="form-control ext-color-choice">
37
                            <option value="black" selected="selected">Black</option>
38
                            <option value="red">Red</option>
39
                            <option value="green">Green</option>
40
                            <option value="blue">Blue</option>
41
                        </select>
42
                    </div>
43
                    <div class="col-md-12 buttons" <?= attr()->bind(rq(ExtButtons::class)) ?>>
44
                    </div>
45
                </div>
46
<?php $this->endblock() ?>
47
48
<?php $this->block('code') ?>
49
                <div class="card code">
50
                    <div class="card-body">
51
                        <?= 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

51
                        <?= /** @scrutinizer ignore-type */ highlight_file(__DIR__ . '/code.php', true) ?>
Loading history...
52
                    </div>
53
                </div>
54
<?php $this->endblock() ?>
55
56
<?php $this->block('javascript') ?>
57
<script type='text/javascript'>
58
    /* <![CDATA[ */
59
    window.onload = function() {
60
        <?= rq(AppTest::class)->sayHello(true) ?>;
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

60
        <?= rq(AppTest::class)->/** @scrutinizer ignore-call */ sayHello(true) ?>;
Loading history...
61
        <?= rq(ExtTest::class)->sayHello(true) ?>;
62
    }
63
    /* ]]> */
64
</script>
65
<?php $this->endblock() ?>
66