Completed
Pull Request — develop (#455)
by Lucas
37:54 queued 31:44
created

SchemaAdditionalProperties::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Graviton SchemaAdditionalProperties Document
4
 */
5
6
namespace Graviton\SchemaBundle\Document;
7
8
/**
9
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
10
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
11
 * @link     http://swisscom.ch
12
 */
13
class SchemaAdditionalProperties
14
{
15
    /**
16
     * @var Schema|boolean
17
     */
18
    protected $properties;
19
20
    /**
21
     * Constructor
22
     *
23
     * @param Schema|boolean $properties either a boolean or a Schema object
24
     */
25
    public function __construct($properties)
26
    {
27
        $this->setProperties($properties);
28
    }
29
30
    /**
31
     * gets properties
32
     *
33
     * @return Schema|boolean properties
34
     */
35
    public function getProperties()
36
    {
37
        return $this->properties;
38
    }
39
40
    /**
41
     * sets properties
42
     *
43
     * @param Schema|boolean $properties properties
44
     *
45
     * @return void
46
     */
47
    public function setProperties($properties)
48
    {
49
        $this->properties = $properties;
50
    }
51
}
52