Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 27.27% |
Changes | 0 |
1 | <?php |
||
5 | trait UserAgentTrait |
||
6 | { |
||
7 | /** |
||
8 | * An self::setUserAgent()'s alias to add an user-agent wich correspond to a Desktop PC. |
||
9 | * |
||
10 | * @return self |
||
11 | */ |
||
12 | 5 | public function setDesktopUserAgent() |
|
13 | { |
||
14 | 5 | $this->setUserAgent('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0'); |
|
|
|||
15 | |||
16 | 5 | return $this; |
|
17 | } |
||
18 | |||
19 | /** |
||
20 | * An self::setUserAgent()'s alias to add an user-agent wich correspond to a mobile. |
||
21 | * |
||
22 | * @return self |
||
23 | */ |
||
24 | public function setMobileUserAgent() |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * An self::setUserAgent()'s alias to add an user-agent wich correspond to a webrowser without javascript. |
||
34 | * |
||
35 | * @return self |
||
36 | */ |
||
37 | public function setLessJsUserAgent() |
||
43 | } |
||
44 | } |
||
45 |