Passed
Push — master ( f52ae2...8aee49 )
by
unknown
29:47 queued 15:47
created

Issue4416Filter::readCell()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 1
b 0
f 0
cc 2
nc 2
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;
6
7
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
8
9
class Issue4416Filter implements IReadFilter
10
{
11
    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool
12
    {
13
        $allowedColumns = ['A', 'B', 'C', 'D'];
14
        $allowedRows = range(1, 5);
15
16
        return in_array($columnAddress, $allowedColumns, true) && in_array($row, $allowedRows, true);
17
    }
18
}
19