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

Compact   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 3
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