Passed
Push — master ( fd08ce...6743ff )
by Maximilian
01:01 queued 10s
created

Type::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\Dialog\Entity;
4
5
class Type
6
{
7
    /**
8
     * @var string
9
     */
10
    public $name;
11
12
    /**
13
     * @var TypeValue[]
14
     */
15
    public $values;
16
17
    /**
18
     * @param string      $name
19
     * @param TypeValue[] $values
20
     *
21
     * @return Type
22
     */
23
    public static function create(string $name, array $values): self
24
    {
25
        $type = new self();
26
27
        $type->name   = $name;
28
        $type->values = $values;
29
30
        return $type;
31
    }
32
}
33