Recipient   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php declare(strict_types=1);
2
namespace Loevgaard\Linkmobility\ValueObject;
3
4
use Assert\Assert;
5
6
class Recipient extends StringValueObject
7
{
8 7
    public function __construct(string $value)
9
    {
10
        // valid formats can be found here: https://linkmobility.atlassian.net/wiki/spaces/COOL/pages/26017807/08.+Messages#id-08.Messages-recipients
11 7
        Assert::that($value)->regex('/^(\+|c)?[0-9]+$/i');
12
13 6
        parent::__construct($value);
14 6
    }
15
}
16