WithMagicPropertiesBaseClass   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseProperty() 0 3 1
A setBaseProperty() 0 3 1
A __construct() 0 3 1
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\IMagicPropertiesContainer;
24
use NelsonMartell\IStrictPropertiesContainer;
25
26
/**
27
 * @internal
28
 *
29
 * @property string $baseProperty
30
 */
31
class WithMagicPropertiesBaseClass implements IStrictPropertiesContainer, IMagicPropertiesContainer
32
{
33
    use PropertiesHandler;
34
35
    public function __construct()
36
    {
37
        $this->baseProperty_ = 'base';
38
    }
39
40
    /**
41
     *
42
     * @var string
43
     */
44
    private $baseProperty_;
45
46
    /**
47
     *
48
     *
49
     * @return string
50
     */
51
    protected function getBaseProperty(): string
52
    {
53
        return $this->baseProperty_;
54
    }
55
56
    /**
57
     *
58
     * @param string $value
59
     */
60
    protected function setBaseProperty(string $value)
61
    {
62
        $this->baseProperty_ = $value;
63
    }
64
}
65