]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 3 Oct 2025 06:32:05 +0000 (09:32 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 3 Oct 2025 06:32:05 +0000 (09:32 +0300)
erp24/services/MarketplaceService.php

index 840520721b3ef320f6bee827cec5ec4f8315219a..7242be80b9b2e86496a644bc69e6ac4c12c39228 100644 (file)
@@ -12,16 +12,13 @@ use voku\helper\HtmlDomParser;
 use Yii;
 use yii\helpers\ArrayHelper;
 use yii\helpers\Json;
-use yii\web\Response;
 use yii_app\helpers\DataHelper;
 use yii_app\helpers\File;
 use yii_app\records\Balances;
 use yii_app\records\CreateChecks;
 use yii_app\records\ExportImportTable;
-use yii_app\records\Files;
 use yii_app\records\Images;
 use yii_app\records\MarketplaceFlowwowEmails;
-use yii_app\records\MarketplaceOrder1cStatuses;
 use yii_app\records\MarketplaceOrderDelivery;
 use yii_app\records\MarketplaceOrderItems;
 use yii_app\records\MarketplaceOrders;
@@ -100,7 +97,7 @@ class MarketplaceService
     public static function infoForMarketplace(int $marketId)
     {
         if (!array_key_exists($marketId, MarketplaceStore::getWarehouseId()))
-            return;
+            return null;
 
         $is_yandex = $marketId == MarketplaceStore::YANDEX_WAREHOUSE_ID;
 
@@ -1616,6 +1613,7 @@ class MarketplaceService
         } catch (\Exception $e) {
             Yii::error("Ошибка получения возврата: " . $e->getMessage());
         }
+        return null;
     }
 
     public static function updateOrderStatus($campaignId, $orderId, $newStatus, $newSubstatus)
@@ -1851,7 +1849,7 @@ class MarketplaceService
     public static function saveEmailIfNotExists($subject, $subjectPattern, $from, $to, $date, $body)
     {
         if (strpos($from, 'info@flowwow.com') === false) {
-            return;
+            return null;
         }
 
         $exists = MarketplaceFlowwowEmails::find()
@@ -1872,9 +1870,9 @@ class MarketplaceService
                 return $email;
             } else {
                 Yii::error('Письмо не сохранено' . json_encode($email->errors, JSON_UNESCAPED_UNICODE), __METHOD__);
-                return null;
             }
         }
+        return null;
     }