Total Complexity | 3 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class DeleteWebhook extends Command |
||
21 | { |
||
22 | const WEBHOOK_ID = 'id'; |
||
23 | |||
24 | /** |
||
25 | * Delete. |
||
26 | * |
||
27 | * @var Moip\Magento2\Model\Console\Command\Preference\Delete |
||
28 | */ |
||
29 | protected $delete; |
||
30 | |||
31 | /** |
||
32 | * State. |
||
33 | * |
||
34 | * @var \Magento\Framework\App\State |
||
35 | */ |
||
36 | protected $state; |
||
37 | |||
38 | /** |
||
39 | * DeleteWebhook constructor. |
||
40 | * |
||
41 | * @param State $state |
||
42 | * @param Delete $delete |
||
43 | */ |
||
44 | public function __construct( |
||
45 | State $state, |
||
46 | Delete $delete |
||
47 | ) { |
||
48 | $this->state = $state; |
||
49 | $this->delete = $delete; |
||
50 | parent::__construct(); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | protected function execute( |
||
57 | InputInterface $input, |
||
58 | OutputInterface $output |
||
59 | ) { |
||
60 | $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML); |
||
61 | $this->delete->setOutput($output); |
||
62 | |||
63 | $ids[] = $input->getArgument(self::WEBHOOK_ID); |
||
64 | $this->delete->delete($ids); |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | protected function configure() |
||
78 | } |
||
79 | } |
||
80 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths