MobileDetect::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace MobileDetectModule\Mvc\Controller\Plugin;
4
5
use Detection\MobileDetect as MobileDetector;
6
use Zend\Mvc\Controller\Plugin\AbstractPlugin;
7
8
/**
9
 * @author Nikola Posa <[email protected]>
10
 */
11
final class MobileDetect extends AbstractPlugin
12
{
13
    /**
14
     * @var MobileDetector
15
     */
16
    private $mobileDetect;
17
    
18 2
    public function __construct(MobileDetector $mobileDetect)
19
    {
20 2
        $this->mobileDetect = $mobileDetect;
21 2
    }
22
23
    /**
24
     * @return MobileDetector
25
     */
26 1
    public function __invoke()
27
    {
28 1
        return $this->mobileDetect;
29
    }
30
}
31