Completed
Push — master ( 621a4a...1ebfb1 )
by Auke
01:44
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
    private static $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
    public static $writer=null;    
18
        
19 2
    public static function __callStatic( $name, $args ) 
20
    {
21 2
        if ( !isset(self::$writer) ) {
22 2
            self::$writer = new html\Writer();
23 1
        }
24 2
        return call_user_func_array( [ self::$writer, $name ], $args );
25
    }
26
27 3
    public static function parse( $html=null, $encoding = null ) 
28
    {
29 3
        $parser = new html\Parser();
30 3
        return $parser->parse( $html, $encoding );
31
    }
32
33
}
34