Completed
Push — php7/eduard ( ce4c1b )
by
unknown
02:08
created

Form   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 24
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getX() 0 8 1
1
<?php
2
3
namespace Kata\OtherExamples;
4
5
class Form
6
{
7
    private $x;
8
9
    /**
10
     * Form constructor.
11
     *
12
     * @param $x
13
     */
14
    public function __construct($x)
15
    {
16
        $this->x = $x;
17
    }
18
19
    function getX()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
20
    {
21
        //returns closure bound to this object and scope
22
        return function ()
23
        {
24
            return $this->x;
25
        };
26
    }
27
28
}