Passed
Push — master ( f40062...72aa71 )
by Nelson
02:53
created

WithMagicPropertiesChildClass::getChildProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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