Conditions | 6 |
Paths | 18 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
18 | 7 | public function setUp($config = []) |
|
19 | { |
||
20 | 7 | if (empty($this->getKey())) { |
|
21 | 5 | $this->passkey = empty($config['key']) ? Config::get('smsa_testing_key') : $config['key']; |
|
|
|||
22 | 5 | } |
|
23 | |||
24 | 7 | if (empty($this->uri)) { |
|
25 | 5 | $this->uri = empty($config['uri']) ? Config::get('smsa_uri') : $config['uri']; |
|
26 | 5 | } |
|
27 | |||
28 | 7 | if (empty($this->wsdlFilePath)) { |
|
29 | 5 | $this->setWsdlFilePath(); |
|
30 | 5 | } |
|
31 | |||
32 | 7 | return $this; |
|
33 | } |
||
34 | |||
95 |
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: