Passed
Push — master ( a6dc76...6d79cb )
by Guilherme
01:12 queued 11s
created

BlockPhoneNumberRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 31
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getBlockedBy() 0 3 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LoginCidadao\PhoneVerificationBundle\Model;
12
13
use libphonenumber\PhoneNumber;
14
use LoginCidadao\CoreBundle\Model\PersonInterface;
15
use LoginCidadao\ValidationBundle\Validator\Constraints as LCAssert;
16
use Symfony\Component\Validator\Constraints as Assert;
17
use Misd\PhoneNumberBundle\Validator\Constraints\PhoneNumber as AssertPhoneNumber;
18
19
class BlockPhoneNumberRequest
20
{
21
    /**
22
     * @var PhoneNumber
23
     * @Assert\NotBlank()
24
     * @LCAssert\E164PhoneNumber(maxMessage="person.validation.mobile.length.max")
25
     * @AssertPhoneNumber()
26
     */
27
    public $phoneNumber;
28
29
    /**
30
     * @var PersonInterface
31
     * @Assert\NotBlank()
32
     */
33
    private $blockedBy;
34
35
    /**
36
     * BlockPhoneNumberRequest constructor.
37
     * @param PersonInterface $blockedBy
38
     */
39 1
    public function __construct(PersonInterface $blockedBy)
40
    {
41 1
        $this->blockedBy = $blockedBy;
42 1
    }
43
44
    /**
45
     * @return PersonInterface
46
     */
47 1
    public function getBlockedBy(): PersonInterface
48
    {
49 1
        return $this->blockedBy;
50
    }
51
}
52