Passed
Push — master ( 65540f...3f31dd )
by Hirofumi
04:05
created

NonRFCMimeGrammer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDefinition() 0 10 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Shippinno\Email\SwiftMailer;
5
6
use Swift_Mime_Grammar;
7
8
class NonRFCMimeGrammer extends Swift_Mime_Grammar
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 1
    public function getDefinition($name)
14
    {
15 1
        switch ($name) {
16
            case 'addr-spec':
17 1
                return '.+\@\S+\.\S+';
18
            default:
19
                /** @noinspection PhpUnhandledExceptionInspection */
20 1
                return parent::getDefinition($name);
21
        }
22
    }
23
}
24