GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 02a544...21c789 )
by Odiseo
03:34
created

SyncAllCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 17
nc 1
nop 2
dl 0
loc 24
rs 9.7
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusMailchimpPlugin\Command;
6
7
use Symfony\Component\Console\Input\ArrayInput;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Symfony\Component\Console\Style\SymfonyStyle;
11
12
class SyncAllCommand extends BaseSyncCommand
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    protected function configure()
18
    {
19
        $this
20
            ->setName('odiseo:mailchimp:sync-all')
21
            ->setDescription('Synchronize all data to Mailchimp.')
22
        ;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected function execute(InputInterface $input, OutputInterface $output)
29
    {
30
        $this->io = new SymfonyStyle($input, $output);
31
32
        $this->io->title('Synchronizing all data to Mailchimp');
33
34
        $syncStoresCommand = $this->getApplication()->find('odiseo:mailchimp:sync-stores');
35
        $syncCustomersCommand = $this->getApplication()->find('odiseo:mailchimp:sync-customers');
36
        $syncProductsCommand = $this->getApplication()->find('odiseo:mailchimp:sync-products');
37
        $syncCartsCommand = $this->getApplication()->find('odiseo:mailchimp:sync-carts');
38
        $syncOrdersCommand = $this->getApplication()->find('odiseo:mailchimp:sync-orders');
39
40
        $syncStoresCommand->run(new ArrayInput([
41
            '--isSyncing' => true,
42
        ]), $output);
43
44
        $syncCustomersCommand->run(new ArrayInput([]), $output);
45
        $syncProductsCommand->run(new ArrayInput([]), $output);
46
        $syncCartsCommand->run(new ArrayInput([]), $output);
47
        $syncOrdersCommand->run(new ArrayInput([]), $output);
48
49
        $syncStoresCommand->run(new ArrayInput([
50
            '--isSyncing' => false,
51
        ]), $output);
52
    }
53
}
54