Position::__construct()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
c 1
b 0
f 1
cc 3
eloc 5
nc 2
nop 2
crap 3
1
<?php
2
declare(strict_types = 1);
3
4
namespace Spreadsheet;
5
6
use Spreadsheet\Exception\InvalidArgumentException;
7
8
final class Position
9
{
10
    private $column;
11
    private $row;
12
13 19
    public function __construct($column, $row)
14
    {
15 19
        if (!is_scalar($column) || !is_scalar($row)) {
16 2
            throw new InvalidArgumentException;
17
        }
18
19 17
        $this->column = $column;
20 17
        $this->row = $row;
21 17
    }
22
23 13
    public function column()
24
    {
25 13
        return $this->column;
26
    }
27
28 12
    public function row()
29
    {
30 12
        return $this->row;
31
    }
32
}
33