Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
8 | 2 | public function __construct($loop) |
|
9 | { |
||
10 | 2 | $this->resolverFactory = new \React\Dns\Resolver\Factory(); |
|
|
|||
11 | 2 | $this->resolver = $this->resolverFactory->create('8.8.8.8', $loop); |
|
12 | 2 | $this->HttpClient = (new \React\HttpClient\Factory)->create( |
|
13 | 2 | $loop, |
|
14 | 2 | $this->resolver |
|
15 | ); |
||
16 | |||
17 | 2 | } |
|
18 | |||
30 |
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: