FileOfIdQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

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 BenGorFile 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 BenGorFile\File\Application\Query;
14
15
/**
16
 * File of id query.
17
 *
18
 * @author Beñat Espiña <[email protected]>
19
 */
20
class FileOfIdQuery
21
{
22
    /**
23
     * The file id.
24
     *
25
     * @var string
26
     */
27
    private $id;
28
29
    /**
30
     * Constructor.
31
     *
32
     * @param string $anId The file 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