Completed
Push — master ( 34bc1a...41d5a5 )
by Thierry
02:48 queued 02:48
created

AttrGet::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace Jaxon\Response\Plugin\JQuery\Call;
4
5
class AttrGet
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class AttrGet
Loading history...
6
{
7
    /**
8
     * The attribute name
9
     *
10
     * @var string
11
     */
12
    private $sAttrName;
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line(s) before first member var; 0 found
Loading history...
13
14
    /**
15
     * The constructor.
16
     *
17
     * @param string $sAttrName    The attribute name
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 4 found
Loading history...
18
     */
19
    public function __construct(string $sAttrName)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
20
    {
21
        $this->sAttrName = $sAttrName;
22
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
23
24
    /**
25
     * Returns a string representation of the script output (javascript) from this call
26
     *
27
     * @return string
28
     */
29
    public function getScript(): string
30
    {
31
        return $this->sAttrName;
32
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
33
34
    /**
35
     * Convert this call to string
36
     *
37
     * @return string
38
     */
39
    public function __toString()
40
    {
41
        return $this->getScript();
42
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
43
}
44