Fuel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 5 1
A getVersion() 0 4 1
1
<?php
2
/**
3
 * CSP
4
 *
5
 * @author     Kenji Suzuki <https://github.com/kenjis>
6
 * @license    MIT License
7
 * @copyright  2014 Kenji Suzuki
8
 * @link       https://github.com/kenjis/php-csp-nonce-source
9
 */
10
11
namespace Kenjis\Csp\Browser;
12
13
/**
14
 * Browser Detector using FuelPHP v1 Agent class
15
 *
16
 * user agent string is fetched from $_SERVER.
17
 */
18
class Fuel implements AdapterInterface
19
{
20
    /**
21
     * @return string
22
     */
23
    public function getName()
24
    {
25
        // @TODO What about IE?
26
        return \Agent::browser();
27
    }
28
29
    /**
30
     * @return int
31
     */
32
    public function getVersion()
33
    {
34
        return (int) \Agent::version();
35
    }
36
}
37