Passed
Branch master (f496ba)
by stéphane
02:11
created

Compact::__construct()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 2
nc 2
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace Dallgoot\Yaml;
4
5
use Dallgoot\Yaml\Types as T;
6
7
/**
0 ignored issues
show
Coding Style introduced by
Doc comment is empty
Loading history...
8
 *
9
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
10
class Compact extends \ArrayIterator
11
{
12
13
    public function __construct($argument)
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
14
    {
15
        if ($argument instanceof \Countable && count($argument) > 0) {
16
            # it's an array-like
0 ignored issues
show
Coding Style introduced by
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Loading history...
17
        } else {
18
            //it's an object-like
19
        }
20
    }
21
}
22