Completed
Branch 3.0.0 (3f0ab7)
by Serhii
03:15
created

Browser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 16
rs 10
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A initEmpty() 0 4 1
1
<?php
2
/**
3
 * @author Sergey Nehaenko <[email protected]>
4
 * @license GPL
5
 * @copyright Sergey Nehaenko &copy 2016
6
 * @version 3.0.0
7
 * @project browser-detector
8
 */
9
10
namespace EndorphinStudio\Detector;
11
12
13
class Browser extends DataWithVersion
14
{
15
    /**
16
     * Browser constructor.
17
     * @param \SimpleXMLElement $xmlData Xml data from file
18
     */
19
    public function __construct(\SimpleXMLElement $xmlData)
20
    {
21
        parent::__construct($xmlData);
22
    }
23
24
    public static function initEmpty()
25
    {
26
        return new self(new \SimpleXMLElement('<null>null</null>'));
27
    }
28
}
29