These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * WellCommerce Open-Source E-Commerce Platform |
||
4 | * |
||
5 | * This file is part of the WellCommerce package. |
||
6 | * |
||
7 | * (c) Adam Piotrowski <[email protected]> |
||
8 | * |
||
9 | * For the full copyright and license information, |
||
10 | * please view the LICENSE file that was distributed with this source code. |
||
11 | */ |
||
12 | |||
13 | namespace WellCommerce\Bundle\StandardEditionBundle\Command; |
||
14 | |||
15 | use Symfony\Component\Console\Command\Command; |
||
16 | use Symfony\Component\Console\Input\InputInterface; |
||
17 | use Symfony\Component\Console\Output\OutputInterface; |
||
18 | use WellCommerce\Bundle\AppBundle\Console\Action\RefreshAdminMenuAction; |
||
19 | use WellCommerce\Bundle\CoreBundle\Console\Action\ClearCacheAction; |
||
20 | use WellCommerce\Bundle\CoreBundle\Console\Action\InstallAssetsAction; |
||
21 | use WellCommerce\Bundle\CoreBundle\Console\Action\InstallDatabaseAction; |
||
22 | use WellCommerce\Bundle\CoreBundle\Console\Action\InstallFixturesAction; |
||
23 | use WellCommerce\Bundle\CoreBundle\Console\Executor\ConsoleActionExecutorInterface; |
||
24 | use WellCommerce\Bundle\SearchBundle\Console\Action\ReindexAction; |
||
25 | |||
26 | /** |
||
27 | * Class InstallCommand |
||
28 | * |
||
29 | * @author Adam Piotrowski <[email protected]> |
||
30 | */ |
||
31 | class InstallCommand extends Command |
||
32 | { |
||
33 | /** |
||
34 | * @var ConsoleActionExecutorInterface |
||
35 | */ |
||
36 | protected $executor; |
||
37 | |||
38 | /** |
||
39 | * InstallCommand constructor. |
||
40 | * |
||
41 | * @param ConsoleActionExecutorInterface $executor |
||
42 | */ |
||
43 | public function __construct(ConsoleActionExecutorInterface $executor) |
||
44 | { |
||
45 | parent::__construct(); |
||
46 | $this->executor = $executor; |
||
47 | } |
||
48 | |||
49 | protected function configure() |
||
50 | { |
||
51 | $this->setDescription('Installs WellCommerce Standard Edition'); |
||
52 | $this->setName('wellcommerce:install'); |
||
53 | } |
||
54 | |||
55 | protected function execute(InputInterface $input, OutputInterface $output) |
||
56 | { |
||
57 | $actions = [ |
||
58 | new ClearCacheAction(), |
||
59 | new InstallDatabaseAction(), |
||
60 | new InstallFixturesAction(), |
||
61 | new RefreshAdminMenuAction(), |
||
62 | new ReindexAction(), |
||
63 | new InstallAssetsAction(), |
||
64 | ]; |
||
65 | |||
66 | $this->executor->execute($actions, $output); |
||
0 ignored issues
–
show
|
|||
67 | } |
||
68 | } |
||
69 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: