InvokerStandard::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Dazzle\Filesystem\Invoker;
4
5
use Dazzle\Filesystem\Driver\DriverAbstract;
6
use Dazzle\Loop\LoopInterface;
7
8
class InvokerStandard implements InvokerInterface
9
{
10
    /**
11
     * @var LoopInterface
12
     */
13
    protected $loop;
14
15
    /**
16
     * @var DriverAbstract
17
     */
18
    protected $driver;
19
20
    /**
21
     * @param DriverAbstract $driver
22
     */
23
    public function __construct(DriverAbstract $driver)
24
    {
25
        $this->loop = $driver->getLoop();
26
        $this->driver = $driver;
27
    }
28
29
    /**
30
     * @override
31
     * @inheritDoc
32
     */
33
    public function call($func, $args = [])
34
    {
35
        return $this->driver->call($func, $args);
36
    }
37
38
    /**
39
     * @override
40
     * @inheritDoc
41
     */
42
    public function isEmpty()
43
    {
44
        return true;
45
    }
46
}
47