ChildSimplePHP::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace SimplePHP\Model;
4
5
class ChildSimplePHP
6
{
7
    public $realName;
8
    public $completePath;
9
10
    public function __construct(String $child)
11
    {
12
        $getCompleteChild = $child;
13
        $getName = explode("\\", $getCompleteChild);
14
15
        $this->setRealName(end($getName));
16
        $this->setCompleteChild($getCompleteChild);
17
    }
18
19
    private function setRealName(String $name)
20
    {
21
        $this->realName = $name;
22
    }
23
24
    private function setCompleteChild(String $completeChild)
25
    {
26
        $this->completePath = $completeChild;
27
    }
28
}