Completed
Push — develop ( 6acb11...b743df )
by Baptiste
05:00
created

Position::__construct()   A

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 8
    public function __construct($column, $row)
14
    {
15 8
        if (!is_scalar($column) || !is_scalar($row)) {
16 2
            throw new InvalidArgumentException;
17
        }
18
19 6
        $this->column = $column;
20 6
        $this->row = $row;
21 6
    }
22
23 5
    public function column()
24
    {
25 5
        return $this->column;
26
    }
27
28 4
    public function row()
29
    {
30 4
        return $this->row;
31
    }
32
}
33