Skip to content

Commit 0284bcd

Browse files
committed
MAGETWO-69964: PHPCS cannot parse correctly syntax of PHP 7.x return types
1 parent c350871 commit 0284bcd

File tree

130 files changed

+1324
-3237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1324
-3237
lines changed

app/code/Magento/Catalog/Block/Product/Context.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* As Magento moves from inheritance-based APIs all such classes will be deprecated together with
1717
* the classes they were introduced for.
1818
*
19-
* @deprecated
19+
* @deprecated
2020
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2121
*/
2222
class Context extends \Magento\Framework\View\Element\Template\Context

app/code/Magento/Catalog/Test/Unit/Model/Product/Price/PricePersistenceTest.php

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,12 @@ public function testGet()
9393
$attributeId = 5;
9494
$skus = ['sku_1', 'sku_2'];
9595
$idsBySku = [
96-
'sku_1' =>
97-
[
98-
1 => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
99-
],
100-
'sku_2' =>
101-
[
102-
2 => \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL
103-
]
96+
'sku_1' => [
97+
1 => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
98+
],
99+
'sku_2' => [
100+
2 => \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL
101+
]
104102
];
105103
$select = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
106104
->disableOriginalConstructor()->getMock();
@@ -228,14 +226,12 @@ public function testDelete()
228226
$attributeId = 5;
229227
$skus = ['sku_1', 'sku_2'];
230228
$idsBySku = [
231-
'sku_1' =>
232-
[
233-
1 => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
234-
],
235-
'sku_2' =>
236-
[
237-
2 => \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL
238-
]
229+
'sku_1' => [
230+
1 => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
231+
],
232+
'sku_2' => [
233+
2 => \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL
234+
]
239235
];
240236
$this->productIdLocator
241237
->expects($this->once())
@@ -278,14 +274,12 @@ public function testDeleteWithException()
278274
$attributeId = 5;
279275
$skus = ['sku_1', 'sku_2'];
280276
$idsBySku = [
281-
'sku_1' =>
282-
[
283-
1 => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
284-
],
285-
'sku_2' =>
286-
[
287-
2 => \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL
288-
]
277+
'sku_1' => [
278+
1 => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
279+
],
280+
'sku_2' => [
281+
2 => \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL
282+
]
289283
];
290284
$this->productIdLocator
291285
->expects($this->once())

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* Class AdvancedPricing
30-
*
30+
*
3131
* @api
3232
*
3333
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

app/code/Magento/Catalog/view/frontend/templates/product/image.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?>
88

99
<img class="photo image"
10-
<?php /* @escapeNotVerified */ echo $block->getCustomAttributes(); ?>
10+
<?php /* @escapeNotVerified */ echo $block->getCustomAttributes(); ?>
1111
src="<?php /* @escapeNotVerified */ echo $block->getImageUrl(); ?>"
1212
width="<?php /* @escapeNotVerified */ echo $block->getWidth(); ?>"
1313
height="<?php /* @escapeNotVerified */ echo $block->getHeight(); ?>"

app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<span class="product-image-wrapper"
1212
style="padding-bottom: <?php /* @escapeNotVerified */ echo ($block->getRatio() * 100); ?>%;">
1313
<img class="product-image-photo"
14-
<?php /* @escapeNotVerified */ echo $block->getCustomAttributes(); ?>
14+
<?php /* @escapeNotVerified */ echo $block->getCustomAttributes(); ?>
1515
src="<?php /* @escapeNotVerified */ echo $block->getImageUrl(); ?>"
1616
width="<?php /* @escapeNotVerified */ echo $block->getResizedImageWidth(); ?>"
1717
height="<?php /* @escapeNotVerified */ echo $block->getResizedImageHeight(); ?>"

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/VirtualTest.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,10 @@ public function testPrepareAttributesWithDefaultValueForSave()
3434
'is_unique' => '0',
3535
'frontend_label' => 'Name',
3636
'is_static' => false,
37-
'apply_to' =>
38-
[
39-
],
37+
'apply_to' => [],
4038
'type' => 'varchar',
4139
'default_value' => null,
42-
'options' =>
43-
[
44-
],
40+
'options' => [],
4541
],
4642
'sku' => [
4743
'id' => '70',
@@ -51,14 +47,10 @@ public function testPrepareAttributesWithDefaultValueForSave()
5147
'is_unique' => '1',
5248
'frontend_label' => 'SKU',
5349
'is_static' => true,
54-
'apply_to' =>
55-
[
56-
],
50+
'apply_to' => [],
5751
'type' => 'varchar',
5852
'default_value' => null,
59-
'options' =>
60-
[
61-
],
53+
'options' => [],
6254
]
6355
]
6456
]

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ public function rebuildStoreIndex($storeId, $productIds = null)
355355
$products = $this->dataProvider
356356
->getSearchableProducts($storeId, $staticFields, $productIds, $lastProductId);
357357
while (count($products) > 0) {
358-
359358
$productsIds = array_column($products, 'entity_id');
360359
$relatedProducts = $this->getRelatedProducts($products);
361360
$productsIds = array_merge($productsIds, array_values($relatedProducts));

app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ protected function _renderFiltersBefore()
185185
$searchResult = $this->searchResultFactory->create()->setItems([]);
186186
} catch (NonExistingRequestNameException $e) {
187187
$this->_logger->error($e->getMessage());
188-
throw new LocalizedException(__('Sorry, something went wrong. You can find out more in the error log.'));
188+
throw new LocalizedException(
189+
__('Sorry, something went wrong. You can find out more in the error log.')
190+
);
189191
}
190192
$temporaryStorage = $this->temporaryStorageFactory->create();
191193
$table = $temporaryStorage->storeApiDocuments($searchResult->getItems());

app/code/Magento/CatalogUrlRewrite/Observer/UrlRewriteHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ public function getCategoryProductsUrlRewrites(
149149
->addAttributeToSelect('url_path');
150150

151151
foreach ($productCollection as $product) {
152-
if (
153-
isset($this->isSkippedProduct[$category->getEntityId()]) &&
152+
if (isset($this->isSkippedProduct[$category->getEntityId()]) &&
154153
in_array($product->getId(), $this->isSkippedProduct[$category->getEntityId()])
155154
) {
156155
continue;

app/code/Magento/Checkout/Test/Unit/Block/Cart/LayoutProcessorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Checkout\Test\Unit\Block\Cart;
77

8-
98
class LayoutProcessorTest extends \PHPUnit_Framework_TestCase
109
{
1110

0 commit comments

Comments
 (0)