Completed
Push — master ( 7d8379...bf3c75 )
by Dominik
04:40 queued 03:00
created

AllowOriginExact::match()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\Cors\Negotiation\Origin;
6
7
final class AllowOriginExact implements AllowOriginInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    private $value;
13
14
    /**
15
     * @param string $value
16
     */
17 2
    public function __construct(string $value)
18
    {
19 2
        $this->value = $value;
20 2
    }
21
22
    /**
23
     * @param string $origin
24
     *
25
     * @return bool
26
     */
27 2
    public function match(string $origin): bool
28
    {
29 2
        return $this->value === $origin;
30
    }
31
}
32