Issues (686)

jaxon-examples/examples/namespaces/page.php (5 issues)

1
<?php $this->extends('templates::examples/layout.php') ?>
2
3
<?php
4
$color1 = jq('#colorselect1')->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

4
$color1 = jq('#colorselect1')->/** @scrutinizer ignore-call */ val();
Loading history...
5
$color2 = jq('#colorselect2')->val();
6
?>
7
8
<?php $this->block('content') ?>
9
                <div class="row">
10
                    <div class="col-md-12" id="div1">
11
                        &nbsp;
12
                    </div>
13
                    <div class="col-md-12">
14
                        <select class="form-select" id="colorselect1" name="colorselect1"
15
                            <?= attr()->on('change', rq('App.Test.Test')
16
                                ->setColor(je('colorselect1')->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

16
                                ->/** @scrutinizer ignore-call */ setColor(je('colorselect1')->rd()->select())
Loading history...
17
                                ->confirm('Set color to {1} not {2}?', $color1, $color2)) ?>>
18
                            <option value="black" selected="selected">Black</option>
19
                            <option value="red">Red</option>
20
                            <option value="green">Green</option>
21
                            <option value="blue">Blue</option>
22
                        </select>
23
                    </div>
24
                    <div class="col-md-12 buttons">
25
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('App.Test.Test')->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

25
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('App.Test.Test')->/** @scrutinizer ignore-call */ sayHello(1)) ?>>CLICK ME</button>
Loading history...
26
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('App.Test.Test')->sayHello(0)) ?>>Click Me</button>
27
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('App.Test.Test')->showDialog()) ?>>Show Dialog</button>
0 ignored issues
show
The method showDialog() 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

27
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('App.Test.Test')->/** @scrutinizer ignore-call */ showDialog()) ?>>Show Dialog</button>
Loading history...
28
                    </div>
29
30
                    <div class="col-md-12" id="div2">
31
                        &nbsp;
32
                    </div>
33
                    <div class="col-md-12">
34
                        <select class="form-select" id="colorselect2" name="colorselect2"
35
                            <?= attr()->on('change', rq('Ext.Test.Test')
36
                                ->setColor(je('colorselect2')->rd()->select())
37
                                ->confirm('Set color to {2} not {1}?', $color1, $color2)) ?>>
38
                            <option value="black" selected="selected">Black</option>
39
                            <option value="red">Red</option>
40
                            <option value="green">Green</option>
41
                            <option value="blue">Blue</option>
42
                        </select>
43
                    </div>
44
                    <div class="col-md-12 buttons">
45
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('Ext.Test.Test')->sayHello(1)) ?>>CLICK ME</button>
46
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('Ext.Test.Test')->sayHello(0)) ?>>Click Me</button>
47
                        <button type="button" class="btn btn-primary" <?= attr()->click(rq('Ext.Test.Test')->showDialog()) ?>>Show Dialog</button>
48
                    </div>
49
                </div>
50
<?php $this->endblock() ?>
51
52
<?php $this->block('code') ?>
53
                <div class="card code">
54
                    <div class="card-body">
55
                        <?= 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

55
                        <?= /** @scrutinizer ignore-type */ highlight_file(__DIR__ . '/code.php', true) ?>
Loading history...
56
                    </div>
57
                </div>
58
<?php $this->endblock() ?>
59
60
<?php $this->block('javascript') ?>
61
<script type='text/javascript'>
62
    /* <![CDATA[ */
63
    window.onload = function() {
64
        <?= rq('App.Test.Test')->sayHello(0, false) ?>;
65
        <?= rq('App.Test.Test')->setColor(jq('#colorselect1')->val(), false) ?>;
66
        <?= rq('Ext.Test.Test')->sayHello(0, false) ?>;
67
        <?= rq('Ext.Test.Test')->setColor(jq('#colorselect2')->val(), false) ?>;
68
    }
69
    /* ]]> */
70
</script>
71
<?php $this->endblock() ?>
72