ThinkPHPDriver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A _get() 0 4 1
A _set() 0 4 1
1
<?php
2
3
namespace Wechat\CacheDriver;
4
5
use Wechat\CacheDriver\BaseDriver;
6
7
/**
8
 * Thinkphp驱动.
9
 */
10
class ThinkPHPDriver extends BaseDriver
11
{
12
    /**
13
     * 根据缓存名获取缓存内容.
14
     *
15
     * @param string $name 缓存名
16
     */
17
    public function _get($name)
18
    {
19
        return S($name);
20
    }
21
22
    /**
23
     * 根据缓存名 设置缓存值和超时时间.
24
     *
25
     * @param string $name    缓存名
26
     * @param void   $value   缓存值
27
     * @param int    $expires 超时时间
28
     *
29
     * @return boolean;
0 ignored issues
show
Documentation introduced by
The doc-type boolean; could not be parsed: Expected "|" or "end of type", but got ";" at position 7. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
30
     */
31
    public function _set($name, $value, $expires)
32
    {
33
        return S($name, $value, $expires);
34
    }
35
}
36