Completed
Pull Request — master (#320)
by Luc
05:00
created

LocationId::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace CultuurNet\UDB3\Location;
4
5
use ValueObjects\StringLiteral\StringLiteral;
6
7
class LocationId extends StringLiteral
8
{
9
    public function __construct($value)
10
    {
11
        parent::__construct($value);
12
13
        if (empty($value)) {
14
            throw new \InvalidArgumentException('LocationId can\'t have an empty value.');
15
        }
16
    }
17
}
18