Options   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A config() 0 3 1
1
<?php
2
/**
3
 * Socket options
4
 * User: moyo
5
 * Date: 2018/7/31
6
 * Time: 3:10 PM
7
 */
8
9
namespace Carno\Socket;
10
11
class Options
12
{
13
    /**
14
     * @var array
15
     */
16
    private $config = [];
17
18
    /**
19
     * Options constructor.
20
     * @param array ...$configs
21
     */
22
    public function __construct(array ...$configs)
23
    {
24
        foreach ($configs as $config) {
25
            $this->config = array_merge($this->config, $config);
26
        }
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function config() : array
33
    {
34
        return $this->config;
35
    }
36
}
37