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

RowManager::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
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