Skip to content

Commit 16fd841

Browse files
committed
MAGETWO-88631: Pr sprint 10 delivery
- fix static tests
1 parent 440c07b commit 16fd841

File tree

14 files changed

+23
-20
lines changed

14 files changed

+23
-20
lines changed

app/code/Magento/CatalogGraphQl/Model/Layer/CollectionProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public function __construct(
3939

4040
/**
4141
* @param \Magento\Catalog\Model\Category $category
42-
* @return \Magento\CatalogSearch\Model\ResourceModel\Advanced\Collection
42+
* @return Collection
4343
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
4444
*/
45-
public function getCollection(\Magento\Catalog\Model\Category $category)
45+
public function getCollection(\Magento\Catalog\Model\Category $category) : Collection
4646
{
4747
if (!$this->collection) {
4848
$this->collection = $this->collectionFactory->create();

app/code/Magento/CatalogGraphQl/Model/Layer/Context.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ public function __construct(
4949
/**
5050
* @return ItemCollectionProviderInterface
5151
*/
52-
public function getCollectionProvider()
52+
public function getCollectionProvider() : ItemCollectionProviderInterface
5353
{
5454
return $this->collectionProvider;
5555
}
5656

5757
/**
5858
* @return StateKeyInterface
5959
*/
60-
public function getStateKey()
60+
public function getStateKey() : StateKeyInterface
6161
{
6262
return $this->stateKey;
6363
}
6464

6565
/**
6666
* @return CollectionFilterInterface
6767
*/
68-
public function getCollectionFilter()
68+
public function getCollectionFilter() : CollectionFilterInterface
6969
{
7070
return $this->collectionFilter;
7171
}

app/code/Magento/CatalogGraphQl/Model/LayerFilterItemTypeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types = 1);
6+
declare(strict_types=1);
77

88
namespace Magento\CatalogGraphQl\Model;
99

app/code/Magento/CatalogGraphQl/Model/LayerFilterItemTypeResolverComposite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types = 1);
6+
declare(strict_types=1);
77

88
namespace Magento\CatalogGraphQl\Model;
99

app/code/Magento/CatalogGraphQl/Model/Resolver/Layer/FilterableAttributesListFactory.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
namespace Magento\CatalogGraphQl\Model\Resolver\Layer;
99

1010
use Magento\Catalog\Model\Layer\Category\FilterableAttributeList as CategoryFilterableAttributeList;
11-
use Magento\Catalog\Model\Layer\FilterList;
1211
use Magento\Catalog\Model\Layer\Resolver;
1312
use Magento\Catalog\Model\Layer\Search\FilterableAttributeList;
13+
use Magento\Catalog\Model\Layer\FilterableAttributeListInterface;
1414

1515
/**
1616
* Factory for filterable attributes list.
@@ -22,11 +22,9 @@ class FilterableAttributesListFactory
2222
*
2323
* @var \Magento\Framework\ObjectManagerInterface
2424
*/
25-
private $objectManager = null;
25+
private $objectManager;
2626

2727
/**
28-
* Factory constructor
29-
*
3028
* @param \Magento\Framework\ObjectManagerInterface $objectManager
3129
*/
3230
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
@@ -39,9 +37,9 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
3937
*
4038
* @param string $type
4139
* @param array $data
42-
* @return FilterList
40+
* @return FilterableAttributeListInterface
4341
*/
44-
public function create(string $type, array $data = array())
42+
public function create(string $type, array $data = []) : FilterableAttributeListInterface
4543
{
4644
if ($type === Resolver::CATALOG_LAYER_CATEGORY) {
4745
return $this->objectManager->create(CategoryFilterableAttributeList::class, $data);

app/code/Magento/CatalogGraphQl/Model/Resolver/Layer/FiltersProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types = 1);
6+
declare(strict_types=1);
77

88
namespace Magento\CatalogGraphQl\Model\Resolver\Layer;
99

@@ -31,7 +31,6 @@ class FiltersProvider
3131
private $filterListFactory;
3232

3333
/**
34-
* FiltersProvider constructor.
3534
* @param Resolver $layerResolver
3635
* @param FilterableAttributesListFactory $filterableAttributesListFactory
3736
* @param FilterListFactory $filterListFactory

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getResult(
8888
* @param ResolveInfo $info
8989
* @return string[]
9090
*/
91-
private function getProductFields(ResolveInfo $info)
91+
private function getProductFields(ResolveInfo $info) : array
9292
{
9393
$fieldNames = [];
9494
foreach ($info->fieldNodes as $node) {

app/code/Magento/SwatchesGraphQl/Model/Resolver/SwatchLayerFilterItemResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types = 1);
6+
declare(strict_types=1);
77

88
namespace Magento\SwatchesGraphQl\Model\Resolver;
99

app/code/Magento/SwatchesGraphQl/Plugin/Filters/DataProviderPlugin.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\SwatchesGraphQl\Plugin\Filters;
89

@@ -12,8 +13,6 @@
1213

1314
/**
1415
* Plugin to add swatch data to filters data from filters data provider.
15-
*
16-
* @package Magento\SwatchesGraphQl\Plugin\Filters
1716
*/
1817
class DataProviderPlugin
1918
{
@@ -58,7 +57,7 @@ public function __construct(
5857
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5958
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
6059
*/
61-
public function aroundGetData(Filters $subject, \Closure $proceed, string $layerType)
60+
public function aroundGetData(Filters $subject, \Closure $proceed, string $layerType) : array
6261
{
6362
$swatchFilters = [];
6463
/** @var AbstractFilter $filter */

dev/tests/api-functional/testsuite/Magento/GraphQl/Swatches/ProductSearchTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\GraphQl\Swatches;
89

0 commit comments

Comments
 (0)