| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public static function googlebotStrict($line) |
||
| 18 | { |
||
| 19 | if (false !== stripos($line->getUserAgent(), 'googlebot')) { |
||
| 20 | if (! isset(self::$cacheIpGoogle[$line->getIp()])) { |
||
| 21 | self::$cacheIpGoogle[$line->getIp()] = false !== strpos(gethostbyaddr($line->getIp()), 'googlebot'); |
||
| 22 | } |
||
| 23 | |||
| 24 | return self::$cacheIpGoogle[$line->getIp()]; |
||
| 25 | } |
||
| 26 | |||
| 27 | return false; |
||
| 28 | } |
||
| 35 |