Skip to content

Commit 8305974

Browse files
author
Stanislav Idolov
committed
magento-engcom/magento2ce#2777: Fixed code style issues
1 parent 3405d61 commit 8305974

File tree

4 files changed

+23
-18
lines changed

4 files changed

+23
-18
lines changed

app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ public function getAttribute()
230230
* @return void
231231
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
232232
* @since 101.0.0
233+
* phpcs:disable Magento2.CodeAnalysis.EmptyBlock
233234
*/
234235
protected function processDeletedImages($product, array &$images)
235236
{
@@ -400,6 +401,7 @@ protected function getUniqueFileName($file, $forTmp = false)
400401
$destinationFile = $forTmp
401402
? $this->mediaDirectory->getAbsolutePath($this->mediaConfig->getTmpMediaPath($file))
402403
: $this->mediaDirectory->getAbsolutePath($this->mediaConfig->getMediaPath($file));
404+
// phpcs:disable Magento2.Functions.DiscouragedFunction
403405
$destFile = dirname($file) . '/' . FileUploader::getNewFileName($destinationFile);
404406
}
405407

app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* Entity/Attribute/Model - collection abstract
1818
*
19+
* phpcs:disable Magento2.Classes.AbstractApi
1920
* @api
2021
* @SuppressWarnings(PHPMD.TooManyFields)
2122
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
@@ -188,6 +189,7 @@ public function __construct(
188189
* Initialize collection
189190
*
190191
* @return void
192+
* phpcs:disable Magento2.CodeAnalysis.EmptyBlock
191193
*/
192194
protected function _construct()
193195
{
@@ -298,7 +300,7 @@ public function getResource()
298300
/**
299301
* Set template object for the collection
300302
*
301-
* @param \Magento\Framework\DataObject $object
303+
* @param \Magento\Framework\DataObject $object
302304
* @return $this
303305
*/
304306
public function setObject($object = null)
@@ -1371,8 +1373,8 @@ protected function _getAttributeFieldName($attributeCode)
13711373
/**
13721374
* Add attribute value table to the join if it wasn't added previously
13731375
*
1374-
* @param string $attributeCode
1375-
* @param string $joinType inner|left
1376+
* @param string $attributeCode
1377+
* @param string $joinType inner|left
13761378
* @return $this
13771379
* @throws LocalizedException
13781380
* @SuppressWarnings(PHPMD.NPathComplexity)
@@ -1466,12 +1468,12 @@ protected function getEntityPkName(\Magento\Eav\Model\Entity\AbstractEntity $ent
14661468
/**
14671469
* Adding join statement to collection select instance
14681470
*
1469-
* @param string $method
1470-
* @param object $attribute
1471-
* @param string $tableAlias
1472-
* @param array $condition
1473-
* @param string $fieldCode
1474-
* @param string $fieldAlias
1471+
* @param string $method
1472+
* @param object $attribute
1473+
* @param string $tableAlias
1474+
* @param array $condition
1475+
* @param string $fieldCode
1476+
* @param string $fieldAlias
14751477
* @return $this
14761478
*/
14771479
protected function _joinAttributeToSelect($method, $attribute, $tableAlias, $condition, $fieldCode, $fieldAlias)

dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ public function testSaveDatetimeAttribute()
568568
*/
569569
protected function getExpectedOptionsData(string $pathToFile, string $storeCode = ''): array
570570
{
571+
// phpcs:disable Magento2.Functions.DiscouragedFunction
571572
$productData = $this->csvToArray(file_get_contents($pathToFile));
572573
$expectedOptionId = 0;
573574
$expectedOptions = [];

lib/internal/Magento/Framework/Data/Collection.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public function getItemByColumnValue($column, $value)
392392
/**
393393
* Adding item to item array
394394
*
395-
* @param \Magento\Framework\DataObject $item
395+
* @param \Magento\Framework\DataObject $item
396396
* @return $this
397397
* @throws \Exception
398398
*/
@@ -454,7 +454,7 @@ public function getAllIds()
454454
/**
455455
* Remove item from collection by item key
456456
*
457-
* @param mixed $key
457+
* @param mixed $key
458458
* @return $this
459459
*/
460460
public function removeItemByKey($key)
@@ -542,8 +542,8 @@ public function each($objMethod, $args = [])
542542
/**
543543
* Setting data for all collection items
544544
*
545-
* @param mixed $key
546-
* @param mixed $value
545+
* @param mixed $key
546+
* @param mixed $value
547547
* @return $this
548548
*/
549549
public function setDataToAll($key, $value = null)
@@ -563,7 +563,7 @@ public function setDataToAll($key, $value = null)
563563
/**
564564
* Set current page
565565
*
566-
* @param int $page
566+
* @param int $page
567567
* @return $this
568568
*/
569569
public function setCurPage($page)
@@ -575,7 +575,7 @@ public function setCurPage($page)
575575
/**
576576
* Set collection page size
577577
*
578-
* @param int $size
578+
* @param int $size
579579
* @return $this
580580
*/
581581
public function setPageSize($size)
@@ -587,8 +587,8 @@ public function setPageSize($size)
587587
/**
588588
* Set select order
589589
*
590-
* @param string $field
591-
* @param string $direction
590+
* @param string $field
591+
* @param string $direction
592592
* @return $this
593593
*/
594594
public function setOrder($field, $direction = self::SORT_ORDER_DESC)
@@ -600,7 +600,7 @@ public function setOrder($field, $direction = self::SORT_ORDER_DESC)
600600
/**
601601
* Set collection item class name
602602
*
603-
* @param string $className
603+
* @param string $className
604604
* @return $this
605605
* @throws \InvalidArgumentException
606606
*/

0 commit comments

Comments
 (0)