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