Skip to content

Commit 08ad450

Browse files
committed
fix failed static tests
1 parent 5fddc7e commit 08ad450

File tree

6 files changed

+20
-23
lines changed

6 files changed

+20
-23
lines changed

app/code/Magento/Catalog/Helper/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Image extends AbstractHelper implements ArgumentInterface
2424
/**
2525
* Media config node
2626
*/
27-
const MEDIA_TYPE_CONFIG_NODE = 'images';
27+
public const MEDIA_TYPE_CONFIG_NODE = 'images';
2828

2929
/**
3030
* Current model

app/code/Magento/Catalog/Model/Category.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,29 +48,29 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
4848
* Entity code.
4949
* Can be used as part of method name for entity processing
5050
*/
51-
const ENTITY = 'catalog_category';
51+
public const ENTITY = 'catalog_category';
5252

5353
/**#@+
5454
* Category display modes
5555
*/
56-
const DM_PRODUCT = 'PRODUCTS';
56+
public const DM_PRODUCT = 'PRODUCTS';
5757

58-
const DM_PAGE = 'PAGE';
58+
public const DM_PAGE = 'PAGE';
5959

60-
const DM_MIXED = 'PRODUCTS_AND_PAGE';
60+
public const DM_MIXED = 'PRODUCTS_AND_PAGE';
6161
/**#@-*/
6262

6363
/**
6464
* Id of root category
6565
*/
66-
const ROOT_CATEGORY_ID = 0;
66+
public const ROOT_CATEGORY_ID = 0;
6767

6868
/**
6969
* Id of category tree root
7070
*/
71-
const TREE_ROOT_ID = 1;
71+
public const TREE_ROOT_ID = 1;
7272

73-
const CACHE_TAG = 'cat_c';
73+
public const CACHE_TAG = 'cat_c';
7474

7575
/**
7676
* @var string

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,11 @@ class DataProvider
6969
private $productAttributeCollectionFactory;
7070

7171
/**
72-
* Eav config
73-
*
7472
* @var Config
7573
*/
7674
private $eavConfig;
7775

7876
/**
79-
* Catalog product type
80-
*
8177
* @var Type
8278
*/
8379
private $catalogProductType;
@@ -90,8 +86,6 @@ class DataProvider
9086
private $eventManager;
9187

9288
/**
93-
* Store manager
94-
*
9589
* @var StoreManagerInterface
9690
*/
9791
private $storeManager;
@@ -179,7 +173,8 @@ public function __construct(
179173
$this->engine = $engineProvider->get();
180174
$this->metadata = $metadataPool->getMetadata(ProductInterface::class);
181175
$this->antiGapMultiplier = $antiGapMultiplier;
182-
$this->selectSearchableProducts = $getSearchableProductsSelect ?: ObjectManager::getInstance()->get(GetSearchableProductsSelect::class);
176+
$this->selectSearchableProducts = $getSearchableProductsSelect ?:
177+
ObjectManager::getInstance()->get(GetSearchableProductsSelect::class);
183178
}
184179

185180
/**
@@ -589,7 +584,9 @@ private function getAttributeValue($attributeId, $valueIds, $storeId)
589584
* @param int $attributeId
590585
* @param int|string $valueIds
591586
* @param int $storeId
587+
*
592588
* @return null|string
589+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
593590
*/
594591
private function getAttributeOptionValue($attributeId, $valueIds, $storeId)
595592
{

app/code/Magento/Sales/Model/Order/Creditmemo.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
*/
3333
class Creditmemo extends AbstractModel implements EntityInterface, CreditmemoInterface
3434
{
35-
const STATE_OPEN = 1;
35+
public const STATE_OPEN = 1;
3636

37-
const STATE_REFUNDED = 2;
37+
public const STATE_REFUNDED = 2;
3838

39-
const STATE_CANCELED = 3;
39+
public const STATE_CANCELED = 3;
4040

41-
const REPORT_DATE_TYPE_ORDER_CREATED = 'order_created';
41+
public const REPORT_DATE_TYPE_ORDER_CREATED = 'order_created';
4242

43-
const REPORT_DATE_TYPE_REFUND_CREATED = 'refund_created';
43+
public const REPORT_DATE_TYPE_REFUND_CREATED = 'refund_created';
4444

4545
/**
4646
* Identifier for order history item

app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ class ComplexTypeStrategy extends AbstractComplexTypeStrategy
1616
/**
1717
* Array item key value for element.
1818
*/
19-
const ARRAY_ITEM_KEY_NAME = 'item';
19+
public const ARRAY_ITEM_KEY_NAME = 'item';
2020

2121
/**
2222
* Appinfo nodes namespace.
2323
*/
24-
const APP_INF_NS = 'inf';
24+
public const APP_INF_NS = 'inf';
2525

2626
/**
2727
* @var \Magento\Framework\Reflection\TypeProcessor

lib/internal/Magento/Framework/Stdlib/StringUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class StringUtils
1616
/**
1717
* Default charset
1818
*/
19-
const ICONV_CHARSET = 'UTF-8';
19+
public const ICONV_CHARSET = 'UTF-8';
2020

2121
/**
2222
* Capitalize first letters and convert separators if needed

0 commit comments

Comments
 (0)