Passed
Pull Request — master (#542)
by Alexey
07:38
created

RouterConfig::isRoutingCacheEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Zed\Router;
9
10
use Spryker\Zed\Router\RouterConfig as SprykerRouterConfig;
11
12
class RouterConfig extends SprykerRouterConfig
13
{
14
    /**
15
     * @return list<string>
0 ignored issues
show
Bug introduced by
The type Pyz\Zed\Router\list 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...
16
     */
17
    public function getControllerDirectories(): array
18
    {
19
        $controllerDirectories = parent::getControllerDirectories();
20
21
        $controllerDirectories[] = sprintf('%s/spryker-sdk/*/src/*/Zed/*/Communication/Controller/', APPLICATION_VENDOR_DIR);
22
        $controllerDirectories[] = sprintf('%s/spryker-eco/*/src/*/Zed/*/Communication/Controller/', APPLICATION_VENDOR_DIR);
23
24
        return array_filter($controllerDirectories, 'glob');
0 ignored issues
show
Bug Best Practice introduced by
The expression return array_filter($con...lerDirectories, 'glob') returns the type array which is incompatible with the documented return type Pyz\Zed\Router\list.
Loading history...
25
    }
26
27
    /**
28
     * @return bool
29
     */
30
    public function isRoutingCacheEnabled(): bool
31
    {
32
        return true;
33
    }
34
}
35