Completed
Push — master ( 887cf7...2ea773 )
by Emily
02:13
created

UseStatement::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * This file is part of the Composite Utils package.
4
 *
5
 * (c) Emily Shepherd <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the
8
 * LICENSE.md file that was distributed with this source code.
9
 *
10
 * @package spaark/composite-utils
11
 * @author Emily Shepherd <[email protected]>
12
 * @license MIT
13
 */
14
15
namespace Spaark\CompositeUtils\Model\Reflection;
16
17
/**
18
 * Represents a use statement
19
 *
20
 * @property-read string $classname
21
 * @property-read string $name
22
 */
23
class UseStatement extends Reflector
24
{
25
    /**
26
     * The classname being used
27
     *
28
     * @var string
29
     * @readable
30
     */
31
    protected $classname;
32
33
    /**
34
     * The name of this class in the current namespace block
35
     *
36
     * @var string
37
     * @readable
38
     */
39
    protected $name;
40
41
    /**
42
     * Creates the UseStatement using the given classname and used as
43
     * name
44
     *
45
     * @param string $classname The classname being used
46
     * @param string $name The name of this class in the block
47
     */
48
    public function __construct(string $classname, string $name)
49
    {
50
        $this->classname = $classname;
51
        $this->name = $name;
52
    }
53
}
54