Passed
Push — develop ( 68c7a0...29faa4 )
by Neill
22:59 queued 13s
created

Editor::createFromTree()   A

Complexity

Conditions 3

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 5
c 1
b 0
f 0
nop 2
dl 0
loc 8
ccs 0
cts 8
cp 0
crap 12
rs 10
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