Completed
Push — master ( 2604a0...14e09a )
by Joachim
02:14
created

SyncTerminalsCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Loevgaard\DandomainAltapayBundle\Command;
4
5
use Loevgaard\DandomainAltapayBundle\Synchronizer\TerminalSynchronizer;
6
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class SyncTerminalsCommand extends ContainerAwareCommand
11
{
12
    /**
13
     * @var TerminalSynchronizer
14
     */
15
    protected $terminalSynchronizer;
16
17
    public function __construct(TerminalSynchronizer $terminalSynchronizer)
18
    {
19
        $this->terminalSynchronizer = $terminalSynchronizer;
20
21
        parent::__construct();
22
    }
23
24
    protected function configure()
25
    {
26
        $this->setName('loevgaard:dandomain:altapay:sync-terminals')
27
            ->setDescription('Synchronizes terminals from Altapay to the local database (one way sync)')
28
        ;
29
    }
30
31
    protected function execute(InputInterface $input, OutputInterface $output)
32
    {
33
        $this->terminalSynchronizer->syncAll();
34
    }
35
}
36