Passed
Pull Request — master (#365)
by Dmitry
21:01
created

PushNotificationDependencyProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
dl 0
loc 30
c 1
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPushNotificationValidatorPlugins() 0 4 1
A getPushNotificationSenderPlugins() 0 4 1
A getPushNotificationSubscriptionValidatorPlugins() 0 5 1
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\PushNotification;
9
10
use Spryker\Zed\PickingListPushNotification\Communication\Plugin\PushNotification\WarehouseUserPushNotificationSubscriptionValidatorPlugin;
11
use Spryker\Zed\PushNotification\PushNotificationDependencyProvider as SprykerPushNotificationDependencyProvider;
12
use Spryker\Zed\PushNotificationWebPushPhp\Communication\Plugin\PushNotification\PushNotificationWebPushPhpPayloadLengthPushNotificationValidatorPlugin;
13
use Spryker\Zed\PushNotificationWebPushPhp\Communication\Plugin\PushNotification\PushNotificationWebPushPhpPushNotificationSenderPlugin;
14
use Spryker\Zed\PushNotificationWebPushPhp\Communication\Plugin\PushNotification\PushNotificationWebPushPhpPushNotificationSubscriptionValidatorPlugin;
15
16
class PushNotificationDependencyProvider extends SprykerPushNotificationDependencyProvider
17
{
18
    /**
19
     * @return list<\Spryker\Zed\PushNotificationExtension\Dependency\Plugin\PushNotificationSubscriptionValidatorPluginInterface>
0 ignored issues
show
Bug introduced by
The type Pyz\Zed\PushNotification\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...
20
     */
21
    protected function getPushNotificationSubscriptionValidatorPlugins(): array
22
    {
23
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...ptionValidatorPlugin()) returns the type array<integer,Spryker\Ze...riptionValidatorPlugin> which is incompatible with the documented return type Pyz\Zed\PushNotification\list.
Loading history...
24
            new PushNotificationWebPushPhpPushNotificationSubscriptionValidatorPlugin(),
25
            new WarehouseUserPushNotificationSubscriptionValidatorPlugin(),
26
        ];
27
    }
28
29
    /**
30
     * @return list<\Spryker\Zed\PushNotificationExtension\Dependency\Plugin\PushNotificationValidatorPluginInterface>
31
     */
32
    protected function getPushNotificationValidatorPlugins(): array
33
    {
34
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...ationValidatorPlugin()) returns the type array<integer,Spryker\Ze...icationValidatorPlugin> which is incompatible with the documented return type Pyz\Zed\PushNotification\list.
Loading history...
35
            new PushNotificationWebPushPhpPayloadLengthPushNotificationValidatorPlugin(),
36
        ];
37
    }
38
39
    /**
40
     * @return list<\Spryker\Zed\PushNotificationExtension\Dependency\Plugin\PushNotificationSenderPluginInterface>
41
     */
42
    protected function getPushNotificationSenderPlugins(): array
43
    {
44
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...ficationSenderPlugin()) returns the type array<integer,Spryker\Ze...tificationSenderPlugin> which is incompatible with the documented return type Pyz\Zed\PushNotification\list.
Loading history...
45
            new PushNotificationWebPushPhpPushNotificationSenderPlugin(),
46
        ];
47
    }
48
}
49