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

Entry   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 9
c 2
b 1
f 0
dl 0
loc 29
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A __construct() 0 6 1
A equalTo() 0 3 1
A __invoke() 0 3 1
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