chore(*.php): use pint for php formatting

This commit is contained in:
Cory Dransfeldt 2025-06-14 16:55:03 -07:00
parent 029caaaa9e
commit cf1ee4c97f
No known key found for this signature in database
40 changed files with 2261 additions and 1900 deletions

View file

@ -1,24 +1,28 @@
<?php
namespace App\Classes;
namespace App\Classes;
class BookFetcher extends PageFetcher
{
class BookFetcher extends PageFetcher
{
public function fetch(string $url): ?array
{
$cacheKey = "book_" . md5($url);
$cached = $this->cacheGet($cacheKey);
$cacheKey = 'book_'.md5($url);
$cached = $this->cacheGet($cacheKey);
if ($cached) return $cached;
if ($cached) {
return $cached;
}
$book = $this->fetchSingleFromApi("optimized_books", $url);
$book = $this->fetchSingleFromApi('optimized_books', $url);
if (!$book) return null;
if (! $book) {
return null;
}
$book['globals'] = $this->getGlobals();
$book['globals'] = $this->getGlobals();
$this->cacheSet($cacheKey, $book);
$this->cacheSet($cacheKey, $book);
return $book;
return $book;
}
}
}