Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
35 | protected function execute(InputInterface $input, OutputInterface $output) |
||
36 | { |
||
37 | $this->detectMagento($output, true); |
||
38 | if (!$this->initMagento()) { |
||
39 | return; |
||
40 | } |
||
41 | |||
42 | $this->setAdminArea(); |
||
43 | |||
44 | $code = $input->getArgument('code'); |
||
45 | $card = $this->getGiftcard($code); |
||
46 | |||
47 | if (!$card->getId()) { |
||
48 | $output->writeln('<info>No gift card with matching code found</info>'); |
||
49 | return; |
||
50 | } |
||
51 | |||
52 | $card->delete(); |
||
53 | |||
54 | $output->writeln('<info>Deleted gift card with code <comment>' . $code . '</comment></info>'); |
||
55 | } |
||
56 | } |
||
57 |