Identify   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 4
dl 0
loc 78
c 0
b 0
f 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A os() 0 4 1
A device() 0 4 1
A browser() 0 4 1
A lang() 0 4 1
1
<?php
2
3
namespace Unicodeveloper\Identify;
4
5
use Sinergi\BrowserDetector\{ Os, Device, Browser, Language };
6
7
class Identify {
8
9
    /**
10
     * Store the os object
11
     * @var object
12
     */
13
    protected $os;
14
15
    /**
16
     * Store the device object
17
     * @var object
18
     */
19
    protected $device;
20
21
    /**
22
     * Store the browser object
23
     * @var object
24
     */
25
    protected $browser;
26
27
    /**
28
     * Store the language object
29
     * @var object
30
     */
31
    protected $language;
32
33
    /**
34
     *  Create an Instance of Browser and Os
35
     */
36
    public function __construct()
37
    {
38
        $this->os = new Os();
39
        $this->device = new Device();
40
        $this->browser = new Browser();
41
        $this->language = new Language();
42
    }
43
44
    /**
45
     * Get all the methods applicable to Os detection
46
     * e.g getName(), getVersion()
47
     * @return \Sinergi\BrowserDetector\Os
48
     */
49
    public function os() : Os
50
    {
51
        return $this->os;
52
    }
53
54
    /**
55
     * Get all the methods applicable to Device detection
56
     * e.g getName()
57
     * @return \Sinergi\BrowserDetector\Device
58
     */
59
    public function device() : Device
60
    {
61
        return $this->device;
62
    }
63
64
    /**
65
     * Get all the methods applicable to Browser detection
66
     * e.g getName(), getVersion()
67
     * @return \Sinergi\BrowserDetector\Browser
68
     */
69
    public function browser() : Browser
70
    {
71
        return $this->browser;
72
    }
73
74
    /**
75
     * Get all the methods applicable to Language detection
76
     * e.g getLanguage()
77
     * @return \Sinergi\BrowserDetector\Language
78
     */
79
    public function lang() : Language
80
    {
81
        return $this->language;
82
    }
83
84
}