Passed
Pull Request — master (#97)
by Jonathan
02:07
created

Regex   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 22
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getReplacement() 0 3 1
A getPattern() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Inflector\Rules;
6
7
final class Regex
8
{
9
    /** @var Pattern */
10
    private $pattern;
11
12
    /** @var string */
13
    private $replacement;
14
15
    public function __construct(Pattern $pattern, string $replacement)
16
    {
17
        $this->pattern     = $pattern;
18
        $this->replacement = $replacement;
19
    }
20
21
    public function getPattern() : Pattern
22
    {
23
        return $this->pattern;
24
    }
25
26
    public function getReplacement() : string
27
    {
28
        return $this->replacement;
29
    }
30
}
31