JsEmbedment::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\Embedment;
4
5
use Htsl\Embedment\Contracts\AEmbedment;
6
use Htsl\ReadingBuffer\Line;
7
8
////////////////////////////////////////////////////////////////
9
10
class JsEmbedment extends AEmbedment
11
{
12
	/**
13
	 * Real constructor
14
	 */
15
	protected function construct()
16
	{
17
		$this->content.="\n";
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...
18
	}
19
20
	/**
21
	 * Parsing line.
22
	 *
23
	 * @access public
24
	 *
25
	 * @param  \Htsl\ReadingBuffer\Line $line
26
	 *
27
	 * @return \Htsl\Embedment\Contracts
0 ignored issues
show
Documentation introduced by
Should the return type not be JsEmbedment?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
28
	 */
29
	public function parseLine( Line$line ):parent
30
	{
31
		$this->content.= $line->fullContent."\n";
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...
32
		return $this;
33
	}
34
}
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...
35