Skip to content

Commit ca643fe

Browse files
committed
MAGETWO-94206: [2.3] [Magento cloud] Import history wrong execution time
1 parent c5767a6 commit ca643fe

File tree

14 files changed

+116
-28
lines changed

14 files changed

+116
-28
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/GroupPrice/AbstractGroupPrice.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ public function validate($object)
247247
}
248248

249249
/**
250+
* Validate price.
251+
*
250252
* @param array $priceRow
251253
* @return void
252254
* @throws \Magento\Framework\Exception\LocalizedException
@@ -312,6 +314,8 @@ public function afterLoad($object)
312314
}
313315

314316
/**
317+
* Get website id.
318+
*
315319
* @param int $storeId
316320
* @return int|null
317321
*/
@@ -327,6 +331,8 @@ private function getWebsiteId($storeId)
327331
}
328332

329333
/**
334+
* Set price data.
335+
*
330336
* @param \Magento\Catalog\Model\Product $object
331337
* @param array $priceData
332338
*/
@@ -381,6 +387,8 @@ public function afterSave($object)
381387
}
382388

383389
/**
390+
* Update values.
391+
*
384392
* @param array $valuesToUpdate
385393
* @param array $oldValues
386394
* @return boolean
@@ -436,6 +444,8 @@ public function getResource()
436444
}
437445

438446
/**
447+
* Get metadata pool.
448+
*
439449
* @return \Magento\Framework\EntityManager\MetadataPool
440450
*/
441451
private function getMetadataPool()

app/code/Magento/Catalog/Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public function __construct(
6767
}
6868

6969
/**
70+
* Perform action on relation/extension attribute.
71+
*
7072
* @param \Magento\Catalog\Api\Data\ProductInterface|object $entity
7173
* @param array $arguments
7274
* @return \Magento\Catalog\Api\Data\ProductInterface|object
@@ -264,6 +266,8 @@ private function isWebsiteGlobal(int $websiteId): bool
264266
}
265267

266268
/**
269+
* Prepare original data to compare.
270+
*
267271
* @param array|null $origPrices
268272
* @param bool $isGlobal
269273
* @return array
@@ -284,6 +288,8 @@ private function prepareOriginalDataToCompare(?array $origPrices, bool $isGlobal
284288
}
285289

286290
/**
291+
* Prepare new data for save.
292+
*
287293
* @param array $priceRows
288294
* @param bool $isGlobal
289295
* @return array

app/code/Magento/Elasticsearch/Elasticsearch5/Model/Adapter/FieldMapper/ProductFieldMapper.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ public function __construct(
6969
}
7070

7171
/**
72+
* Get field name.
73+
*
7274
* @param string $attributeCode
7375
* @param array $context
7476
* @return string
@@ -107,6 +109,8 @@ public function getFieldName($attributeCode, $context = [])
107109
}
108110

109111
/**
112+
* Get all attributes types.
113+
*
110114
* @param array $context
111115
* @return array
112116
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -159,6 +163,8 @@ public function getAllAttributesTypes($context = [])
159163
}
160164

161165
/**
166+
* Is attribute used in advanced search.
167+
*
162168
* @param Object $attribute
163169
* @return bool
164170
*/
@@ -170,6 +176,8 @@ protected function isAttributeUsedInAdvancedSearch($attribute)
170176
}
171177

172178
/**
179+
* Get refined field name.
180+
*
173181
* @param string $frontendInput
174182
* @param string $fieldType
175183
* @param string $attributeCode
@@ -189,6 +197,8 @@ protected function getRefinedFieldName($frontendInput, $fieldType, $attributeCod
189197
}
190198

191199
/**
200+
* Get query type field name.
201+
*
192202
* @param string $frontendInput
193203
* @param string $fieldType
194204
* @param string $attributeCode

app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public function testConnection()
101101
}
102102

103103
/**
104+
* Build config.
105+
*
104106
* @param array $options
105107
* @return array
106108
*/
@@ -207,9 +209,10 @@ public function indexExists($index)
207209
}
208210

209211
/**
212+
* Exists alias.
213+
*
210214
* @param string $alias
211215
* @param string $index
212-
*
213216
* @return bool
214217
*/
215218
public function existsAlias($alias, $index = '')
@@ -222,8 +225,9 @@ public function existsAlias($alias, $index = '')
222225
}
223226

224227
/**
225-
* @param string $alias
228+
* Get alias.
226229
*
230+
* @param string $alias
227231
* @return array
228232
*/
229233
public function getAlias($alias)
@@ -293,8 +297,7 @@ public function addFieldsMapping(array $fields, $index, $entityType)
293297
}
294298

