Skip to content

Commit d910021

Browse files
committed
Normalized phpFastCache\Entities\DriverStatistic class name
1 parent 3ff7d15 commit d910021

26 files changed

Lines changed: 210 additions & 70 deletions

File tree

docs/migration/MigratingFromV5ToV6.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,13 @@ In the V5 the driver was making use of of the [deprecated class Mongo](http://ph
193193

194194
#### :alarm_clock: Now:
195195
In the V6 we made an important change: We now make use of [Mongodb Driver](http://php.net/manual/fr/set.mongodb.php)
196-
Only your code configuration will have to be updated, PhpFastCache manages all the abstract couch by itself.
196+
Only your code configuration will have to be updated, PhpFastCache manages all the abstract couch by itself.
197+
198+
### DriverStatistic class name has changed
199+
:warning: As of the V6, DriverStatistic class name has changed for a better classes name normalization
200+
201+
#### :clock1: Then:
202+
In the V5 the class was named `phpFastCache\Entities\driverStatistic`
203+
204+
#### :alarm_clock: Now:
205+
In the V6 it has changed and is now `phpFastCache\Entities\DriverStatistic` (with a **D** uppercase)

src/phpFastCache/Core/Pool/ExtendedCacheItemPoolInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use InvalidArgumentException;
1818
use phpFastCache\Core\Item\ExtendedCacheItemInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\EventManager;
2121
use Psr\Cache\CacheItemInterface;
2222
use Psr\Cache\CacheItemPoolInterface;
@@ -128,7 +128,7 @@ public function getItemsAsJsonString(array $keys = [], $option = 0, $depth = 512
128128
public function setItem(CacheItemInterface $item);
129129

130130
/**
131-
* @return driverStatistic
131+
* @return DriverStatistic
132132
*/
133133
public function getStats();
134134

src/phpFastCache/Core/Pool/IO/IOHelperTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use phpFastCache\Core\Item\ExtendedCacheItemInterface;
1818
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\EventManager;
2121
use phpFastCache\Exceptions\phpFastCacheIOException;
2222
use phpFastCache\Util\Directory;
@@ -316,12 +316,12 @@ protected function writefile($file, $data, $secureFileManipulation = false)
316316
/**
317317
* Provide a generic getStats() method
318318
* for files-based drivers
319-
* @return driverStatistic
319+
* @return DriverStatistic
320320
* @throws \phpFastCache\Exceptions\phpFastCacheIOException
321321
*/
322322
public function getStats()
323323
{
324-
$stat = new driverStatistic();
324+
$stat = new DriverStatistic();
325325
$path = $this->getFilePath(false);
326326

327327
if (!is_dir($path)) {

src/phpFastCache/Drivers/Apc/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use phpFastCache\Core\Pool\DriverBaseTrait;
1818
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2121
use phpFastCache\Exceptions\phpFastCacheDriverException;
2222
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -129,14 +129,14 @@ protected function driverConnect()
129129
*******************/
130130

131131
/**
132-
* @return driverStatistic
132+
* @return DriverStatistic
133133
*/
134134
public function getStats()
135135
{
136136
$stats = (array) apc_cache_info('user');
137137
$date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]);
138138

139-
return (new driverStatistic())
139+
return (new DriverStatistic())
140140
->setData(implode(', ', array_keys($this->itemInstances)))
141141
->setInfo(sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
142142
$stats[ 'num_entries' ]))

src/phpFastCache/Drivers/Apcu/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use phpFastCache\Core\Pool\DriverBaseTrait;
1818
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2121
use phpFastCache\Exceptions\phpFastCacheDriverException;
2222
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -129,14 +129,14 @@ protected function driverConnect()
129129
*******************/
130130

131131
/**
132-
* @return driverStatistic
132+
* @return DriverStatistic
133133
*/
134134
public function getStats()
135135
{
136136
$stats = (array) apcu_cache_info();
137137
$date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]);
138138

139-
return (new driverStatistic())
139+
return (new DriverStatistic())
140140
->setData(implode(', ', array_keys($this->itemInstances)))
141141
->setInfo(sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), $stats[ 'num_entries' ]))
142142
->setRawData($stats)

