Cell   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 31
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A position() 0 4 1
A value() 0 4 1
A __toString() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Spreadsheet;
5
6
final class Cell implements CellInterface
7
{
8
    private $position;
9
    private $value;
10
    private $string;
11
12 13
    public function __construct(Position $position, $value)
13
    {
14 13
        $this->position = $position;
15 13
        $this->value = $value;
16 13
        $this->string = (string) $value;
17 13
    }
18
19 12
    public function position(): Position
20
    {
21 12
        return $this->position;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 6
    public function value()
28
    {
29 6
        return $this->value;
30
    }
31
32 4
    public function __toString(): string
33
    {
34 4
        return $this->string;
35
    }
36
}
37