Completed
Pull Request — 5.1 (#94)
by Kirill
02:58
created

Support   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isTraversable() 0 4 2
1
<?php
2
namespace Analogue\ORM\System;
3
4
/**
5
 * Class Support
6
 * @package Analogue\ORM\System
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