Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | trait HasConfigTrait |
||
12 | { |
||
13 | /** |
||
14 | * @var Config |
||
15 | */ |
||
16 | protected $config; |
||
17 | |||
18 | /** |
||
19 | * @param Config $config |
||
20 | * @return static |
||
21 | */ |
||
22 | public static function fromConfig($config) |
||
23 | { |
||
24 | $agent = new static(); |
||
25 | $agent->setConfig($config); |
||
26 | return $agent; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param Config $config |
||
31 | */ |
||
32 | public function setConfig($config) |
||
36 | } |
||
37 | |||
38 | protected function populateFromConfig() |
||
52 | } |