ExecutableCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
A __construct() 0 3 1
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