Passed
Pull Request — master (#565)
by Théo
02:31
created

NullScoper::getSymbolsRegistry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the box project.
7
 *
8
 * (c) Kevin Herrera <[email protected]>
9
 *     Théo Fidry <[email protected]>
10
 *
11
 * This source file is subject to the MIT license that is bundled
12
 * with this source code in the file LICENSE.
13
 */
14
15
namespace KevinGH\Box\PhpScoper;
16
17
use Humbug\PhpScoper\Symbol\SymbolsRegistry;
18
19
/**
20
 * @private
21
 */
22
final class NullScoper implements Scoper
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function scope(string $filePath, string $contents): string
28
    {
29
        return $contents;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function setSymbolsRegistry(SymbolsRegistry $registry): void
36
    {
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getSymbolsRegistry(): SymbolsRegistry
43
    {
44
        return new SymbolsRegistry();
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getPrefix(): string
51
    {
52
        return '';
53
    }
54
}
55