| Conditions | 4 |
| Paths | 6 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4.3731 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 1 | public function get($key) { |
|
| 38 | 1 | // see http://php.net/manual/en/memcache.get.php#112056 for explanation of this |
|
| 39 | 1 | $was_found = false; |
|
| 40 | if (class_exists('\Memcached')) { |
||
| 41 | $value = self::$memcache->get(OPTION_TWFY_DB_NAME . ':' . $key, null, $was_found); |
||
| 42 | } elseif (class_exists('\Memcache')) { |
||
| 43 | 1 | $value = self::$memcache->get(OPTION_TWFY_DB_NAME . ':' . $key, $was_found); |
|
| 44 | 1 | } |
|
| 45 | if ($was_found === false) { |
||
| 46 | return false; // mmmmm |
||
| 47 | } else { |
||
| 48 | return $value; |
||
| 49 | } |
||
| 52 |