Completed
Pull Request — master (#470)
by Claus
01:35
created

Source   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
declare(strict_types=1);
3
namespace TYPO3Fluid\Fluid\Core\Parser;
4
5
/*
6
 * This file belongs to the package "TYPO3 Fluid".
7
 * See LICENSE.txt that was shipped with this package.
8
 */
9
10
/**
11
 * Source reflecting a piece of Fluid source code,
12
 * usually coming from a template file.
13
 */
14
class Source
15
{
16
    public $source = '';
17
    public $bytes = [];
18
    public $length = 0;
19
20
    public function __construct(string $source)
21
    {
22
        $this->source = $source;
23
        $this->bytes = unpack('C*', $source);
24
        $this->length = count($this->bytes);
25
    }
26
}
27