Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit32a7907

Browse files
Merge pull request#98 from TheDragonCode/4.x
The case of the properties of the properties from `snake_case` with `camelCase` is changed
2 parents508026f +0e2804a commit32a7907

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

‎UPGRADE.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ This means that the `DragonCode\Contracts\*` contracts will no longer be working
3636
###TTL Time Constants
3737

3838
Constants`DAY`,`MONTH` and`WEEK` was deleted from`DragonCode\Cache\Support\Ttl` class.
39+
40+
###Properties
41+
42+
1. The case of the properties of the properties from`snake_case` with`camelCase` is changed.
43+
2. The`hashing_key` property of`DragonCode\Cache\Services\Cache` class was renamed with`useHash`.

‎src/Services/Cache.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Cache
3434

3535
protectedbool$hashing_key =true;
3636

37-
protectedstring$key_hash ='';
37+
protectedstring$keyHash ='';
3838

3939
protectedbool|object|string$when =true;
4040

@@ -51,9 +51,9 @@ public function when(bool|object|string $when = true): Cache
5151
return$this;
5252
}
5353

54-
publicfunctionttl($value,bool$is_minutes =true):Cache
54+
publicfunctionttl($value,bool$isMinutes =true):Cache
5555
{
56-
$this->ttl =$is_minutes
56+
$this->ttl =$isMinutes
5757
? Ttl::fromMinutes($value)
5858
: Ttl::fromSeconds($value);
5959

@@ -149,8 +149,8 @@ protected function manager(): CacheManager
149149

150150
protectedfunctiongetKey():string
151151
{
152-
if (!empty($this->key_hash)) {
153-
return$this->key_hash;
152+
if (!empty($this->keyHash)) {
153+
return$this->keyHash;
154154
}
155155

156156
$key =$this->key;

‎src/Support/Ttl.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public function fromSeconds($seconds): int
3030
return$this->get($seconds);
3131
}
3232

33-
publicfunctionfromDateTime(DateTimeInterface$date_time):int
33+
publicfunctionfromDateTime(DateTimeInterface$dateTime):int
3434
{
35-
$seconds = Carbon::now()->diffInSeconds($date_time);
35+
$seconds = Carbon::now()->diffInSeconds($dateTime);
3636

3737
return$this->correct($seconds);
3838
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp