Code Duplication    Length = 13-14 lines in 2 locations

src/AppserverIo/Server/Configuration/LoggerXmlConfiguration.php 1 location

@@ 72-85 (lines=14) @@
69
     *
70
     * @param \SimpleXMLElement $node The simple xml element used to build config
71
     */
72
    public function __construct(\SimpleXMLElement $node)
73
    {
74
        // prepare properties
75
        $this->name = (string)$node->attributes()->name;
76
        $this->type = (string)$node->attributes()->type;
77
        if (isset($node->attributes()->channel)) {
78
            $this->channel = (string)$node->attributes()->channel;
79
        }
80
81
        // prepare handlers
82
        $this->handlers = $this->prepareHandlers($node);
83
        // prepare processors
84
        $this->processors = $this->prepareProcessors($node);
85
    }
86
87
    /**
88
     * Returns name

src/AppserverIo/Server/Configuration/UpstreamXmlConfiguration.php 1 location

@@ 62-74 (lines=13) @@
59
     *
60
     * @param \SimpleXMLElement $node The simple xml element used to build config
61
     */
62
    public function __construct(\SimpleXMLElement $node)
63
    {
64
        // prepare properties
65
        $this->name = (string)$node->attributes()->name;
66
        $this->type = (string)$node->attributes()->type;
67
        
68
        if (isset($node->attributes()->channel)) {
69
            $this->channel = (string)$node->attributes()->channel;
70
        }
71
    
72
        // prepare handlers
73
        $this->servers = $this->prepareServers($node);
74
    }
75
    
76
    /**
77
     * Prepares server nodes configured for upstream