ProductModelAkeneoApiStreamPlugin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
c 1
b 0
f 1
dl 0
loc 33
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getInputStream() 0 5 1
A getName() 0 3 1
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\Zed\AkeneoPimMiddlewareConnector\Communication\Plugin\Stream;
9
10
use Spryker\Zed\Kernel\Communication\AbstractPlugin;
0 ignored issues
show
Bug introduced by
The type Spryker\Zed\Kernel\Communication\AbstractPlugin 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...
11
use SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface;
0 ignored issues
show
Bug introduced by
The type SprykerMiddleware\Shared...eam\ReadStreamInterface 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 SprykerMiddleware\Zed\Process\Dependency\Plugin\Stream\InputStreamPluginInterface;
0 ignored issues
show
Bug introduced by
The type SprykerMiddleware\Zed\Pr...utStreamPluginInterface 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...
13
14
/**
15
 * @method \SprykerEco\Zed\AkeneoPimMiddlewareConnector\Communication\AkeneoPimMiddlewareConnectorCommunicationFactory getFactory()
16
 * @method \SprykerEco\Zed\AkeneoPimMiddlewareConnector\Business\AkeneoPimMiddlewareConnectorFacadeInterface getFacade()
17
 * @method \SprykerEco\Zed\AkeneoPimMiddlewareConnector\AkeneoPimMiddlewareConnectorConfig getConfig()
18
 * @method \SprykerEco\Zed\AkeneoPimMiddlewareConnector\Persistence\AkeneoPimMiddlewareConnectorQueryContainerInterface getQueryContainer()
19
 */
20
class ProductModelAkeneoApiStreamPlugin extends AbstractPlugin implements InputStreamPluginInterface
21
{
22
    /**
23
     * @var string
24
     */
25
    protected const PLUGIN_NAME = 'ProductModelAkeneoApiStreamPlugin';
26
27
    /**
28
     * {@inheritDoc}
29
     *
30
     * @api
31
     *
32
     * @param string $path
33
     *
34
     * @return \SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface
35
     */
36
    public function getInputStream(string $path): ReadStreamInterface
37
    {
38
        return $this->getFactory()
39
            ->createStreamFactory()
40
            ->createProductModelAkeneoApiReadStream();
41
    }
42
43
    /**
44
     * {@inheritDoc}
45
     *
46
     * @api
47
     *
48
     * @return string
49
     */
50
    public function getName(): string
51
    {
52
        return static::PLUGIN_NAME;
53
    }
54
}
55