Passed
Pull Request — master (#38)
by Marco
02:40
created

UseClassBasedChecksOnATrait::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Roave\ApiCompare\Comparator\BackwardsCompatibility\TraitBased;
6
7
use Roave\ApiCompare\Changes;
8
use Roave\ApiCompare\Comparator\BackwardsCompatibility\ClassBased\ClassBased;
9
use Roave\BetterReflection\Reflection\ReflectionClass;
10
11
final class UseClassBasedChecksOnATrait implements TraitBased
12
{
13
    /** @var ClassBased */
14
    private $check;
15
16
    public function __construct(ClassBased $classBased)
17
    {
18
        $this->check = $classBased;
19
    }
20
21
    public function compare(ReflectionClass $fromTrait, ReflectionClass $toTrait) : Changes
22
    {
23
        return $this->check->compare($fromTrait, $toTrait);
24
    }
25
}
26