Completed
Push — master ( 446f2e...32b2c3 )
by Nelson
11:26
created

C   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 54
rs 10
c 0
b 0
f 0
wmc 7
lcom 1
cbo 1

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getCustomGetterPrefix() 0 4 1
A getCustomSetterPrefix() 0 4 1
A getValueOfAttribute5() 0 4 1
A getValueOfProperty6() 0 4 1
A setValueOfProperty6() 0 4 1
A getProperty7() 0 4 1
1
<?php
2
/**
3
 * PHP: Nelson Martell Library file
4
 *
5
 * Content:
6
 * - Class definition.
7
 *
8
 * Copyright © 2016 Nelson Martell (http://nelson6e65.github.io)
9
 *
10
 * Licensed under The MIT License (MIT)
11
 * For full copyright and license information, please see the LICENSE
12
 * Redistributions of files must retain the above copyright notice.
13
 *
14
 * @copyright 2016 Nelson Martell
15
 * @link      http://nelson6e65.github.io/php_nml/
16
 * @since     v0.6.0
17
 * @license   http://www.opensource.org/licenses/mit-license.php The MIT License (MIT)
18
 * */
19
20
namespace NelsonMartell\Test\DataProviders\ExampleClass;
21
22
use NelsonMartell\PropertiesHandler;
23
use NelsonMartell\ICustomPrefixedPropertiesContainer;
24
25
class C extends B implements ICustomPrefixedPropertiesContainer
26
{
27
    public function __construct()
28
    {
29
        parent::__construct();
30
        unset(
31
            $this->property5,
32
            $this->property6,
33
            $this->property7
34
        );
35
    }
36
37
    public static function getCustomGetterPrefix()
38
    {
39
        return 'getValueOf';
40
    }
41
42
    public static function getCustomSetterPrefix()
43
    {
44
        return 'setValueOf';
45
    }
46
47
48
    private $attribute5 = -5;
49
50
    public function getValueOfAttribute5()
51
    {
52
        return $this->attribute5 * 2;
53
    }
54
55
    private $attribute6 = -6;
56
    public $property6;
57
58
    protected function getValueOfProperty6()
59
    {
60
        return $this->attribute6;
61
    }
62
63
    protected function setValueOfProperty6($value)
64
    {
65
        $this->property6 = $value * 99;
66
    }
67
68
    private $attribute7 = -7;
0 ignored issues
show
Unused Code introduced by
The property $attribute7 is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
69
    public $property7;
70
71
    /**
72
     * Wrong prefix getter; will never be called
73
     */
74
    protected function getProperty7()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
75
    {
76
        return $this->property7;
77
    }
78
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
79