Passed
Push[email protected] ( 356814...3dff17 )
by Bruno
20:21 queued 18:30
created

ListWebhook::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 7
rs 10
1
<?php
2
/**
3
 * Copyright © Wirecard Brasil. All rights reserved.
4
 *
5
 * @author    Bruno Elisei <[email protected]>
6
 * See COPYING.txt for license details.
7
 */
8
9
declare(strict_types=1);
10
11
namespace Moip\Magento2\Console\Command\Preference;
12
13
use Magento\Framework\App\State;
0 ignored issues
show
Bug introduced by
The type Magento\Framework\App\State 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...
14
use Moip\Magento2\Model\Console\Command\Preference\All;
15
use Symfony\Component\Console\Command\Command;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Command\Command 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
use Symfony\Component\Console\Input\InputInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Input\InputInterface 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...
17
use Symfony\Component\Console\Output\OutputInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Output\OutputInterface 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...
18
19
class ListWebhook extends Command
20
{
21
    /**
22
     * @var all
23
     */
24
    protected $all;
25
26
    /**
27
     * @var State
28
     */
29
    protected $state;
30
31
    /**
32
     * CreateWebhook constructor.
33
     *
34
     * @param State $state
35
     * @param All   $all
36
     */
37
    public function __construct(
38
        State $state,
39
        All $all
40
    ) {
41
        $this->state = $state;
42
        $this->all = $all;
43
        parent::__construct();
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    protected function execute(
50
        InputInterface $input,
51
        OutputInterface $output
52
    ) {
53
        $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML);
0 ignored issues
show
Bug introduced by
The type Magento\Framework\App\Area 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...
54
        $this->all->setOutput($output);
55
        $this->all->all();
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    protected function configure()
62
    {
63
        $this->setName('moip:webhooks:list_preference');
64
        $this->setDescription('List of preferred urls for Webhooks');
65
        parent::configure();
66
    }
67
}
68