Conditions | 4 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public static function isGooglePageSpeed($useCache = true) |
||
41 | { |
||
42 | if (null === self::$_cache || false === $useCache) { |
||
43 | $userAgent = Yii::$app->getRequest()->getUserAgent(); |
||
44 | self::$_cache = (null !== $userAgent) && (false !== stripos($userAgent, 'Speed Insights')); |
||
45 | } |
||
46 | |||
47 | return self::$_cache; |
||
48 | } |
||
49 | } |
||
50 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.