src/phpFastCache/Drivers/Cassandra/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use phpFastCache\Core\Pool\DriverBaseTrait;
1818
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2121
use phpFastCache\Exceptions\phpFastCacheDriverException;
2222
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -284,7 +284,7 @@ public function getHelp()
284284
}
285285

286286
/**
287-
* @return driverStatistic
287+
* @return DriverStatistic
288288
* @throws \Cassandra\Exception
289289
*/
290290
public function getStats()
@@ -295,7 +295,7 @@ public function getStats()
295295
self::CASSANDRA_TABLE
296296
)));
297297

298-
return (new driverStatistic())
298+
return (new DriverStatistic())
299299
->setSize($result->first()[ 'cache_size' ])
300300
->setRawData([])
301301
->setData(implode(', ', array_keys($this->itemInstances)))

src/phpFastCache/Drivers/Cookie/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use phpFastCache\Core\Pool\DriverBaseTrait;
1818
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2121
use phpFastCache\Exceptions\phpFastCacheDriverException;
2222
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -176,12 +176,12 @@ protected function driverClear()
176176
*******************/
177177

178178
/**
179-
* @return driverStatistic
179+
* @return DriverStatistic
180180
*/
181181
public function getStats()
182182
{
183183
$size = 0;
184-
$stat = new driverStatistic();
184+
$stat = new DriverStatistic();
185185
$stat->setData($_COOKIE);
186186

187187
/**

src/phpFastCache/Drivers/Couchbase/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use CouchbaseCluster as CouchbaseClient;
1818
use phpFastCache\Core\Pool\DriverBaseTrait;
1919
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
20-
use phpFastCache\Entities\driverStatistic;
20+
use phpFastCache\Entities\DriverStatistic;
2121
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2222
use phpFastCache\Exceptions\phpFastCacheDriverException;
2323
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -186,13 +186,13 @@ protected function setBucket($bucketName, \CouchbaseBucket $CouchbaseBucket)
186186
*******************/
187187

188188
/**
189-
* @return driverStatistic
189+
* @return DriverStatistic
190190
*/
191191
public function getStats()
192192
{
193193
$info = $this->getBucket()->manager()->info();
194194

195-
return (new driverStatistic())
195+
return (new DriverStatistic())
196196
->setSize($info[ 'basicStats' ][ 'diskUsed' ])
197197
->setRawData($info)
198198
->setData(implode(', ', array_keys($this->itemInstances)))

src/phpFastCache/Drivers/Couchdb/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Doctrine\CouchDB\CouchDBException;
1919
use phpFastCache\Core\Pool\DriverBaseTrait;
2020
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
21-
use phpFastCache\Entities\driverStatistic;
21+
use phpFastCache\Entities\DriverStatistic;
2222
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2323
use phpFastCache\Exceptions\phpFastCacheDriverException;
2424
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -231,13 +231,13 @@ protected function createDatabase()
231231
*******************/
232232

233233
/**
234-
* @return driverStatistic
234+
* @return DriverStatistic
235235
*/
236236
public function getStats()
237237
{
238238
$info = $this->instance->getDatabaseInfo();
239239

240-
return (new driverStatistic())
240+
return (new DriverStatistic())
241241
->setSize($info['sizes']['active'])
242242
->setRawData($info)
243243
->setData(implode(', ', array_keys($this->itemInstances)))

src/phpFastCache/Drivers/Devfalse/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use phpFastCache\Core\Pool\DriverBaseTrait;
1818
use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
19-
use phpFastCache\Entities\driverStatistic;
19+
use phpFastCache\Entities\DriverStatistic;
2020
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2121
use phpFastCache\Exceptions\phpFastCacheDriverException;
2222
use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException;
@@ -125,11 +125,11 @@ protected function driverConnect()
125125
*******************/
126126

127127
/**
128-
* @return driverStatistic
128+
* @return DriverStatistic
129129
*/
130130
public function getStats()
131131
{
132-
$stat = new driverStatistic();
132+
$stat = new DriverStatistic();
133133
$stat->setInfo('[Devfalse] A void info string')
134134
->setSize(0)
135135
->setData(implode(', ', array_keys($this->itemInstances)))

0 commit comments

Comments
 (0)