Completed
Push — master ( 8aa9dc...da896c )
by BruceScrutinizer
06:41
created

Entry::__invoke()   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 declare(strict_types=1);
2
3
namespace NamespaceProtector\Entry;
4
5
use Webmozart\Assert\Assert;
6
7
final class Entry
8
{
9
    /** @var string */
10
    private $entry;
11
12
    /** @var string */
13
    private $originalEntry;
14
15
    public function __construct(string $entry)
16
    {
17
        Assert::notEmpty($entry);
18
19
        $this->originalEntry = $entry;
20
        $this->entry = $entry;
21
    }
22
23
    public function equalTo(self $other): bool
24
    {
25
        return $this == $other;
26
    }
27
28
    public function get(): string
29
    {
30
        return $this->entry;
31
    }
32
33
    public function __invoke(): string
34
    {
35
        return $this->get();
36
    }
37
}
38