chore(*.php): use pint for php formatting
This commit is contained in:
parent
bd1855a65e
commit
753f3433ce
40 changed files with 2261 additions and 1900 deletions
|
@ -1,22 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Classes;
|
||||
namespace App\Classes;
|
||||
|
||||
class GlobalsFetcher extends PageFetcher
|
||||
{
|
||||
class GlobalsFetcher extends PageFetcher
|
||||
{
|
||||
public function fetch(): ?array
|
||||
{
|
||||
$cacheKey = "globals";
|
||||
$cached = $this->cacheGet($cacheKey);
|
||||
$cacheKey = 'globals';
|
||||
$cached = $this->cacheGet($cacheKey);
|
||||
|
||||
if ($cached) return $cached;
|
||||
if ($cached) {
|
||||
return $cached;
|
||||
}
|
||||
|
||||
$globals = $this->fetchFromApi("optimized_globals");
|
||||
$globals = $this->fetchFromApi('optimized_globals');
|
||||
|
||||
if (empty($globals)) return null;
|
||||
if (empty($globals)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->cacheSet($cacheKey, $globals[0]);
|
||||
$this->cacheSet($cacheKey, $globals[0]);
|
||||
|
||||
return $globals[0];
|
||||
return $globals[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue