Test Failed
Pull Request — master (#37)
by Divine Niiquaye
02:55
created

Reference::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of DivineNii opensource projects.
7
 *
8
 * PHP version 7.4 and above required
9
 *
10
 * @author    Divine Niiquaye Ibok <[email protected]>
11
 * @copyright 2021 DivineNii (https://divinenii.com/)
12
 * @license   https://opensource.org/licenses/BSD-3-Clause License
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
18
namespace Rade\DI\Definitions;
19
20
/**
21
 * Reference represents a service reference.
22
 *
23
 * @author Divine Niiquaye Ibok <[email protected]>
24
 */
25
class Reference implements \Stringable
26
{
27
    private string $id;
28
29
    public function __construct(string $id)
30
    {
31
        $this->id = $id;
32
    }
33
34
    /**
35
     * @return string The service identifier
36
     */
37
    public function __toString()
38
    {
39
        return $this->id;
40
    }
41
}
42