Passed
Push — master ( 6a7898...d69e41 )
by Tim
01:42
created

MemcachePool::getExtendedStats()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
nc 1
nop 3
dl 0
loc 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
// Start of memcache v.3.0.8
4
5
class MemcachePool  {
6
7
    /**
8
     * (PECL memcache &gt;= 0.2.0)<br/>
9
     * Open memcached server connection
10
     * @link https://php.net/manual/en/memcache.connect.php
11
     * @param string $host <p>
12
     * Point to the host where memcached is listening for connections. This parameter
13
     * may also specify other transports like <em>unix:///path/to/memcached.sock</em>
14
     * to use UNIX domain sockets, in this case <b>port</b> must also
15
     * be set to <em>0</em>.
16
     * </p>
17
     * @param int $port [optional] <p>
18
     * Point to the port where memcached is listening for connections. Set this
19
     * parameter to <em>0</em> when using UNIX domain sockets.
20
     * </p>
21
     * <p>
22
     * Please note: <b>port</b> defaults to
23
     * {@link https://php.net/manual/ru/memcache.ini.php#ini.memcache.default-port memcache.default_port}
24
     * if not specified. For this reason it is wise to specify the port
25
     * explicitly in this method call.
26
     * </p>
27
     * @param int $timeout [optional] <p>Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.</p>
28
     * @return boolean <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
29
     */
30
    public function connect ($host, $port, $timeout = 1) {}
0 ignored issues
show
Unused Code introduced by
The parameter $port 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

30
    public function connect ($host, /** @scrutinizer ignore-unused */ $port, $timeout = 1) {}

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...
Unused Code introduced by
The parameter $timeout 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

30
    public function connect ($host, $port, /** @scrutinizer ignore-unused */ $timeout = 1) {}

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...
Unused Code introduced by
The parameter $host 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

30
    public function connect (/** @scrutinizer ignore-unused */ $host, $port, $timeout = 1) {}

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...
31
32
    /**
33
     * (PECL memcache &gt;= 2.0.0)<br/>
34
     * Add a memcached server to connection pool
35
     * @link https://php.net/manual/en/memcache.addserver.php
36
     * @param string $host <p>
37
     * Point to the host where memcached is listening for connections. This parameter
38
     * may also specify other transports like unix:///path/to/memcached.sock
39
     * to use UNIX domain sockets, in this case <i>port</i> must also
40
     * be set to 0.
41
     * </p>
42
     * @param int $port [optional] <p>
43
     * Point to the port where memcached is listening for connections.
44
     * Set this
45
     * parameter to 0 when using UNIX domain sockets.
46
     * </p>
47
     * <p>
48
     * Please note: <i>port</i> defaults to
49
     * memcache.default_port
50
     * if not specified. For this reason it is wise to specify the port
51
     * explicitly in this method call.
52
     * </p>
53
     * @param bool $persistent [optional] <p>
54
     * Controls the use of a persistent connection. Default to <b>TRUE</b>.
55
     * </p>
56
     * @param int $weight [optional] <p>
57
     * Number of buckets to create for this server which in turn control its
58
     * probability of it being selected. The probability is relative to the
59
     * total weight of all servers.
60
     * </p>
61
     * @param int $timeout [optional] <p>
62
     * Value in seconds which will be used for connecting to the daemon. Think
63
     * twice before changing the default value of 1 second - you can lose all
64
     * the advantages of caching if your connection is too slow.
65
     * </p>
66
     * @param int $retry_interval [optional] <p>
67
     * Controls how often a failed server will be retried, the default value
68
     * is 15 seconds. Setting this parameter to -1 disables automatic retry.
69
     * Neither this nor the <i>persistent</i> parameter has any
70
     * effect when the extension is loaded dynamically via <b>dl</b>.
71
     * </p>
72
     * <p>
73
     * Each failed connection struct has its own timeout and before it has expired
74
     * the struct will be skipped when selecting backends to serve a request. Once
75
     * expired the connection will be successfully reconnected or marked as failed
76
     * for another <i>retry_interval</i> seconds. The typical
77
     * effect is that each web server child will retry the connection about every
78
     * <i>retry_interval</i> seconds when serving a page.
79
     * </p>
80
     * @param bool $status [optional] <p>
81
     * Controls if the server should be flagged as online. Setting this parameter
82
     * to <b>FALSE</b> and <i>retry_interval</i> to -1 allows a failed
83
     * server to be kept in the pool so as not to affect the key distribution
84
     * algorithm. Requests for this server will then failover or fail immediately
85
     * depending on the <i>memcache.allow_failover</i> setting.
86
     * Default to <b>TRUE</b>, meaning the server should be considered online.
87
     * </p>
88
     * @param callable $failure_callback [optional] <p>
89
     * Allows the user to specify a callback function to run upon encountering an
90
     * error. The callback is run before failover is attempted. The function takes
91
     * two parameters, the hostname and port of the failed server.
92
     * </p>
93
     * @param int $timeoutms [optional] <p>
94
     * </p>
95
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
96
     */
97
    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}
