| 1 | <?php |
||
| 18 | class UserAgentHelper |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var null|string |
||
| 22 | */ |
||
| 23 | private static $_cache; |
||
| 24 | |||
| 25 | |||
| 26 | /** |
||
| 27 | * This class should not be instantiated. |
||
| 28 | */ |
||
| 29 | private function __construct() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Check whether user agent is a Google Page Speed Insights. |
||
| 35 | * @see https://stackoverflow.com/questions/29162881 |
||
| 36 | * |
||
| 37 | * @param bool $useCache |
||
| 38 | * @return bool |
||
|
|
|||
| 39 | */ |
||
| 40 | public static function isGooglePageSpeed($useCache = true) |
||
| 49 | } |
||
| 50 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.