Passed
Push — develop_3.0 ( 78b663...68a963 )
by Adrien
02:49
created

RowManager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isEmpty() 0 10 3
1
<?php
2
3
namespace Box\Spout\Writer\Common\Manager;
4
5
use Box\Spout\Writer\Common\Entity\Row;
6
7
class RowManager
8
{
9
    /**
10
     * Detect whether a row is considered empty.
11
     * An empty row has all of its cells empty.
12
     *
13
     * @param Row $row
14
     * @return bool
15
     */
16 36
    public function isEmpty(Row $row)
17
    {
18 36
        foreach ($row->getCells() as $cell) {
19 35
            if (!$cell->isEmpty()) {
20 35
                return false;
21
            }
22
        }
23
24 4
        return true;
25
    }
26
}
27