Passed
Push — master ( d3a94c...76e109 )
by Valentin
05:50
created

Declaration   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 9 1
A __construct() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Cycle\ORM\Promise\Declaration;
5
6
class Declaration
7
{
8
    /** @var string[] */
9
    public $properties = [];
10
11
    /** @var \PhpParser\Node\Stmt\ClassMethod[] */
12
    public $methods = [];
13
14
    /** @var bool */
15
    public $hasConstructor;
16
17
    public static function create(array $properties, array $methods, bool $hasConstructor): Declaration
18
    {
19
        $self = new self();
20
        $self->properties = $properties;
21
        $self->methods = $methods;
22
        $self->hasConstructor = $hasConstructor;
23
24
        return $self;
25
    }
26
27
    protected function __construct()
28
    {
29
    }
30
}