Passed
Pull Request — master (#727)
by Georges
03:47 queued 02:09
created

ClusterPoolTrait   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 51
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A driverCheck() 0 3 1
A driverClear() 0 3 1
A driverConnect() 0 3 1
A driverDelete() 0 3 1
A driverWrite() 0 3 1
A driverRead() 0 3 1
1
<?php
2
3
/**
4
 *
5
 * This file is part of phpFastCache.
6
 *
7
 * @license MIT License (MIT)
8
 *
9
 * For full copyright and license information, please see the docs/CREDITS.txt file.
10
 *
11
 * @author  Georges.L (Geolim4)  <[email protected]>
12
 *
13
 */
14
declare(strict_types=1);
15
16
namespace Phpfastcache\Cluster;
17
18
use Psr\Cache\CacheItemInterface;
19
20
trait ClusterPoolTrait
21
{
22
    /**
23
     * @return bool
24
     */
25
    protected function driverCheck(): bool
26
    {
27
        return true;
28
    }
29
30
    /**
31
     * @return bool
32
     */
33
    protected function driverConnect(): bool
34
    {
35
        return true;
36
    }
37
38
    /**
39
     * @param CacheItemInterface $item
40
     * @return null
41
     */
42
    protected function driverRead(CacheItemInterface $item)
1 ignored issue
show
Unused Code introduced by
The parameter $item is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

42
    protected function driverRead(/** @scrutinizer ignore-unused */ CacheItemInterface $item)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
43
    {
44
        return null;
45
    }
46
47
    /**
48
     * @param CacheItemInterface $item
49
     * @return bool
50
     */
51
    protected function driverWrite(CacheItemInterface $item): bool
1 ignored issue
show
Unused Code introduced by
The parameter $item is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

51
    protected function driverWrite(/** @scrutinizer ignore-unused */ CacheItemInterface $item): bool

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
52
    {
53
        return true;
54
    }
55
56
    /**
57
     * @param CacheItemInterface $item
58
     * @return bool
59
     */
60
    protected function driverDelete(CacheItemInterface $item): bool
1 ignored issue
show
Unused Code introduced by
The parameter $item is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

60
    protected function driverDelete(/** @scrutinizer ignore-unused */ CacheItemInterface $item): bool

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
61
    {
62
        return true;
63
    }
64
65
    /**
66
     * @return bool
67
     */
68
    protected function driverClear(): bool
69
    {
70
        return true;
71
    }
72
}
73