ExecutableCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace diecoding\aws\s3\base\commands;
4
5
use diecoding\aws\s3\interfaces\Bus;
6
use diecoding\aws\s3\interfaces\commands\ExecutableCommand as ExecutableCommandInterface;
7
8
/**
9
 * Class ExecutableCommand
10
 *
11
 * @package diecoding\aws\s3\base\commands
12
 */
13
abstract class ExecutableCommand implements ExecutableCommandInterface
14
{
15
    /** @var \diecoding\aws\s3\interfaces\Bus */
16
    private $bus;
17
18
    /**
19
     * ExecutableCommand constructor.
20
     *
21
     * @param \diecoding\aws\s3\interfaces\Bus $bus
22
     */
23
    public function __construct(Bus $bus)
24
    {
25
        $this->bus = $bus;
26
    }
27
28
    /**
29
     * @return mixed
30
     */
31
    public function execute()
32
    {
33
        return $this->bus->execute($this);
34
    }
35
}
36