Fuel::getVersion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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