Code Duplication    Length = 9-9 lines in 2 locations

src/xml/Parser.php 1 location

@@ 10-18 (lines=9) @@
7
8
    public $namespaces = array();
9
10
    public function __construct( $options = array() )
11
    {
12
        $optionList = array( 'namespaces' );
13
        foreach( $options as $option => $optionValue) {
14
            if (in_array( $option, $optionList )) {
15
                $this->{$option} = $optionValue;
16
            }
17
        }
18
    }
19
20
    public function parse( $xml, $encoding = null )
21
    {

src/xml/Writer.php 1 location

@@ 9-17 (lines=9) @@
6
7
    public $indent = false;
8
9
    public function __construct( $options = array())
10
    {
11
        $optionList = array( 'indent' );
12
        foreach( $options as $option => $optionValue) {
13
            if (in_array( $option, $optionList )) {
14
                $this->{$option} = $optionValue;
15
            }
16
        }
17
    }
18
19
    public function __call( $name, $args)
20
    {