MobileDetector   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isMobile() 0 7 3
1
<?php
2
namespace rtens\domin\delivery\web;
3
4
use Detection\MobileDetect;
5
6
class MobileDetector {
7
8
    /**
9
     * @return bool
10
     */
11
    public function isMobile() {
12
        if (class_exists(MobileDetect::class)) {
13
            $detect = new MobileDetect();
14
            return $detect->isMobile() || $detect->isTablet();
15
        }
16
        return true;
17
    }
18
19
}