Skip to content

Commit 52c689a

Browse files
committed
Fix link static variable refs
1 parent b515e46 commit 52c689a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/models/Link.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ class Link extends Model {
1111

1212
public static function allCached($forceRefresh = false)
1313
{
14-
if(!isset(static::$cache['all']) || $forceRefresh) {
15-
static::$cache['all'] = Link::all();
14+
if (!isset(self::$cache['all']) || $forceRefresh) {
15+
self::$cache['all'] = Link::all();
1616
}
1717

18-
return static::$cache['all'];
18+
return self::$cache['all'];
1919
}
2020

2121
public static function returnUrls($forceRefresh = false) {
2222

23-
if(!isset(static::$cache['all_urls']) || $forceRefresh) {
23+
if (!isset(self::$cache['all_urls']) || $forceRefresh) {
2424
$configs = Link::allCached($forceRefresh);
25-
static::$cache['all_urls'] = $configs->pluck('url')->toArray();
25+
self::$cache['all_urls'] = $configs->pluck('url')->toArray();
2626
}
2727

28-
return static::$cache['all_urls'];
28+
return self::$cache['all_urls'];
2929
}
3030

3131
public static function getMainUrls($forceRefresh = false){
3232

33-
if(!isset(static::$cache['main_urls']) || $forceRefresh) {
33+
if (!isset(self::$cache['main_urls']) || $forceRefresh) {
3434
$configs = Link::where('main', '=', true)->get(['url']);
35-
static::$cache['main_urls'] = $configs->pluck('url')->toArray();
35+
self::$cache['main_urls'] = $configs->pluck('url')->toArray();
3636
}
3737

38-
return static::$cache['main_urls'];
38+
return self::$cache['main_urls'];
3939
}
4040

4141

0 commit comments

Comments
 (0)