TextEmbedment   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseLine() 0 5 1
1
<?php
2
3
namespace Htsl\Embedment;
4
5
use Htsl\Embedment\Contracts\AEmbedment;
6
use Htsl\ReadingBuffer\Line;
7
8
////////////////////////////////////////////////////////////////
9
10
class TextEmbedment extends AEmbedment
11
{
12
	/**
13
	 * Parsing line.
14
	 *
15
	 * @access public
16
	 *
17
	 * @param  \Htsl\ReadingBuffer\Line $line
18
	 *
19
	 * @return \Htsl\Embedment\Contracts
0 ignored issues
show
Documentation introduced by
Should the return type not be TextEmbedment?

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...
20
	 */
21
	public function parseLine( Line$line ):parent
22
	{
23
		$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...
24
		return $this;
25
	}
26
}
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...
27