Comment   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 14
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 6 1
A specialProcess() 0 4 1
1
<?php
2
3
namespace Dallgoot\Yaml\Nodes;
4
5
use Dallgoot\Yaml\Nodes\Generic\NodeGeneric;
6
7
/**
8
 *
9
 * @author  Stéphane Rebai <[email protected]>
10
 * @license Apache 2.0
11
 * @link    https://github.com/dallgoot/yaml
12
 */
13
class Comment extends NodeGeneric
14
{
15 1
     public function specialProcess(NodeGeneric &$previous, array &$emptyLines): bool
16
     {
17 1
          $previous->getRoot()->add($this);
18 1
          return true;
19
     }
20
21 1
     public function build(&$parent = null)
22
     {
23 1
          $root = $this->getRoot();
24 1
          $yamlObject = $root->getYamlObject();
25 1
          $yamlObject->addComment($this->line, $this->raw);
26 1
          return null;
27
     }
28
}
29