Passed
Push — union-types ( b56600 )
by Luis
14:03
created

SourceCode   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 3 1
A __construct() 0 3 1
A fileContents() 0 3 1
1
<?php declare(strict_types=1);
2
/**
3
 * PHP version 7.4
4
 *
5
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
6
 */
7
8
namespace PhUml\Parser;
9
10
final class SourceCode
11
{
12
    /** @var string[]  */
13
    private array $fileContents;
14
15
    public function __construct()
16
    {
17
        $this->fileContents = [];
18
    }
19
20
    public function add(string $sourceCode): void
21
    {
22
        $this->fileContents[] = $sourceCode;
23
    }
24
25
    /** @return string[] */
26
    public function fileContents(): array
27
    {
28
        return $this->fileContents;
29
    }
30
}
31