Passed
Push — bugfix/supesc-331-adjusted-the... ( a6d65b...656fd3 )
by Ihor
04:07
created

AkeneoPimServiceFactory::getSessionClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Service\AkeneoPim;
9
10
use Spryker\Service\Kernel\AbstractServiceFactory;
11
use Spryker\Zed\User\UserDependencyProvider;
0 ignored issues
show
Bug introduced by
The type Spryker\Zed\User\UserDependencyProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Adapter\AdapterFactory;
13
use SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Adapter\AdapterFactoryInterface;
14
use SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\WrapperFactory;
15
use SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\WrapperFactoryInterface;
16
use Symfony\Component\HttpFoundation\Session\SessionInterface;
17
18
/**
19
 * @method \SprykerEco\Service\AkeneoPim\AkeneoPimConfig getConfig()
20
 */
21
class AkeneoPimServiceFactory extends AbstractServiceFactory
22
{
23
    /**
24
     * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Adapter\AdapterFactoryInterface
25
     */
26
    public function createAkeneoPimAdapterFactory(): AdapterFactoryInterface
27
    {
28
        return new AdapterFactory(
29
            $this->getConfig(),
30
            $this->createWrapperFactory(),
31
            $this->getSessionClient()
32
        );
33
    }
34
35
    /**
36
     * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\WrapperFactoryInterface
37
     */
38
    public function createWrapperFactory(): WrapperFactoryInterface
39
    {
40
        return new WrapperFactory();
41
    }
42
43
    /**
44
     * @return \Symfony\Component\HttpFoundation\Session\SessionInterface
45
     */
46
    public function getSessionClient(): SessionInterface
47
    {
48
        return $this->getProvidedDependency(AkeneoPimDependencyProvider::CLIENT_SESSION);
49
    }
50
}
51