Utils::noEmptyItems()   B
last analyzed

Complexity

Conditions 5
Paths 3

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 8.8571
c 0
b 0
f 0
cc 5
eloc 5
nc 3
nop 1
1
<?php namespace BinPacking3d;
2
3
class Utils
4
{
5
6
    public static function noEmptyItems(array $items)
7
    {
8
        foreach ($items as $item) {
9
10
            if ($item === null || (is_numeric($item) && $item <= 0)) {
11
12
                return false;
13
            }
14
        }
15
16
        return true;
17
    }
18
19
}
20