0 ignored issues
show
Unused Code introduced by
The parameter $host 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

97
    public function addServer (/** @scrutinizer ignore-unused */ $host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $weight 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

97
    public function addServer ($host, $port = 11211, $persistent = true, /** @scrutinizer ignore-unused */ $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $retry_interval 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

97
    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, /** @scrutinizer ignore-unused */ $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $timeoutms 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

97
    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, /** @scrutinizer ignore-unused */ $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $status 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

97
    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, /** @scrutinizer ignore-unused */ $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $failure_callback 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

97
    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, /** @scrutinizer ignore-unused */ callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $persistent 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

97
    public function addServer ($host, $port = 11211, /** @scrutinizer ignore-unused */ $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $port 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

97
    public function addServer ($host, /** @scrutinizer ignore-unused */ $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
Unused Code introduced by
The parameter $timeout 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

97
    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, /** @scrutinizer ignore-unused */ $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

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...
98
99
    /**
100
     * (PECL memcache &gt;= 2.1.0)<br/>
101
     * Changes server parameters and status at runtime
102
     * @link https://secure.php.net/manual/en/memcache.setserverparams.php
103
     * @param string $host <p>Point to the host where memcached is listening for connections.</p.
104
     * @param int $port [optional] <p>
105
     * Point to the port where memcached is listening for connections.
106
     * </p>
107
     * @param int $timeout [optional] <p>
108
     * Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
109
     * </p>
110
     * @param int $retry_interval [optional] <p>
111
     * Controls how often a failed server will be retried, the default value
112
     * is 15 seconds. Setting this parameter to -1 disables automatic retry.
113
     * Neither this nor the <b>persistent</b> parameter has any
114
     * effect when the extension is loaded dynamically via {@link https://secure.php.net/manual/en/function.dl.php dl()}.
115
     * </p>
116
     * @param bool $status [optional] <p>
117
     * Controls if the server should be flagged as online. Setting this parameter
118
     * to <b>FALSE</b> and <b>retry_interval</b> to -1 allows a failed
119
     * server to be kept in the pool so as not to affect the key distribution
120
     * algorithm. Requests for this server will then failover or fail immediately
121
     * depending on the <b>memcache.allow_failover</b> setting.
122
     * Default to <b>TRUE</b>, meaning the server should be considered online.
123
     * </p>
124
     * @param callable $failure_callback [optional] <p>
125
     * Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted.
126
     * The function takes two parameters, the hostname and port of the failed server.
127
     * </p>
128
     * @return boolean <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
129
     */
130
    public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}
0 ignored issues
show
Unused Code introduced by
The parameter $status 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

130
    public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, /** @scrutinizer ignore-unused */ $status = true, callable $failure_callback = null) {}

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...
Unused Code introduced by
The parameter $timeout 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

130
    public function setServerParams ($host, $port = 11211, /** @scrutinizer ignore-unused */ $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}

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...
Unused Code introduced by
The parameter $host 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

130
    public function setServerParams (/** @scrutinizer ignore-unused */ $host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}

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...
Unused Code introduced by
The parameter $port 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

130
    public function setServerParams ($host, /** @scrutinizer ignore-unused */ $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}

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...
Unused Code introduced by
The parameter $retry_interval 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

130
    public function setServerParams ($host, $port = 11211, $timeout = 1, /** @scrutinizer ignore-unused */ $retry_interval = 15, $status = true, callable $failure_callback = null) {}

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...
Unused Code introduced by
The parameter $failure_callback 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

130
    public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, /** @scrutinizer ignore-unused */ callable $failure_callback = null) {}

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...
131
132
    /**
133
     *
134
     */
135
    public function setFailureCallback () {}
136
137
    /**
138
     * (PECL memcache &gt;= 2.1.0)<br/>
139
     * Returns server status
140
     * @link https://php.net/manual/en/memcache.getserverstatus.php
141
     * @param string $host Point to the host where memcached is listening for connections.
142
     * @param int $port Point to the port where memcached is listening for connections.
143
     * @return int Returns a the servers status. 0 if server is failed, non-zero otherwise
144
     */
145
    public function getServerStatus ($host, $port = 11211) {}
0 ignored issues
show
Unused Code introduced by
The parameter $port 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

145
    public function getServerStatus ($host, /** @scrutinizer ignore-unused */ $port = 11211) {}

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...
Unused Code introduced by
The parameter $host 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

145
    public function getServerStatus (/** @scrutinizer ignore-unused */ $host, $port = 11211) {}

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...
146
147
    /**
148
     *
149
     */
150
    public function findServer () {}
151
152
    /**
153
     * (PECL memcache &gt;= 0.2.0)<br/>
154
     * Return version of the server
155
     * @link https://php.net/manual/en/memcache.getversion.php
156
     * @return string|boolean Returns a string of server version number or <b>FALSE</b> on failure.
157
     */
158
    public function getVersion () {}
159
160
    /**
161
     * (PECL memcache &gt;= 2.0.0)<br/>
162
     * Add an item to the server. If the key already exists, the value will not be added and <b>FALSE</b> will be returned.
163
     * @link https://php.net/manual/en/memcache.add.php
164
     * @param string $key The key that will be associated with the item.
165
     * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
166
     * @param int $flag [optional] <p>
167
     * Use <b>MEMCACHE_COMPRESSED</b> to store the item
168
     * compressed (uses zlib).
169
     * </p>
170
     * @param int $expire [optional] <p>Expiration time of the item.
171
     * If it's equal to zero, the item will never expire.
172
     * You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
173
     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns <b>FALSE</b> if such key already exist. For the rest Memcache::add() behaves similarly to Memcache::set().
174
     */
175
    public function add ($key , $var, $flag = null, $expire = null) {}
0 ignored issues
show
Unused Code introduced by
The parameter $key 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

175
    public function add (/** @scrutinizer ignore-unused */ $key , $var, $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $expire 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

175
    public function add ($key , $var, $flag = null, /** @scrutinizer ignore-unused */ $expire = null) {}

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...
Unused Code introduced by
The parameter $flag 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

175
    public function add ($key , $var, /** @scrutinizer ignore-unused */ $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $var 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

175
    public function add ($key , /** @scrutinizer ignore-unused */ $var, $flag = null, $expire = null) {}

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...
176
177
    /**
178
     * (PECL memcache &gt;= 0.2.0)<br/>
179
     * Stores an item var with key on the memcached server. Parameter expire is expiration time in seconds.
180
     * If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time,
181
     * it could be deleted from the cache to make place for other items).
182
     * You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib).
183
     * @link https://php.net/manual/en/memcache.set.php
184
     * @param string $key The key that will be associated with the item.
185
     * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
186
     * @param int $flag [optional] Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).
187
     * @param int $expire [optional] Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).
188
     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
189
     */
190
    public function set ($key, $var, $flag = null, $expire = null) {}
0 ignored issues
show
Unused Code introduced by
The parameter $var 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

190
    public function set ($key, /** @scrutinizer ignore-unused */ $var, $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $key 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

190
    public function set (/** @scrutinizer ignore-unused */ $key, $var, $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $flag 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

190
    public function set ($key, $var, /** @scrutinizer ignore-unused */ $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $expire 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

190
    public function set ($key, $var, $flag = null, /** @scrutinizer ignore-unused */ $expire = null) {}

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...
191
192
    /**
193
     * (PECL memcache &gt;= 0.2.0)<br/>
194
     * Replace value of the existing item
195
     * @link https://php.net/manual/en/memcache.replace.php
196
     * @param string $key <p>The key that will be associated with the item.</p>
197
     * @param mixed $var <p>The variable to store. Strings and integers are stored as is, other types are stored serialized.</p>
198
     * @param int $flag [optional] <p>Use <b>MEMCACHE_COMPRESSED</b> to store the item compressed (uses zlib).</p>
199
     * @param int $expire [optional] <p>Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
200
     * @return boolean Returns TRUE on success or FALSE on failure.
201
     */
202
    public function replace ($key,  $var, $flag = null, $expire = null) {}
0 ignored issues
show
Unused Code introduced by
The parameter $flag 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

202
    public function replace ($key,  $var, /** @scrutinizer ignore-unused */ $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $expire 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

202
    public function replace ($key,  $var, $flag = null, /** @scrutinizer ignore-unused */ $expire = null) {}

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...
Unused Code introduced by
The parameter $var 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

202
    public function replace ($key,  /** @scrutinizer ignore-unused */ $var, $flag = null, $expire = null) {}

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...
Unused Code introduced by
The parameter $key 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

202
    public function replace (/** @scrutinizer ignore-unused */ $key,  $var, $flag = null, $expire = null) {}

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...
203
204
	public function cas () {}
205
206
	public function append () {}
207
208
    /**
209
     * @return string
210
     */
211
    public function prepend () {}
212
213
    /**
214
     * (PECL memcache &gt;= 0.2.0)<br/>
215
     * Retrieve item from the server
216
     * @link https://php.net/manual/en/memcache.get.php
217
     * @param string|array $key <p>
218
     * The key or array of keys to fetch.
219
     * </p>
220
     * @param int|array $flags [optional] <p>
221
     * If present, flags fetched along with the values will be written to this parameter. These
222
     * flags are the same as the ones given to for example {@link https://php.net/manual/en/memcache.set.php Memcache::set()}.
223
     * The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
224
     * compression and serialization status).
225
     * </p>
226
     * @return string|array <p>
227
     * Returns the string associated with the <b>key</b> or
228
     * an array of found key-value pairs when <b>key</b> is an {@link https://php.net/manual/en/language.types.array.php array}.
229
     * Returns <b>FALSE</b> on failure, <b>key</b> is not found or
230
     * <b>key</b> is an empty {@link https://php.net/manual/en/language.types.array.php array}.
231
     * </p>
232
     */
233
    public function get ($key, &$flags = null) {}
0 ignored issues
show
Unused Code introduced by
The parameter $key 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

233
    public function get (/** @scrutinizer ignore-unused */ $key, &$flags = null) {}

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...
Unused Code introduced by
The parameter $flags 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

233
    public function get ($key, /** @scrutinizer ignore-unused */ &$flags = null) {}

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...
234
235
    /**
236
     * (PECL memcache &gt;= 0.2.0)<br/>
237
     * Delete item from the server
238
     * https://secure.php.net/manual/ru/memcache.delete.php
239
     * @param $key string The key associated with the item to delete.
240
     * @param $timeout int [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter.
241
     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
242
     */
243
    public function delete ($key, $timeout = 0 ) {}
0 ignored issues
show
Unused Code introduced by
The parameter $key 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

243
    public function delete (/** @scrutinizer ignore-unused */ $key, $timeout = 0 ) {}

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...
Unused Code introduced by
The parameter $timeout 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

243
    public function delete ($key, /** @scrutinizer ignore-unused */ $timeout = 0 ) {}

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...
244
245
    /**
246
     * (PECL memcache &gt;= 0.2.0)<br/>
247
     * Get statistics of the server
248
     * @link https://php.net/manual/ru/memcache.getstats.php
249
     * @param string $type [optional] <p>
250
     * The type of statistics to fetch.
251
     * Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}.
252
     * According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
253
     * @param int $slabid [optional] <p>
254
     * Used in conjunction with <b>type</b> set to
255
     * cachedump to identify the slab to dump from. The cachedump
256
     * command ties up the server and is strictly to be used for
257
     * debugging purposes.
258
     * </p>
259
     * @param int $limit [optional] <p>
260
     * Used in conjunction with <b>type</b> set to cachedump to limit the number of entries to dump.
261
     * </p>
262
     * @return array|bool Returns an associative array of server statistics or <b>FALSE</b> on failure.
263
     */
264
    public function getStats ($type = null, $slabid = null, $limit = 100) {}
0 ignored issues
show
Unused Code introduced by
The parameter $limit 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

264
    public function getStats ($type = null, $slabid = null, /** @scrutinizer ignore-unused */ $limit = 100) {}

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...
Unused Code introduced by
The parameter $slabid 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

264
    public function getStats ($type = null, /** @scrutinizer ignore-unused */ $slabid = null, $limit = 100) {}

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...
Unused Code introduced by
The parameter $type 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

264
    public function getStats (/** @scrutinizer ignore-unused */ $type = null, $slabid = null, $limit = 100) {}

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...
265
266
    /**
267
     * (PECL memcache &gt;= 2.0.0)<br/>
268
     * Get statistics from all servers in pool
269
     * @link https://php.net/manual/en/memcache.getextendedstats.php
270
     * @param string $type [optional] <p>The type of statistics to fetch. Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
271
     * @param int $slabid [optional] <p>
272
     * Used in conjunction with <b>type</b> set to
273
     * cachedump to identify the slab to dump from. The cachedump
274
     * command ties up the server and is strictly to be used for
275
     * debugging purposes.
276
     * </p>
277
     * @param int $limit Used in conjunction with type set to cachedump to limit the number of entries to dump.
278
     * @return array|bool Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
279
     * Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
280
     * on failure.
281
     */
282
    public function getExtendedStats ($type = null, $slabid = null, $limit = 100) {}
0 ignored issues
show
Unused Code introduced by
The parameter $slabid 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

282
    public function getExtendedStats ($type = null, /** @scrutinizer ignore-unused */ $slabid = null, $limit = 100) {}

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...
Unused Code introduced by
The parameter $limit 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

282
    public function getExtendedStats ($type = null, $slabid = null, /** @scrutinizer ignore-unused */ $limit = 100) {}

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...
Unused Code introduced by
The parameter $type 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

282
    public function getExtendedStats (/** @scrutinizer ignore-unused */ $type = null, $slabid = null, $limit = 100) {}

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...
283
284
    /**
285
     * (PECL memcache &gt;= 2.0.0)<br/>
286
     * Enable automatic compression of large values
287
     * @link https://php.net/manual/en/memcache.setcompressthreshold.php
288
     * @param int $thresold <p>Controls the minimum value length before attempting to compress automatically.</p>
289
     * @param float $min_saving [optional] <p>Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.</p>
290
     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
291
     */
292
    public function setCompressThreshold ($thresold, $min_saving = 0.2) {}
0 ignored issues
show
Unused Code introduced by
The parameter $min_saving 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

292
    public function setCompressThreshold ($thresold, /** @scrutinizer ignore-unused */ $min_saving = 0.2) {}

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...
Unused Code introduced by
The parameter $thresold 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

292
    public function setCompressThreshold (/** @scrutinizer ignore-unused */ $thresold, $min_saving = 0.2) {}

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...
293
    /**
294
     * (PECL memcache &gt;= 0.2.0)<br/>
295
     * Increment item's value
296
     * @link https://php.net/manual/en/memcache.increment.php
297
     * @param $key string Key of the item to increment.
298
     * @param $value int [optional] increment the item by <b>value</b>
299
     * @return int|boolean Returns new items value on success or <b>FALSE</b> on failure.
300
     */
301
    public function increment ($key, $value = 1) {}
0 ignored issues
show
Unused Code introduced by
The parameter $value 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

301
    public function increment ($key, /** @scrutinizer ignore-unused */ $value = 1) {}

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...
Unused Code introduced by
The parameter $key 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

301
    public function increment (/** @scrutinizer ignore-unused */ $key, $value = 1) {}

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...
302
303
    /**
304
     * (PECL memcache &gt;= 0.2.0)<br/>
305
     * Decrement item's value
306
     * @link https://php.net/manual/en/memcache.decrement.php
307
     * @param $key string Key of the item do decrement.
308
     * @param $value int Decrement the item by <b>value</b>.
309
     * @return int|boolean Returns item's new value on success or <b>FALSE</b> on failure.
310
     */
311
    public function decrement ($key, $value = 1) {}
0 ignored issues
show
Unused Code introduced by
The parameter $value 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

311
    public function decrement ($key, /** @scrutinizer ignore-unused */ $value = 1) {}

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...
Unused Code introduced by
The parameter $key 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

311
    public function decrement (/** @scrutinizer ignore-unused */ $key, $value = 1) {}

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...
312
313
    /**
314
     * (PECL memcache &gt;= 0.4.0)<br/>
315
     * Close memcached server connection
316
     * @link https://php.net/manual/en/memcache.close.php
317
     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
318
     */
319
    public function close () {}
320
321
    /**
322
     * (PECL memcache &gt;= 1.0.0)<br/>
323
     * Flush all existing items at the server
324
     * @link https://php.net/manual/en/memcache.flush.php
325
     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
326
     */
327
    public function flush () {}
328
329
}
330
331
/**
332
 * Represents a connection to a set of memcache servers.
333
 * @link https://php.net/manual/en/class.memcache.php
334
 */
335
class Memcache extends MemcachePool  {
336
337
338
	/**
339
	 * (PECL memcache &gt;= 0.4.0)<br/>
340
	 * Open memcached server persistent connection
341
	 * @link https://php.net/manual/en/memcache.pconnect.php
342
	 * @param string $host <p>
343
	 * Point to the host where memcached is listening for connections. This parameter
344
	 * may also specify other transports like unix:///path/to/memcached.sock
345
	 * to use UNIX domain sockets, in this case <i>port</i> must also
346
	 * be set to 0.
347
	 * </p>
348
	 * @param int $port [optional] <p>
349
	 * Point to the port where memcached is listening for connections. Set this
350
	 * parameter to 0 when using UNIX domain sockets.
351
	 * </p>
352
	 * @param int $timeout [optional] <p>
353
	 * Value in seconds which will be used for connecting to the daemon. Think
354
	 * twice before changing the default value of 1 second - you can lose all
355
	 * the advantages of caching if your connection is too slow.
356
	 * </p>
357
	 * @return mixed a Memcache object or <b>FALSE</b> on failure.
358
	 */
359
	public function pconnect ($host, $port, $timeout = 1) {}
0 ignored issues
show
Unused Code introduced by
The parameter $port 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

359
	public function pconnect ($host, /** @scrutinizer ignore-unused */ $port, $timeout = 1) {}

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...
Unused Code introduced by
The parameter $timeout 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

359
	public function pconnect ($host, $port, /** @scrutinizer ignore-unused */ $timeout = 1) {}

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...
Unused Code introduced by
The parameter $host 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

359
	public function pconnect (/** @scrutinizer ignore-unused */ $host, $port, $timeout = 1) {}

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...
360
}
361
362
//  string $host [, int $port [, int $timeout ]]
363
364
/**
365
 * (PECL memcache >= 0.2.0)</br>
366
 * Memcache::connect — Open memcached server connection
367
 * @link https://php.net/manual/en/memcache.connect.php
368
 * @param string $host <p>
369
 * Point to the host where memcached is listening for connections.
370
 * This parameter may also specify other transports like
371
 * unix:///path/to/memcached.sock to use UNIX domain sockets,
372
 * in this case port must also be set to 0.
373
 * </p>
374
 * @param int $port [optional] <p>
375
 * Point to the port where memcached is listening for connections.
376
 * Set this parameter to 0 when using UNIX domain sockets.
377
 * Note:  port defaults to memcache.default_port if not specified.
378
 * For this reason it is wise to specify the port explicitly in this method call.
379
 * </p>
380
 * @param int $timeout [optional] <p>
381
 * Value in seconds which will be used for connecting to the daemon.
382
 * </p>
383
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
384
 */
385
function memcache_connect ($host, $port, $timeout = 1) {}
0 ignored issues
show
Unused Code introduced by
The parameter $host 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

385
function memcache_connect (/** @scrutinizer ignore-unused */ $host, $port, $timeout = 1) {}

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...
Unused Code introduced by
The parameter $timeout 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

385
function memcache_connect ($host, $port, /** @scrutinizer ignore-unused */ $timeout = 1) {}

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...
Unused Code introduced by
The parameter $port 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

385
function memcache_connect ($host, /** @scrutinizer ignore-unused */ $port, $timeout = 1) {}

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...
386
387
/**
388
 * (PECL memcache >= 0.4.0)
389
 * Memcache::pconnect — Open memcached server persistent connection
390
 * 
391
 * @link https://php.net/manual/en/memcache.pconnect.php#example-5242
392
 * @param      $host
393
 * @param null $port
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $port is correct as it would always require null to be passed?
Loading history...
394
 * @param int  $timeout
395
 * @return Memcache
396
 */
397
function memcache_pconnect ($host, $port=null, $timeout=1) {}
0 ignored issues
show
Unused Code introduced by
The parameter $timeout 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

397
function memcache_pconnect ($host, $port=null, /** @scrutinizer ignore-unused */ $timeout=1) {}

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...
Unused Code introduced by
The parameter $port 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

397
function memcache_pconnect ($host, /** @scrutinizer ignore-unused */ $port=null, $timeout=1) {}

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...
Unused Code introduced by
The parameter $host 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

397
function memcache_pconnect (/** @scrutinizer ignore-unused */ $host, $port=null, $timeout=1) {}

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...
398
399
function memcache_add_server () {}
400
401
function memcache_set_server_params () {}
402
403
function memcache_set_failure_callback () {}
404
405
function memcache_get_server_status () {}
406
407
function memcache_get_version () {}
408
409
function memcache_add () {}
410
411
function memcache_set () {}
412
413
function memcache_replace () {}
414
415
function memcache_cas () {}
416
417
function memcache_append () {}
418
419
function memcache_prepend () {}
420
421
function memcache_get () {}
422
423
function memcache_delete () {}
424
425
/**
426
 * (PECL memcache &gt;= 0.2.0)<br/>
427
 * Turn debug output on/off
428
 * @link https://php.net/manual/en/function.memcache-debug.php
429
 * @param bool $on_off <p>
430
 * Turns debug output on if equals to <b>TRUE</b>.
431
 * Turns debug output off if equals to <b>FALSE</b>.
432
 * </p>
433
 * @return bool <b>TRUE</b> if PHP was built with --enable-debug option, otherwise
434
 * returns <b>FALSE</b>.
435
 */
436
function memcache_debug ($on_off) {}
0 ignored issues
show
Unused Code introduced by
The parameter $on_off 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

436
function memcache_debug (/** @scrutinizer ignore-unused */ $on_off) {}

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...
437
438
function memcache_get_stats () {}
439
440
function memcache_get_extended_stats () {}
441
442
function memcache_set_compress_threshold () {}
443
444
function memcache_increment () {}
445
446
function memcache_decrement () {}
447
448
function memcache_close () {}
449
450
function memcache_flush () {}
451
452
define ('MEMCACHE_COMPRESSED', 2);
453
define ('MEMCACHE_USER1', 65536);
454
define ('MEMCACHE_USER2', 131072);
455
define ('MEMCACHE_USER3', 262144);
456
define ('MEMCACHE_USER4', 524288);
457
define ('MEMCACHE_HAVE_SESSION', 1);
458
459
// End of memcache v.3.0.8
460
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
461