Result   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 35
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A asArray() 0 5 1
A setLcom() 0 4 1
A getLcom() 0 4 1
1
<?php
2
3
/*
4
 * (c) Jean-François Lépine <https://twitter.com/Halleck45>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Hal\Metrics\Complexity\Structural\LCOM;
11
use Hal\Component\Result\ExportableInterface;
12
13
/**
14
 * Representation of LCOM result
15
 *
16
 * @author Jean-François Lépine <https://twitter.com/Halleck45>
17
 */
18
class Result implements ExportableInterface {
19
20
    /**
21
     * lack of cohesion of methods
22
     *
23
     * @var int
24
     */
25
    private $lcom;
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function asArray() {
31
        return array (
32
            'lcom' => $this->getLcom()
33
        );
34
    }
35
36
    /**
37
     * @param int $lcom
38
     */
39
    public function setLcom($lcom)
40
    {
41
        $this->lcom = $lcom;
42
    }
43
44
    /**
45
     * @return int
46
     */
47
    public function getLcom()
48
    {
49
        return $this->lcom;
50
    }
51
52
}