FirstDataNotificationResourceRoutePlugin   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 5
c 1
b 0
f 0
dl 0
loc 51
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getResourceType() 0 3 1
A getResourceAttributesClassName() 0 3 1
A getController() 0 3 1
A configure() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Glue\FirstData\Plugin\GlueApplication;
9
10
use Generated\Shared\Transfer\FirstDataNotificationTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ataNotificationTransfer 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\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceRouteCollectionInterface;
12
use Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceRoutePluginInterface;
13
use Spryker\Glue\Kernel\AbstractPlugin;
14
use SprykerEco\Glue\FirstData\FirstDataConfig;
15
16
class FirstDataNotificationResourceRoutePlugin extends AbstractPlugin implements ResourceRoutePluginInterface
17
{
18
    /**
19
     * {@inheritDoc}
20
     * - Configures available actions for `first-data-notifications` resource.
21
     *
22
     * @api
23
     *
24
     * @param \Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceRouteCollectionInterface $resourceRouteCollection
25
     *
26
     * @return \Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceRouteCollectionInterface
27
     */
28
    public function configure(ResourceRouteCollectionInterface $resourceRouteCollection): ResourceRouteCollectionInterface
29
    {
30
        return $resourceRouteCollection->addPost('post', false);
31
    }
32
33
    /**
34
     * {@inheritDoc}
35
     *
36
     * @api
37
     *
38
     * @return string
39
     */
40
    public function getResourceType(): string
41
    {
42
        return FirstDataConfig::RESOURCE_FIRST_DATA_NOTIFICATIONS;
43
    }
44
45
    /**
46
     * {@inheritDoc}
47
     *
48
     * @api
49
     *
50
     * @return string
51
     */
52
    public function getController(): string
53
    {
54
        return 'first-data-notifications-resource';
55
    }
56
57
    /**
58
     * {@inheritDoc}
59
     *
60
     * @api
61
     *
62
     * @return string
63
     */
64
    public function getResourceAttributesClassName(): string
65
    {
66
        return FirstDataNotificationTransfer::class;
67
    }
68
}
69