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:
@@ -508,7 +508,7 @@ class PromotionRepository
|
||||
|
||||
foreach ( $basket as $key => $val )
|
||||
{
|
||||
$product_promotion = (new \Domain\Product\ProductRepository($this->db))->isProductOnPromotion( $val['product-id'] );
|
||||
$product_promotion = $productRepo->isProductOnPromotion( $val['product-id'] );
|
||||
|
||||
if ( !$product_promotion or $product_promotion and $promotion['include_product_promo'] )
|
||||
{
|
||||
@@ -538,7 +538,7 @@ class PromotionRepository
|
||||
{
|
||||
foreach ( $basket as $key => $val )
|
||||
{
|
||||
$product_promotion = (new \Domain\Product\ProductRepository($this->db))->isProductOnPromotion( $val['product-id'] );
|
||||
$product_promotion = $productRepo->isProductOnPromotion( $val['product-id'] );
|
||||
|
||||
if ( !$product_promotion or $product_promotion and $promotion['include_product_promo'] )
|
||||
{
|
||||
@@ -557,7 +557,7 @@ class PromotionRepository
|
||||
$cheapest_position = false;
|
||||
foreach ( $basket as $key => $val )
|
||||
{
|
||||
$price = (new \Domain\Product\ProductRepository($this->db))->getPrice( $val['product-id'] );
|
||||
$price = $productRepo->getPrice( $val['product-id'] );
|
||||
if ( !$cheapest_position or $cheapest_position['price'] > $price )
|
||||
{
|
||||
$cheapest_position['price'] = $price;
|
||||
@@ -586,7 +586,7 @@ class PromotionRepository
|
||||
|
||||
foreach ( $basket as $key => $val )
|
||||
{
|
||||
$product_promotion = (new \Domain\Product\ProductRepository($this->db))->isProductOnPromotion( $val['product-id'] );
|
||||
$product_promotion = $productRepo->isProductOnPromotion( $val['product-id'] );
|
||||
|
||||
if ( !$product_promotion or $product_promotion and $promotion['include_product_promo'] )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user