Skip to content

Commit 73fa810

Browse files
author
Yitz Willroth
committed
:clean: remove inadvertent inclusions
1 parent fcc3bdf commit 73fa810

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

src/Illuminate/Cache/FileStore.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ protected function getPayload($key)
312312
}
313313

314314
$expire = substr($contents, 0, 10);
315-
} catch (Exception $e) {
315+
} catch (Exception) {
316316
return $this->emptyPayload();
317317
}
318318

@@ -328,7 +328,6 @@ protected function getPayload($key)
328328
try {
329329
$data = unserialize(substr($contents, 10));
330330
} catch (Exception) {
331-
332331
$this->forget($key);
333332

334333
return $this->emptyPayload();

src/Illuminate/Cache/RedisStore.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ protected function serialize($value)
466466
* Determine if the given value should be stored as plain value.
467467
*
468468
* @param mixed $value
469+
* @return bool
469470
*/
470471
protected function shouldBeStoredWithoutSerialization($value): bool
471472
{

src/Illuminate/Cache/Repository.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public function missing($key)
106106
*
107107
* @param array|string $key
108108
* @param mixed $default
109+
* @return mixed
109110
*/
110111
public function get($key, $default = null): mixed
111112
{
@@ -250,6 +251,8 @@ public function put($key, $value, $ttl = null)
250251

251252
/**
252253
* {@inheritdoc}
254+
*
255+
* @return bool
253256
*/
254257
public function set($key, $value, $ttl = null): bool
255258
{
@@ -259,6 +262,7 @@ public function set($key, $value, $ttl = null): bool
259262
/**
260263
* Store multiple items in the cache for a given number of seconds.
261264
*
265+
* @param array $values
262266
* @param \DateTimeInterface|\DateInterval|int|null $ttl
263267
* @return bool
264268
*/
@@ -292,6 +296,7 @@ public function putMany(array $values, $ttl = null)
292296
/**
293297
* Store multiple items in the cache indefinitely.
294298
*
299+
* @param array $values
295300
* @return bool
296301
*/
297302
protected function putManyForever(array $values)
@@ -527,7 +532,7 @@ public function flexible($key, $ttl, $callback, $lock = null, $alwaysDefer = fal
527532
public function touch(string $key, \DateTimeInterface|\DateInterval|int|null $ttl = null): bool
528533
{
529534
$value = $this->get($key);
530-
535+
531536
if (is_null($value)) {
532537
return false;
533538
}
@@ -558,6 +563,8 @@ public function forget($key)
558563

559564
/**
560565
* {@inheritdoc}
566+
*
567+
* @return bool
561568
*/
562569
public function delete($key): bool
563570
{
@@ -566,6 +573,8 @@ public function delete($key): bool
566573

567574
/**
568575
* {@inheritdoc}
576+
*
577+
* @return bool
569578
*/
570579
public function deleteMultiple($keys): bool
571580
{
@@ -582,6 +591,8 @@ public function deleteMultiple($keys): bool
582591

583592
/**
584593
* {@inheritdoc}
594+
*
595+
* @return bool
585596
*/
586597
public function clear(): bool
587598
{
@@ -743,6 +754,7 @@ public function getEventDispatcher()
743754
/**
744755
* Set the event dispatcher instance.
745756
*
757+
* @param \Illuminate\Contracts\Events\Dispatcher $events
746758
* @return void
747759
*/
748760
public function setEventDispatcher(Dispatcher $events)
@@ -754,6 +766,7 @@ public function setEventDispatcher(Dispatcher $events)
754766
* Determine if a cached value exists.
755767
*
756768
* @param string $key
769+
* @return bool
757770
*/
758771
public function offsetExists($key): bool
759772
{
@@ -764,6 +777,7 @@ public function offsetExists($key): bool
764777
* Retrieve an item from the cache by key.
765778
*
766779
* @param string $key
780+
* @return mixed
767781
*/
768782
public function offsetGet($key): mixed
769783
{
@@ -775,6 +789,7 @@ public function offsetGet($key): mixed
775789
*
776790
* @param string $key
777791
* @param mixed $value
792+
* @return void
778793
*/
779794
public function offsetSet($key, $value): void
780795
{
@@ -785,6 +800,7 @@ public function offsetSet($key, $value): void
785800
* Remove an item from the cache.
786801
*
787802
* @param string $key
803+
* @return void
788804
*/
789805
public function offsetUnset($key): void
790806
{

tests/Cache/CacheApcStoreTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,4 @@ public function testFlushesCached()
146146
$result = $store->flush();
147147
$this->assertTrue($result);
148148
}
149-
150-
151149
}

tests/Cache/CacheRedisStoreTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,10 @@ public function testTouchMethodProperlyCallsRedis(): void
136136

137137
public function testForgetMethodProperlyCallsRedis()
138138
{
139-
$key = 'key';
140-
141139
$redis = $this->getRedis();
142-
143140
$redis->getRedis()->shouldReceive('connection')->once()->with('default')->andReturn($redis->getRedis());
144-
$redis->getRedis()->shouldReceive('del')->once()->with("prefix:$key");
145-
146-
$redis->forget($key);
141+
$redis->getRedis()->shouldReceive('del')->once()->with('prefix:foo');
142+
$redis->forget('foo');
147143
}
148144

149145
public function testFlushesCached()

0 commit comments

Comments
 (0)