Completed
Push — master ( 94fb66...0ffc19 )
by Marcel
01:14
created

DnsResolver::resolveAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Statistics;
4
5
use React\Promise\FulfilledPromise;
6
use React\Dns\Resolver\ResolverInterface;
7
8
class DnsResolver implements ResolverInterface
9
{
10
    private $internalIP = '127.0.0.1';
11
12
    /*
13
     * This empty constructor is needed so we don't have to setup the parent's dependencies.
14
     */
15
    public function __construct()
16
    {
17
        //
18
    }
19
20
    public function resolve($domain)
21
    {
22
        return $this->resolveInternal($domain);
23
    }
24
25
    public function resolveAll($domain, $type)
26
    {
27
        return $this->resolveInternal($domain, $type);
28
    }
29
30
    private function resolveInternal($domain, $type = null)
0 ignored issues
show
Unused Code introduced by
The parameter $domain is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $type is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        return new FulfilledPromise($this->internalIP);
33
    }
34
35
    public function __toString()
36
    {
37
        return $this->internalIP;
38
    }
39
}
40