Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 485efd0

Browse filesBrowse files
author
Yitz Willroth
committed
:clean: remove inadvertent inclusions
1 parent 24b0957 commit 485efd0
Copy full SHA for 485efd0

File tree

Expand file treeCollapse file tree

5 files changed

+21
-11
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+21
-11
lines changed

‎src/Illuminate/Cache/FileStore.php

Copy file name to clipboardExpand all lines: src/Illuminate/Cache/FileStore.php
+1-2Lines 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

Copy file name to clipboardExpand all lines: src/Illuminate/Cache/RedisStore.php
+1Lines 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

Copy file name to clipboardExpand all lines: src/Illuminate/Cache/Repository.php
+17-1Lines 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)
@@ -526,7 +531,7 @@ public function flexible($key, $ttl, $callback, $lock = null)
526531
public function touch(string $key, \DateTimeInterface|\DateInterval|int|null $ttl = null): bool
527532
{
528533
$value = $this->get($key);
529-
534+
530535
if (is_null($value)) {
531536
return false;
532537
}
@@ -557,6 +562,8 @@ public function forget($key)
557562

558563
/**
559564
* {@inheritdoc}
565+
*
566+
* @return bool
560567
*/
561568
public function delete($key): bool
562569
{
@@ -565,6 +572,8 @@ public function delete($key): bool
565572

566573
/**
567574
* {@inheritdoc}
575+
*
576+
* @return bool
568577
*/
569578
public function deleteMultiple($keys): bool
570579
{
@@ -581,6 +590,8 @@ public function deleteMultiple($keys): bool
581590

582591
/**
583592
* {@inheritdoc}
593+
*
594+
* @return bool
584595
*/
585596
public function clear(): bool
586597
{
@@ -742,6 +753,7 @@ public function getEventDispatcher()
742753
/**
743754
* Set the event dispatcher instance.
744755
*
756+
* @param \Illuminate\Contracts\Events\Dispatcher $events
745757
* @return void
746758
*/
747759
public function setEventDispatcher(Dispatcher $events)
@@ -753,6 +765,7 @@ public function setEventDispatcher(Dispatcher $events)
753765
* Determine if a cached value exists.
754766
*
755767
* @param string $key
768+
* @return bool
756769
*/
757770
public function offsetExists($key): bool
758771
{
@@ -763,6 +776,7 @@ public function offsetExists($key): bool
763776
* Retrieve an item from the cache by key.
764777
*
765778
* @param string $key
779+
* @return mixed
766780
*/
767781
public function offsetGet($key): mixed
768782
{
@@ -774,6 +788,7 @@ public function offsetGet($key): mixed
774788
*
775789
* @param string $key
776790
* @param mixed $value
791+
* @return void
777792
*/
778793
public function offsetSet($key, $value): void
779794
{
@@ -784,6 +799,7 @@ public function offsetSet($key, $value): void
784799
* Remove an item from the cache.
785800
*
786801
* @param string $key
802+
* @return void
787803
*/
788804
public function offsetUnset($key): void
789805
{

‎tests/Cache/CacheApcStoreTest.php

Copy file name to clipboardExpand all lines: tests/Cache/CacheApcStoreTest.php
-2Lines 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

Copy file name to clipboardExpand all lines: tests/Cache/CacheRedisStoreTest.php
+2-6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.