Passed
Push — master ( 7f6baf...50f068 )
by Satoshi
02:16
created

CycleDetectorResponse::count()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace DependencyAnalyzer\Inspector\Responses;
5
6
class CycleDetectorResponse implements \Countable
7
{
8
    private $cycles = [];
9
10
    public function addCycle(array $classes)
11
    {
12
        $this->cycles[] = $classes;
13
    }
14
15
    public function getCycles(): array
16
    {
17
        return $this->cycles;
18
        /**
19
         * Hoge component rule violations
20
         * | hoge.php | Hoge | -> | fuga.php | Fuga |
21
         * | hoge.php | Hoge | -> | fuga.php | Fuga |
22
         *
23
         * | No | file path |
24
         * |---|---|
25
         * | 1  | hoge.php |
26
         * | 2  | fuga.php |
27
         */
28
    }
29
30
    public function count()
31
    {
32
        return count($this->cycles);
33
    }
34
}
35