Skip to content

Commit 9fd2939

Browse files
committed
Just shorten "if" using coalescing assignment operator
1 parent 68cb7c9 commit 9fd2939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Page.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ public function getBlocks(array $btHandles, ?callable $dataValidator = null): ar
180180

181181
final protected static function database(): Connection
182182
{
183-
return self::$db ?? self::$db = self::app('database/connection');
183+
return self::$db ??= self::app('database/connection');
184184
}
185185

186186
final protected static function cache(): ExpensiveCache
187187
{
188-
return self::$cache ?? self::$cache = self::app('cache/expensive');
188+
return self::$cache ??= self::app('cache/expensive');
189189
}
190190

191191
/**

0 commit comments

Comments
 (0)