Completed
Branch feature/pre-split (7f7f80)
by Anton
04:48
created

CommandQueue::addCommand()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
/**
3
 * components
4
 *
5
 * @author    Wolfy-J
6
 */
7
namespace Spiral\ORM\Commands;
8
9
use Spiral\ORM\CommandInterface;
10
11
class CommandQueue implements CommandInterface
12
{
13
    private $commands = [];
14
15
    public function addCommand(CommandInterface $command)
16
    {
17
        if ($command instanceof NullCommand) {
18
            //Nothing to do, let's save some memory
19
            return;
20
        }
21
22
        $this->commands[] = $command;
23
    }
24
}