Completed
Push — 5.1 ( f422a4...a89502 )
by Rémi
8s
created

Support::isTraversable()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 2
nop 1
1
<?php
2
3
namespace Analogue\ORM\System;
4
5
/**
6
 * This class contains a helper methods
7
 */
8
class Support
9
{
10
    /**
11
     * Return true if an object is an array or iterator
12
     *
13
     * @param  mixed $argument
14
     * @return boolean
15
     */
16
    public static function isTraversable($argument)
17
    {
18
        return $argument instanceof \Traversable || is_array($argument);
19
    }
20
}
21