StringNode::construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
9
////////////////////////////////////////////////////////////////
10
11
class StringNode extends ANode
12
{
13
	/**
14
	 * Real constructor.
15
	 *
16
	 * @access protected
17
	 *
18
	 * @return \Htsl\Parser\Node\Contracts\ANode
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use StringNode.

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...
19
	 */
20
	protected function construct():parent
21
	{
22
		return $this;
23
	}
24
25
	/**
26
	 * Opening this node, and returning node opener.
27
	 *
28
	 * @access public
29
	 *
30
	 * @return string
31
	 */
32
	public function open():string
33
	{
34
		return '';
35
	}
36
37
	/**
38
	 * Close this node, and returning node closer.
39
	 *
40
	 * @access public
41
	 *
42
	 * @param  \Htsl\ReadingBuffer\Line   $closerLine  The line when node closed.
43
	 *
44
	 * @return string
45
	 */
46
	public function close( Line$closerLine ):string
47
	{
48
		return '';
49
	}
50
}
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...
51