Passed
Pull Request — master (#9)
by Shinji
01:56
created

PhpReaderContextCreator::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-profiler package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace PhpProfiler\Inspector\Daemon\Reader\Context;
15
16
use PhpProfiler\Lib\Amphp\ContextCreatorInterface;
17
18
final class PhpReaderContextCreator implements PhpReaderContextCreatorInterface
19
{
20
    private ContextCreatorInterface $context_creator;
21
22
    public function __construct(ContextCreatorInterface $context_creator)
23
    {
24
        $this->context_creator = $context_creator;
25
    }
26
27
    public function create(): PhpReaderContextInterface
28
    {
29
        return new PhpReaderContext(
30
            $this->context_creator->create(
31
                PhpReaderEntryPoint::class
32
            )
33
        );
34
    }
35
}
36