Completed
Pull Request — master (#457)
by Claus
07:49
created

Position::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace TYPO3Fluid\Fluid\Core\Parser;
5
6
class Position
7
{
8
    // Crazy enough, the output of "unpack()" is indexed starting from 1, not 0.
9
    public $index = 1;
10
11
    /** @var string|null */
12
    public $captured = null;
13
14
    /** @var Context */
15
    public $context;
16
17
    public function __construct(Context $context, int $index = 1, ?string $captured = null)
18
    {
19
        $this->context = $context;
20
        $this->index = $index;
21
        $this->captured = $captured;
22
    }
23
}
24