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

DriverIO::getReadMiss()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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 Khoa Bui (khoaofgod)  <[email protected]> https://www.phpfastcache.com
12
 * @author Georges.L (Geolim4)  <[email protected]>
13
 *
14
 */
15
declare(strict_types=1);
16
17
namespace Phpfastcache\Entities;
18
19
/**
20
 * Class DriverStatistic
21
 * @package phpFastCache\Entities
22
 */
23
class DriverIO
24
{
25
    /**
26
     * @var int
27
     */
28
    protected $writeHit = 0;
29
30
    /**
31
     * @var int
32
     */
33
    protected $readHit = 0;
34
35
    /**
36
     * @var int
37
     */
38
    protected $readMiss = 0;
39
40
    /**
41
     * @return int
42
     */
43
    public function getWriteHit(): int
44
    {
45
        return $this->writeHit;
46
    }
47
48
    /**
49
     * @param int $writeHit
50
     * @return DriverIO
51
     */
52
    public function setWriteHit(int $writeHit): DriverIO
53
    {
54
        $this->writeHit = $writeHit;
55
        return $this;
56
    }
57
58
    /**
59
     * @return DriverIO
60
     */
61
    public function incWriteHit(): DriverIO
62
    {
63
        $this->writeHit++;
64
        return $this;
65
    }
66
67
    /**
68
     * @return int
69
     */
70
    public function getReadHit(): int
71
    {
72
        return $this->readHit;
73
    }
74
75
    /**
76
     * @param int $readHit
77
     * @return DriverIO
78
     */
79
    public function setReadHit(int $readHit): DriverIO
80
    {
81
        $this->readHit = $readHit;
82
        return $this;
83
    }
84
85
    /**
86
     * @return DriverIO
87
     */
88
    public function incReadHit(): DriverIO
89
    {
90
        $this->readHit++;
91
        return $this;
92
    }
93
94
    /**
95
     * @return int
96
     */
97
    public function getReadMiss(): int
98
    {
99
        return $this->readMiss;
100
    }
101
102
    /**
103
     * @param int $readMiss
104
     * @return DriverIO
105
     */
106
    public function setReadMiss(int $readMiss): DriverIO
107
    {
108
        $this->readMiss = $readMiss;
109
        return $this;
110
    }
111
112
    /**
113
     * @return DriverIO
114
     */
115
    public function incReadMiss(): DriverIO
116
    {
117
        $this->readMiss++;
118
        return $this;
119
    }
120
}