Total Complexity | 3 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 3 | Features | 0 |
1 | <?php |
||
5 | trait UserAgentTrait |
||
6 | { |
||
7 | public string $desktopUserAgent = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0'; |
||
8 | |||
9 | public string $mobileUserAgent = 'Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36' |
||
10 | .' (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Mobile Safari/537.36'; |
||
11 | |||
12 | public string $lessJsUserAgent = 'NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 ' |
||
13 | .'UP.Link/6.3.1.13.0'; |
||
14 | |||
15 | abstract public function setUserAgent(string $ua); |
||
16 | |||
17 | /** |
||
18 | * An self::setUserAgent()'s alias to add an user-agent wich correspond to a Desktop PC. |
||
19 | * |
||
20 | * @return self |
||
21 | */ |
||
22 | 24 | public function setDesktopUserAgent() |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * An self::setUserAgent()'s alias to add an user-agent wich correspond to a mobile. |
||
31 | * |
||
32 | * @return self |
||
33 | */ |
||
34 | 3 | public function setMobileUserAgent() |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * An self::setUserAgent()'s alias to add an user-agent wich correspond to a webrowser without javascript. |
||
43 | * |
||
44 | * @return self |
||
45 | */ |
||
46 | 3 | public function setLessJsUserAgent() |
|
53 |