Passed
Pull Request — master (#3)
by Bartosz
03:17 queued 01:24
created

LoopFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * File: LoopFactory.php
7
 *
8
 * @author Bartosz Kubicki [email protected]>
9
 * @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl)
10
 */
11
12
namespace LizardMedia\AdminIndexer\Model\Adapter\ReactPHP\EventLoop;
13
14
use LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\EventLoop\LoopFactoryInterface;
15
use React\EventLoop\LoopInterface;
16
use React\EventLoop\Factory;
17
18
/**
19
 * Class LoopFactory
20
 * @package LizardMedia\AdminIndexer\Model\Adapter\ReactPHP\EventLoop
21
 */
22
class LoopFactory implements LoopFactoryInterface
23
{
24
    /**
25
     * @var Factory
26
     */
27
    private $factory;
28
29
    /**
30
     * LoopFactory constructor.
31
     * @param Factory $factory
32
     */
33
    public function __construct(
34
        Factory $factory
35
    ) {
36
        $this->factory = $factory;
37
    }
38
39
    /**
40
     * @return LoopInterface
41
     */
42
    public function create(): LoopInterface
43
    {
44
        return $this->factory->create();
45
    }
46
}