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

BlockPhoneNumberRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 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