Extension::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
/**
3
 * Copyright 2016 - 2018, Cake Development Corporation (http://cakedc.com)
4
 *
5
 * Licensed under The MIT License
6
 * Redistributions of files must retain the above copyright notice.
7
 *
8
 * @copyright Copyright 2016 - 2018, Cake Development Corporation (http://cakedc.com)
9
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
10
 */
11
12
namespace CakeDC\Api\Service\Action\Extension;
13
14
use CakeDC\Api\Service\Action\ExtensionRegistry;
15
use Cake\Core\InstanceConfigTrait;
16
17
/**
18
 * Class Extension
19
 *
20
 * @package CakeDC\Api\Service\Action\Extension
21
 */
22
abstract class Extension
23
{
24
    use InstanceConfigTrait;
25
26
    protected $_defaultConfig = [];
27
28
    /**
29
     * Extension constructor.
30
     *
31
     * @param ExtensionRegistry $registry An ExtensionRegistry instance.
32
     * @param array $config Configuration.
33
     */
34 50
    public function __construct(ExtensionRegistry $registry, array $config = [])
35
    {
36 50
        $this->setConfig($config);
37 50
    }
38
}
39