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

FileSource   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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
 * contained within a template file.
13
 */
14
class FileSource extends Source
15
{
16
    public $source = '';
17
    public $filePathAndFilename = '';
18
    public $bytes = [];
19
    public $length = 0;
20
21
    public function __construct(string $filePathAndFilename)
22
    {
23
        $this->filePathAndFilename = $filePathAndFilename;
24
        parent::__construct(file_get_contents($filePathAndFilename));
25
    }
26
}
27