Test Failed
Pull Request — master (#11)
by Stanislau
04:37 queued 58s
created

PluginClassHasDependencies   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A run() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 *  This file is part of the Micro framework package.
7
 *
8
 *  (c) Stanislau Komar <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
readonly class PluginClassDefault
15
{
16
    public function run(): string
17
    {
18
        return __CLASS__;
19
    }
20
}
21
22
readonly class PluginClassHasDependencies
23
{
24
    public function __construct(
25
        private PluginClassDefault $default,
26
    ) {
27
    }
28
29
    public function run(): string
30
    {
31
        return $this->default->run().' '.__CLASS__;
32
    }
33
}
34