Passed
Push — 2.7.11 ( ...beab38 )
by steve
18:35 queued 14s
created

Editor::node()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 18
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 0
Metric Value
cc 4
eloc 13
c 0
b 0
f 0
nc 4
nop 2
dl 0
loc 18
ccs 0
cts 18
cp 0
crap 20
rs 9.8333

1 Method

Rating   Name   Duplication   Size   Complexity  
A Editor::editor() 0 8 2
1
<?php
2
3
4
namespace neon\cms\components;
5
6
use DOMDocument;
7
use SimpleXMLElement;
8
use neon\cms\services\cmsEditor\Parser;
9
use neon\core\helpers\Arr;
10
use neon\core\helpers\Html;
11
use neon\core\web\View;
12
13
class Editor
14
{
15
16
	/**
17
	 * Create a block editor
18
	 * @param $params
19
	 * @param $content
20
	 * @param \Smarty_Internal_Template $template
21
	 * @param $repeat
22
	 * @return mixed|string
23
	 */
24
	public static function editor($params, $content, \Smarty_Internal_Template $template, &$repeat)
25
	{
26
		if ($repeat) return;
27
		$id = Arr::get($params, 'id', neon()->cms->getPage()->getId());
0 ignored issues
show
Unused Code introduced by
The assignment to $id is dead and can be removed.
Loading history...
28
		
29
30
31
		return $content;
32
	}
33
34
}
35