NamelessSectionNode   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A construct() 0 6 1
1
<?php
2
3
namespace Htsl\Parser\Node;
4
5
use Htsl\Htsl;
6
use Htsl\ReadingBuffer\Line;
7
use Htsl\Parser\Node\Contracts\ANode;
8
use Htsl\Parser\Section;
9
10
////////////////////////////////////////////////////////////////
11
12
class NamelessSectionNode extends SectionNode
13
{
14
	/**
15
	 * Real constructor.
16
	 *
17
	 * @access protected
18
	 *
19
	 * @return \Htsl\Parser\Node\Contracts\ANode
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use NamelessSectionNode.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
20
	 */
21
	protected function construct():ANode
22
	{
23
		$this->name= null;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned correctly; expected 1 space but found 0 spaces

This check looks for improperly formatted assignments.

Every assignment must have exactly one space before and one space after the equals operator.

To illustrate:

$a = "a";
$ab = "ab";
$abc = "abc";

will have no issues, while

$a   = "a";
$ab  = "ab";
$abc = "abc";

will report issues in lines 1 and 2.

Loading history...
24
25
		return $this;
26
	}
27
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
28