ver. 0.294: Code review complete — 96/96 classes, 27 fixes across all layers

Full codebase review of autoload/ directory (96 classes, ~1144 methods).
Fixes: null safety (query/find guards), redundant DI bypass, undefined
variables, missing globals, and Imagick WebP mime type bug in Helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 15:26:07 +01:00
parent 0252ccea30
commit de11afb003
30 changed files with 1380 additions and 1164 deletions

View File

@@ -769,31 +769,4 @@ class CategoryRepository
return is_array($result) ? $result : [];
}
public function subcategoriesLangCached(int $categoryId): array
{
$cacheHandler = new \Shared\Cache\CacheHandler();
$cacheKey = "subcategories_lang:{$categoryId}";
$cached = $cacheHandler->get($cacheKey);
if ($cached) {
return unserialize($cached);
}
$categories = $this->db->select('pp_shop_categories', '*', ['parent_id' => $categoryId]);
if (!is_array($categories)) {
return [];
}
$result = [];
foreach ($categories as $cat) {
$lang = $this->db->get('pp_shop_categories_langs', '*', ['category_id' => $cat['id']]);
if (is_array($lang)) {
$result[] = $lang;
}
}
$cacheHandler->set($cacheKey, $result);
return $result;
}
}