DefinitionProperty   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 59
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getType() 0 3 1
A __construct() 0 5 1
A getArrayElementName() 0 3 1
1
<?php
2
/**
3
 * This file is part of graze/unicontroller-client.
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/unicontroller-client/blob/master/LICENSE.md
11
 * @link https://github.com/graze/unicontroller-client
12
 */
13
namespace Graze\UnicontrollerClient\ClassGenerator\Definition;
14
15
class DefinitionProperty
16
{
17
    const PROPERTY_TYPE_INT = 'INT';
18
19
    const PROPERTY_TYPE_STRING = 'STRING';
20
21
    const PROPERTY_TYPE_ARRAY = 'ARRAY';
22
23
    const PROPERTY_TYPE_BINARY_DATA = 'BINARY DATA';
24
25
    /**
26
     * @var string
27
     */
28
    private $name;
29
30
    /**
31
     * @var string
32
     */
33
    private $type;
34
35
    /**
36
     * @var string
37
     */
38
    private $arrayElementName;
39
40
    /**
41
     * @param string $name
42
     * @param string $type
43
     * @param string $arrayElementName
44
     */
45
    public function __construct($name, $type, $arrayElementName = null)
46
    {
47
        $this->name = $name;
48
        $this->type = $type;
49
        $this->arrayElementName = $arrayElementName;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getName()
56
    {
57
        return $this->name;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getType()
64
    {
65
        return $this->type;
66
    }
67
68
    /**
69
     * @return string
70
     */
71
    public function getArrayElementName()
72
    {
73
        return $this->arrayElementName;
74
    }
75
}
76