| Total Complexity | 10 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Context |
||
| 8 | { |
||
| 9 | protected static $box = []; |
||
| 10 | |||
| 11 | public static function get($key) |
||
| 12 | { |
||
| 13 | $cid = Coroutine::getCid(); |
||
|
|
|||
| 14 | if ($cid < 0) { |
||
| 15 | return null; |
||
| 16 | } |
||
| 17 | if (isset(self::$box[$cid][$key])) { |
||
| 18 | return self::$box[$cid][$key]; |
||
| 19 | } |
||
| 20 | return null; |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function put($key, $item) |
||
| 24 | { |
||
| 25 | $cid = Coroutine::getCid(); |
||
| 26 | if ($cid > 0) { |
||
| 27 | self::$box[$cid][$key] = $item; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | public static function delete($key = null) |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | public static function inCoroutine() |
||
| 46 | } |
||
| 47 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.