Completed
Pull Request — master (#3)
by Auke
05:08 queued 03:36
created

html::formBuilder()   D

Complexity

Conditions 16
Paths 2

Size

Total Lines 155
Code Lines 111

Duplication

Lines 49
Ratio 31.61 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 49
loc 155
rs 4.8736
cc 16
eloc 111
nc 2
nop 2

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/*
4
 * This file is part of the Ariadne Component Library.
5
 *
6
 * (c) Muze <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace arc;
13
14
class html extends xml
15
{
16
	static private $formBuilder=null;
0 ignored issues
show
Unused Code introduced by
The property $formBuilder is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
17
	static public $writer=null;	
18 3
		
19
	static public function __callStatic( $name, $args ) 
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
20 3
	{
21 1
		if ( !isset(self::$writer) ) {
22
			self::$writer = new html\Writer();
23 6
		}
24
		return call_user_func_array( [ self::$writer, $name ], $args );
25 6
	}
26 6
27
	static public function parse( $html=null, $encoding = null ) 
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
28
	{
29 1
		$parser = new html\Parser();
30 1
		return $parser->parse( $html, $encoding );
31 1
	}
32 1
33
}
34