Completed
Push — master ( dc5b75...3324e4 )
by Valentin
03:55
created

Declarations   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createParentFromReflection() 0 4 1
A createClassFromName() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Cycle\ORM\Promise\Declaration;
5
6
class Declarations
7
{
8
    public static function createParentFromReflection(\ReflectionClass $parent): DeclarationInterface
9
    {
10
        return new Declaration\ReflectionDeclaration($parent);
11
    }
12
13
    public static function createClassFromName(string $class, DeclarationInterface $parent): DeclarationInterface
14
    {
15
        return new Declaration\ChildClassDeclaration($class, $parent);
16
    }
17
}