Completed
Push — master ( 579af5...b29473 )
by Oleg
07:53
created

Command   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 30
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php /** MicroCommand */
2
3
namespace Micro\Base;
4
5
/**
6
 * Command class file.
7
 *
8
 * @author Oleg Lunegov <[email protected]>
9
 * @link https://github.com/lugnsk/micro
10
 * @copyright Copyright &copy; 2013 Oleg Lunegov
11
 * @license /LICENSE
12
 * @package Micro
13
 * @subpackage Base
14
 * @version 1.0
15
 * @since 1.0
16
 * @abstract
17
 */
18
abstract class Command implements ICommand
19
{
20
    /** @var array $args arguments for command */
21
    public $args = [];
22
    /** @var bool $result status of execute command */
23
    public $result = false;
24
    /** @var string $message status message of execute command */
25
    public $message = '';
26
    /** @var IContainer $container Container config */
27
    protected $container;
28
29
30
    /**
31
     * Set arguments class
32
     *
33
     * @access public
34
     *
35
     * @param array $params configuration array
36
     *
37
     * @result void
38
     */
39
    public function __construct(array $params)
40
    {
41
        $this->container = $params['container'];
42
43
        unset($params['container']);
44
45
        $this->args = $params;
46
    }
47
}
48