Completed
Push — master ( c762b0...684d44 )
by John
02:56
created

ComplexType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 40
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getSchema() 0 4 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\ApiDescriptions package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
namespace KleijnWeb\ApiDescriptions\Description;
9
10
use KleijnWeb\ApiDescriptions\Description\Schema\ObjectSchema;
11
12
/**
13
 * @author John Kleijn <[email protected]>
14
 */
15
class ComplexType
16
{
17
    /**
18
     * @var string
19
     */
20
    private $name;
21
22
    /**
23
     * @var ObjectSchema
24
     */
25
    private $schema;
26
27
    /**
28
     * ComplexType constructor.
29
     *
30
     * @param string       $name
31
     * @param ObjectSchema $schema
32
     */
33
    public function __construct(string $name, ObjectSchema $schema)
34
    {
35
        $this->name   = $name;
36
        $this->schema = $schema;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getName(): string
43
    {
44
        return $this->name;
45
    }
46
47
    /**
48
     * @return ObjectSchema
49
     */
50
    public function getSchema(): ObjectSchema
51
    {
52
        return $this->schema;
53
    }
54
}
55