Passed
Push — v5.x ( 6eb5e2...afe246 )
by Thierry
02:28
created

Method   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 5 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace Jaxon\Request\Js\Selector;
4
5
use Jaxon\Request\Js\Call;
6
7
class Method extends Call
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class Method
Loading history...
8
{
9
    /**
10
     * The constructor.
11
     *
12
     * @param string $sMethod    The jQuery function
13
     * @param array $aArguments    The arguments of the jQuery function
0 ignored issues
show
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 4 found
Loading history...
14
     */
15
    public function __construct(string $sMethod, array $aArguments)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
16
    {
17
        parent::__construct($sMethod);
18
        // Add the arguments to the parameter list
19
        $this->addParameters($aArguments);
20
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
21
22
    /**
23
     * Returns a string representation of this call
24
     *
25
     * @return string
26
     */
27
    public function __toString(): string
28
    {
29
        return '.' . parent::__toString();
30
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
31
}
32