295299
/**
296-
* Fix backward compatibility of field definition.
297-
* Allow to run both 2.x and 5.x servers.
300+
* Fix backward compatibility of field definition. Allow to run both 2.x and 5.x servers.
298301
*
299302
* @param array $fieldInfo
300303
*
@@ -346,8 +349,7 @@ public function query($query)
346349
}
347350

348351
/**
349-
* Fix backward compatibility of the search queries.
350-
* Allow to run both 2.x and 5.x servers.
352+
* Fix backward compatibility of the search queries. Allow to run both 2.x and 5.x servers.
351353
*
352354
* @param array $query
353355
*

app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/ProductDataMapper.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,12 @@ public function __construct(
9898
}
9999

100100
/**
101-
* {@inheritdoc}
101+
* Map index data for using in search engine metadata
102+
*
103+
* @param array $documentData
104+
* @param int $storeId
105+
* @param array $context
106+
* @return array
102107
*/
103108
public function map(array $documentData, $storeId, array $context = [])
104109
{
@@ -137,8 +142,7 @@ public function map(array $documentData, $storeId, array $context = [])
137142
}
138143

139144
/**
140-
* Convert raw data retrieved from source tables to human-readable format
141-
* E.g. [42 => [1 => 2]] will be converted to ['color' => '2', 'color_value' => 'red']
145+
* Convert raw data retrieved from source tables to human-readable format.
142146
*
143147
* @param int $productId
144148
* @param array $indexData
@@ -173,8 +177,7 @@ private function convertToProductData(int $productId, array $indexData, int $sto
173177
}
174178

175179
/**
176-
* Convert data for attribute: 1) add new value {attribute_code}_value for select and multiselect searchable
177-
* attributes, that will contain actual value 2) add child products data to composite products
180+
* Convert data for attribute, add {attribute_code}_value for searchable attributes, that contain actual value.
178181
*
179182
* @param Attribute $attribute
180183
* @param array $attributeValues
@@ -201,6 +204,8 @@ private function convertAttribute(Attribute $attribute, array $attributeValues):
201204
}
202205

203206
/**
207+
* Prepare attribute values.
208+
*
204209
* @param int $productId
205210
* @param Attribute $attribute
206211
* @param array $attributeValues
@@ -233,6 +238,8 @@ private function prepareAttributeValues(
233238
}
234239

235240
/**
241+
* Prepare multiselect values.
242+
*
236243
* @param array $values
237244
* @return array
238245
*/
@@ -244,6 +251,8 @@ private function prepareMultiselectValues(array $values): array
244251
}
245252

246253
/**
254+
* Is attribute date.
255+
*
247256
* @param Attribute $attribute
248257
* @return bool
249258
*/
@@ -254,6 +263,8 @@ private function isAttributeDate(Attribute $attribute): bool
254263
}
255264

256265
/**
266+
* Get values labels.
267+
*
257268
* @param Attribute $attribute
258269
* @param array $attributeValues
259270
* @return array

app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/ProductFieldMapper.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public function __construct(
4242
}
4343

4444
/**
45+
* Get field name.
46+
*
4547
* @param string $attributeCode
4648
* @param array $context
4749
* @return string
@@ -80,6 +82,8 @@ public function getFieldName($attributeCode, $context = [])
8082
}
8183

8284
/**
85+
* Get all attributes types.
86+
*
8387
* @param array $context
8488
* @return array
8589
*/
@@ -120,6 +124,8 @@ public function getAllAttributesTypes($context = [])
120124
}
121125

122126
/**
127+
* Get refined field name.
128+
*
123129
* @param string $frontendInput
124130
* @param string $fieldType
125131
* @param string $attributeCode

app/code/Magento/ImportExport/Helper/Report.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ public function getReportOutput($filename)
9797
}
9898

9999
/**
100+
* Get report absolute path.
101+
*
100102
* @param string $fileName
101103
* @return string
102104
*/

app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ public function __construct(
8282
}
8383

8484
/**
85+
* Collect rates.
86+
*
8587
* @param RateRequest $request
8688
* @return \Magento\Shipping\Model\Rate\Result
8789
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -201,6 +203,8 @@ public function collectRates(RateRequest $request)
201203
}
202204

203205
/**
206+
* Get rate.
207+
*
204208
* @param \Magento\Quote\Model\Quote\Address\RateRequest $request
205209
* @return array|bool
206210
*/
@@ -210,6 +214,8 @@ public function getRate(\Magento\Quote\Model\Quote\Address\RateRequest $request)
210214
}
211215

212216
/**
217+
* Get code.
218+
*
213219
* @param string $type
214220
* @param string $code
215221
* @return array

0 commit comments

Comments
 (0)