Completed
Push — master ( 1780f7...c63020 )
by Beñat
04:00
created

UserOfIdQuery::id()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the BenGorUser package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace BenGorUser\User\Application\Query;
14
15
/**
16
 * User of id query.
17
 *
18
 * @author Beñat Espiña <[email protected]>
19
 */
20
class UserOfIdQuery
21
{
22
    /**
23
     * The user id.
24
     *
25
     * @var string
26
     */
27
    private $id;
28
29
    /**
30
     * Constructor.
31
     *
32
     * @param string $anId The user id
33
     */
34
    public function __construct($anId)
35
    {
36
        if (null === $anId) {
37
            throw new \InvalidArgumentException('Id cannot be null');
38
        }
39
        $this->id = $anId;
40
    }
41
42
    /**
43
     * Gets the id.
44
     *
45
     * @return string
46
     */
47
    public function id()
48
    {
49
        return $this->id;
50
    }
51
}
52