Completed
Push — master ( 060b04...657701 )
by
unknown
04:35
created

EntityJSONSerializer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 13
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A serializeFields() 0 7 2
1
<?php
2
/**
3
 * ownCloud - News
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Alessandro Cosentino <[email protected]>
9
 * @author Bernhard Posselt <[email protected]>
10
 * @copyright Alessandro Cosentino 2012
11
 * @copyright Bernhard Posselt 2012, 2014
12
 */
13
14
namespace OCA\News\Db;
15
16
trait EntityJSONSerializer {
17
18
19
    public function serializeFields($properties) {
20
        $result = [];
21
        foreach($properties as $property) {
22
            $result[$property] = $this->$property;
23
        }
24
        return $result;
25
    }
26
27
28
}