Position   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 25
ccs 10
cts 10
cp 1
rs 10
c 1
b 0
f 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 3
A column() 0 4 1
A row() 0 4 1
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