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

ODataPropertyContent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPropertys() 0 4 1
A setPropertys() 0 7 2
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