wirecardBrasil /
magento2
| 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
|
|||
| 14 | use Moip\Magento2\Model\Console\Command\Preference\Delete; |
||
| 15 | use Symfony\Component\Console\Command\Command; |
||
|
0 ignored issues
–
show
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. 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\InputArgument; |
||
|
0 ignored issues
–
show
The type
Symfony\Component\Console\Input\InputArgument 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. 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\Input\InputInterface; |
||
|
0 ignored issues
–
show
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 18 | use Symfony\Component\Console\Output\OutputInterface; |
||
|
0 ignored issues
–
show
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 19 | |||
| 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 |
||
|
0 ignored issues
–
show
|
|||
| 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; |
||
|
0 ignored issues
–
show
It seems like
$delete of type Moip\Magento2\Model\Cons...mmand\Preference\Delete is incompatible with the declared type Moip\Magento2\Console\Co...mmand\Preference\Delete of property $delete.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property. Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.. Loading history...
|
|||
| 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); |
||
|
0 ignored issues
–
show
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 61 | $this->delete->setOutput($output); |
||
| 62 | |||
| 63 | $ids[] = $input->getArgument(self::WEBHOOK_ID); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
| 64 | $this->delete->delete($ids); |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * {@inheritdoc} |
||
| 69 | */ |
||
| 70 | protected function configure() |
||
| 71 | { |
||
| 72 | $this->setName('moip:webhooks:delete_preference'); |
||
| 73 | $this->setDescription('Manually delete the preferred url for Webhooks'); |
||
| 74 | $this->setDefinition( |
||
| 75 | [new InputArgument(self::WEBHOOK_ID, InputArgument::REQUIRED, 'ID Webhook - NPR-xxxx')] |
||
| 76 | ); |
||
| 77 | parent::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