Completed
Pull Request — master (#152)
by Christopher
03:37
created

ODataPropertyContent::getPropertys()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace POData\ObjectModel;
4
5
/**
6
 * Class ODataPropertyContent represents properties of a Complex type or entity element instance.
7
 */
8
class ODataPropertyContent
9
{
10
    /**
11
     * The collection of properties.
12
     *
13
     * @var ODataProperty[]
14
     */
15
    public $properties = [];
16
17
    /**
18
     * @return \POData\ObjectModel\ODataProperty[]
19
     */
20
    public function getPropertys()
21
    {
22
        return $this->properties;
23
    }
24
25
    /**
26
     * @param $newProperties \POData\ObjectModel\ODataProperty[]
27
     */
28
    public function setPropertys(array $newProperties)
29
    {
30
        foreach ($newProperties as $key => $property) {
31
            $property->name = $key;
32
        }
33
        $this->properties = $newProperties;
34
    }
35
}
36