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

UserOfIdQuery   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 32
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A id() 0 4 1
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