chore(*.php): use pint for php formatting
This commit is contained in:
parent
029caaaa9e
commit
cf1ee4c97f
40 changed files with 2261 additions and 1900 deletions
|
@ -1,24 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Classes;
|
||||
namespace App\Classes;
|
||||
|
||||
class MovieFetcher extends PageFetcher
|
||||
{
|
||||
class MovieFetcher extends PageFetcher
|
||||
{
|
||||
public function fetch(string $url): ?array
|
||||
{
|
||||
$cacheKey = "movie_" . md5($url);
|
||||
$cached = $this->cacheGet($cacheKey);
|
||||
$cacheKey = 'movie_'.md5($url);
|
||||
$cached = $this->cacheGet($cacheKey);
|
||||
|
||||
if ($cached) return $cached;
|
||||
if ($cached) {
|
||||
return $cached;
|
||||
}
|
||||
|
||||
$movie = $this->fetchSingleFromApi("optimized_movies", $url);
|
||||
$movie = $this->fetchSingleFromApi('optimized_movies', $url);
|
||||
|
||||
if (!$movie) return null;
|
||||
if (! $movie) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$movie['globals'] = $this->getGlobals();
|
||||
$movie['globals'] = $this->getGlobals();
|
||||
|
||||
$this->cacheSet($cacheKey, $movie);
|
||||
$this->cacheSet($cacheKey, $movie);
|
||||
|
||||
return $movie;
|
||||
return $movie;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue