Positioned   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 26
ccs 11
cts 11
cp 1
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getBraced() 0 3 1
A getPos() 0 3 1
A __construct() 0 5 1
A getInner() 0 3 1
1
<?php
2
3
namespace kalanis\kw_modules\Parser;
4
5
6
/**
7
 * Class Positioned
8
 * @package kalanis\kw_modules\Parser
9
 * Single record with position data
10
 */
11
class Positioned
12
{
13
    protected string $braced = '';
14
    protected string $inner = '';
15
    protected int $position = 0;
16
17 8
    public function __construct(string $braced, string $inner, int $position = 0)
18
    {
19 8
        $this->braced = $braced;
20 8
        $this->inner = $inner;
21 8
        $this->position = $position;
22 8
    }
23
24 8
    public function getBraced(): string
25
    {
26 8
        return $this->braced;
27
    }
28
29 8
    public function getInner(): string
30
    {
31 8
        return $this->inner;
32
    }
33
34 5
    public function getPos(): int
35
    {
36 5
        return $this->position;
37
    }
38
}
39