Completed
Push — master ( 2d3e3c...0995af )
by Rob
09:50 queued 08:39
created

DisposableEmailWrapper   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 20
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A process() 0 10 2
A setLocalName() 0 5 1
1
<?php
2
3
namespace devtoolboxuk\cerberus\Wrappers;
4
5
use EmailChecker\EmailChecker;
6
7
class DisposableEmailWrapper extends Wrapper
8
{
9
10 2
    public function process()
11
    {
12 2
        $this->initWrapper($this->setLocalName());
13
14 2
        $checker = new EmailChecker();
15 2
        if (!$checker->isValid($this->getReference())) {
16 1
            $this->setScore($this->getRealScore());
17 1
            $this->setResult();
18
        }
19 2
    }
20
21 2
    private function setLocalName()
22
    {
23 2
        $name = str_replace(__NAMESPACE__ . '\\', '', __CLASS__);
24 2
        return str_replace('Wrapper', '', $name);
25
    }
26
}