PluginConfigurationTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 4
c 2
b 0
f 1
dl 0
loc 18
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setConfiguration() 0 3 1
A configuration() 0 3 1
1
<?php
2
3
/*
4
 *  This file is part of the Micro framework package.
5
 *
6
 *  (c) Stanislau Komar <[email protected]>
7
 *
8
 *  For the full copyright and license information, please view the LICENSE
9
 *  file that was distributed with this source code.
10
 */
11
12
namespace Micro\Framework\Kernel\Plugin;
13
14
use Micro\Framework\Kernel\Configuration\PluginConfigurationInterface;
15
16
trait PluginConfigurationTrait
17
{
18
    private PluginConfigurationInterface $configuration;
19
20
    /**
21
     * {@inheritDoc}
22
     */
23 3
    public function setConfiguration(PluginConfigurationInterface $pluginConfiguration): void
24
    {
25 3
        $this->configuration = $pluginConfiguration;
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31 3
    public function configuration(): PluginConfigurationInterface
32
    {
33 3
        return $this->configuration;
34
    }
35
}
36