From 938d6ff84870c5e0728a0e1857eb2f8ae3d3417f Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 12 May 2022 08:10:44 +0000 Subject: [PATCH] Rename field total. #660 --- src/Service/WarrantyBulkUploader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Service/WarrantyBulkUploader.php b/src/Service/WarrantyBulkUploader.php index 8ba278a3..fec7b657 100644 --- a/src/Service/WarrantyBulkUploader.php +++ b/src/Service/WarrantyBulkUploader.php @@ -37,7 +37,7 @@ class WarrantyBulkUploader const F_BATT_ID = 18; // sap code in system const F_OWNER_TYPE = 19; - const F_TOTAL = 20; + const FIELD_COUNT = 20; protected $em; protected $batt_hash; @@ -205,7 +205,7 @@ class WarrantyBulkUploader // check number of fields. // (1) should match what is in F_TOTAL - if (count($fields) != self::F_TOTAL) + if (count($fields) != self::FIELD_COUNT) { $message = 'Invalid row.'; $errors = $this->setOutputInfo($fields, 'NOT UPLOADED', $message, $row_num); @@ -319,7 +319,7 @@ class WarrantyBulkUploader protected function setOutputInfo($fields, $status, $message, $row_num) { - if (count($fields) != self::F_TOTAL) + if (count($fields) != self::FIELD_COUNT) { // since we don't know field might be missing, we just output status and reason return [