InterfaceCollection::toString()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 4
Bugs 1 Features 0
Metric Value
c 4
b 1
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4286
cc 2
eloc 4
nc 2
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the ClassGeneration package.
5
 *
6
 * (c) Antonio Spinelli <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ClassGeneration;
13
14
use ClassGeneration\Collection\ArrayCollection;
15
16
/**
17
 * Interface ClassGeneration
18
 * @author Antonio Spinelli <[email protected]>
19
 */
20
class InterfaceCollection extends ArrayCollection
21
{
22
23
    /**
24
     * Parse the constant string;
25
     * @return string
26
     */
27 10
    public function toString()
28
    {
29 10
        if ($this->count() < 1) {
30 6
            return '';
31
        }
32
33 4
        return ' implements ' . implode(', ', $this->toArray());
34
    }
35
}
36