Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | 11 | protected function concatenationUrlCurl($newParameters) |
|
19 | { |
||
20 | 11 | if ($this->url == '?') { |
|
21 | 5 | $this->url .= $newParameters; |
|
|
|||
22 | 11 | } elseif ($this->url == '') { |
|
23 | 4 | $this->url .= $newParameters; |
|
24 | 6 | } elseif ($this->url == '/') { |
|
25 | 1 | $this->url .= $newParameters; |
|
26 | 1 | } |
|
27 | else { |
||
28 | 2 | $this->url .= '&'.$newParameters; |
|
29 | } |
||
30 | 11 | return $this; |
|
31 | } |
||
32 | |||
50 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: