Completed
Pull Request — master (#463)
by Alexander
30:17 queued 05:15
created

BaseSourceTransformer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
/*
5
 * Go! AOP framework
6
 *
7
 * @copyright Copyright 2013, Lisachenko Alexander <[email protected]>
8
 *
9
 * This source file is subject to the license that is bundled
10
 * with this source code in the file LICENSE.
11
 */
12
13
namespace Go\Instrument\Transformer;
14
15
use Go\Core\AspectContainer;
16
use Go\Core\AspectKernel;
17
18
/**
19
 * Base source transformer class definition
20
 */
21
abstract class BaseSourceTransformer implements SourceTransformer
22
{
23
    /**
24
     * Transformer options
25
     */
26
    protected array $options = [];
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_ARRAY, expecting T_FUNCTION or T_CONST
Loading history...
27
28
    /**
29
     * Aspect kernel instance
30
     */
31
    protected AspectKernel $kernel;
32
33
    /**
34
     * Aspect container instance
35
     */
36
    protected AspectContainer $container;
37
38
    /**
39 15
     * Default constructor for transformer
40
     */
41 15
    public function __construct(AspectKernel $kernel, array $options = [])
42 15
    {
43 15
        $this->kernel    = $kernel;
44 15
        $this->container = $kernel->getContainer();
45
        $this->options   = $options ?: $kernel->getOptions();
46
    }
47
}
48