Passed
Push — master ( 843207...29f725 )
by mark
36:53 queued 19:40
created

ChartWidgetFactory::createChartPluginCollection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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 SprykerShop\Yves\ChartWidget;
9
10
use Spryker\Shared\Chart\ChartPluginCollection\ChartPluginCollection;
1 ignored issue
show
Bug introduced by
The type Spryker\Shared\Chart\Cha...n\ChartPluginCollection 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 Spryker\Shared\Chart\ChartPluginCollection\ChartPluginCollectionInterface;
1 ignored issue
show
Bug introduced by
The type Spryker\Shared\Chart\Cha...uginCollectionInterface 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 Spryker\Yves\Kernel\AbstractFactory;
13
14
class ChartWidgetFactory extends AbstractFactory
15
{
16
    /**
17
     * @return \Spryker\Shared\Chart\Dependency\Plugin\TwigChartFunctionPluginInterface[]
18
     */
19
    public function getTwigChartFunctionPlugins(): array
20
    {
21
        return $this->getProvidedDependency(ChartWidgetDependencyProvider::PLUGIN_TWIG_CHART_FUNCTIONS);
22
    }
23
24
    /**
25
     * @return \Spryker\Shared\Chart\ChartPluginCollection\ChartPluginCollectionInterface
26
     */
27
    public function createChartPluginCollection(): ChartPluginCollectionInterface
28
    {
29
        return new ChartPluginCollection(
30
            $this->getChartPlugins()
31
        );
32
    }
33
34
    /**
35
     * @return \Spryker\Shared\Chart\Dependency\Plugin\ChartPluginInterface[]
36
     */
37
    protected function getChartPlugins(): array
38
    {
39
        return $this->getProvidedDependency(ChartWidgetDependencyProvider::PLUGIN_CHARTS);
40
    }
41
}
42