Passed
Pull Request — develop_3.0 (#510)
by Adrien
02:39
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\Reader\ODS\Manager;
4
5
use Box\Spout\Reader\Common\Entity\Row;
6
7
/**
8
 * Class RowManager
9
 */
10
class RowManager
11
{
12
    /**
13
     * Detect whether a row is considered empty.
14
     * An empty row has all of its cells empty.
15
     *
16
     * @param Row $row
17
     * @return bool
18
     */
19 30
    public function isEmpty(Row $row)
20
    {
21 30
        foreach ($row->getCells() as $cell) {
22 24
            if (!$cell->isEmpty()) {
23 24
                return false;
24
            }
25
        }
26
27 14
        return true;
28
    }
29
}
30