WithoutMagicPropertiesClass::setMagicProperty()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * PHP: Nelson Martell Library file
5
 *
6
 * Copyright © 2016-2021 Nelson Martell (http://nelson6e65.github.io)
7
 *
8
 * Licensed under The MIT License (MIT)
9
 * For full copyright and license information, please see the LICENSE
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @copyright 2016-2021 Nelson Martell
13
 * @link      http://nelson6e65.github.io/php_nml/
14
 * @since     v0.6.0
15
 * @license   http://www.opensource.org/licenses/mit-license.php The MIT License (MIT)
16
 * */
17
18
declare(strict_types=1);
19
20
namespace NelsonMartell\Test\DataProviders\ExampleClass;
21
22
use NelsonMartell\PropertiesHandler;
23
use NelsonMartell\IStrictPropertiesContainer;
24
25
/**
26
 * @internal
27
 *
28
 * @property string $magicProperty
29
 */
30
class WithoutMagicPropertiesClass implements IStrictPropertiesContainer
31
{
32
    use PropertiesHandler;
33
34
    public function __construct()
35
    {
36
        $this->magic_          = 'magic';
37
        $this->noMagicProperty = 'no magic';
38
    }
39
40
    /**
41
     *
42
     * @var string
43
     */
44
    private $magic_;
45
46
    /**
47
     *
48
     *
49
     * @return string
50
     */
51
    protected function getMagicProperty(): string
52
    {
53
        return $this->magic_;
54
    }
55
56
    /**
57
     *
58
     * @param string $value
59
     */
60
    protected function setMagicProperty(string $value)
61
    {
62
        $this->magic_ = $value;
63
    }
64
65
    /**
66
     *
67
     * @var string
68
     */
69
    private $noMagicProperty;
70
71
    /**
72
     *
73
     *
74
     * @return string
75
     */
76
    protected function getNoMagicProperty(): string
77
    {
78
        return $this->noMagicProperty;
79
    }
80
81
    /**
82
     *
83
     * @param string $value
84
     */
85
    protected function setNoMagicProperty(string $value)
86
    {
87
        $this->noMagicProperty = $value;
88
    }
89
}
90