This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +14
-11
lines changed
app/code/Magento/CatalogGraphQl/Model Expand file tree Collapse file tree 5 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \CatalogGraphQl \Model \Layer ;
7
9
8
- use \Magento \CatalogSearch \Model \ResourceModel \Advanced \Collection ;
9
- use Magento \Framework \Api \SearchCriteria \CollectionProcessor ;
10
- use Magento \Framework \Registry ;
10
+ use Magento \CatalogSearch \Model \ResourceModel \Advanced \Collection ;
11
11
12
12
/**
13
13
* Collection Provider for graphql layered navigation.
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \CatalogGraphQl \Model \Layer ;
7
9
8
10
use Magento \Catalog \Model \Layer \CollectionFilterInterface ;
11
13
12
14
/**
13
15
* Context for graphql layered navigation.
14
- *
15
- * @package Magento\CatalogGraphQl\Model\Layer
16
16
*/
17
17
class Context implements \Magento \Catalog \Model \Layer \ContextInterface
18
18
{
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \CatalogGraphQl \Model \Resolver \Layer \DataProvider ;
7
9
8
10
use Magento \Catalog \Model \Layer \Filter \AbstractFilter ;
@@ -36,7 +38,7 @@ public function __construct(
36
38
* @param string $layerType
37
39
* @return array
38
40
*/
39
- public function getData (string $ layerType )
41
+ public function getData (string $ layerType ) : array
40
42
{
41
43
$ filtersData = [];
42
44
/** @var AbstractFilter $filter */
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \CatalogGraphQl \Model \Resolver \Layer ;
7
9
8
10
use Magento \Catalog \Model \Layer \Category \FilterableAttributeList as CategoryFilterableAttributeList ;
11
+ use Magento \Catalog \Model \Layer \FilterList ;
9
12
use Magento \Catalog \Model \Layer \Resolver ;
10
13
use Magento \Catalog \Model \Layer \Search \FilterableAttributeList ;
11
14
@@ -36,11 +39,11 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
36
39
/**
37
40
* Create class instance with specified parameters
38
41
*
39
- * @param $type
42
+ * @param string $type
40
43
* @param array $data
41
- * @return \Magento\Catalog\Model\Layer\ FilterList
44
+ * @return FilterList
42
45
*/
43
- public function create ($ type , array $ data = array ())
46
+ public function create (string $ type , array $ data = array ()) : FilterList
44
47
{
45
48
if ($ type === Resolver::CATALOG_LAYER_CATEGORY ) {
46
49
return $ this ->objectManager ->create (CategoryFilterableAttributeList::class, $ data );
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Layer ;
9
9
10
- use Magento \Catalog \Model \Layer \Filter \AbstractFilter ;
11
10
use Magento \Catalog \Model \Layer \FilterListFactory ;
12
11
use Magento \Catalog \Model \Layer \Resolver ;
13
- use Magento \CatalogGraphQl \Model \Resolver \Layer \FilterableAttributesListFactory ;
14
12
15
13
/**
16
14
* Layer types filters provider.
You can’t perform that action at this time.
0 commit comments