Completed
Push — master ( bd8241...d66abd )
by Akihito
03:20
created

Config   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 31
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A get() 0 4 1
1
<?php
2
namespace Ackintosh\Snidel;
3
4
class Config
5
{
6
    /** @var array */
7
    private $params;
8
9
    /**
10
     * @param   array   $params
11
     */
12
    public function __construct($params)
13
    {
14
        $this->params = $params;
15
        $this->params['ownerPid'] = getmypid();
16
        $this->params['taskQueue'] = array(
17
            'className'         => '\Ackintosh\Snidel\Task\Queue',
18
            'constructorArgs'   => null,
19
        );
20
        $this->params['resultQueue'] = array(
21
            'className'         => '\Ackintosh\Snidel\Result\Queue',
22
            'constructorArgs'   => null,
23
        );
24
    }
25
26
    /**
27
     * @param   string  $name
28
     * @return  mixed
29
     */
30
    public function get($name)
31
    {
32
        return $this->params[$name];
33
    }
34
}
35