Issues (686)

jaxon-examples/examples/html-attributes/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
                <div class="row">
12
                    <div class="col-md-12" <?= attr()->bind(rq(AppTest::class)) ?>>
13
                        Initial content : <?= cl(AppTest::class)->html() ?>
14
                    </div>
15
                    <div class="col-md-12">
16
                        <!-- Custom attribute: Event handler on DOM node. -->
17
                        <select class="form-select" <?php
18
                                echo attr()->on('change', rq(AppTest::class)->setColor(jq()->val())) ?>>
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

18
                                echo attr()->on('change', rq(AppTest::class)->/** @scrutinizer ignore-call */ setColor(jq()->val())) ?>>
Loading history...
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

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

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

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