Schema   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 11
c 1
b 0
f 0
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A serializeObject() 0 17 2
A getSchemaId() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the tmilos/scim-schema package.
5
 *
6
 * (c) Milos Tomic <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Tmilos\ScimSchema\Model\v1;
13
14
use Tmilos\ScimSchema\ScimConstantsV1;
15
16
class Schema extends \Tmilos\ScimSchema\Model\Schema
17
{
18
    public function getSchemaId()
19
    {
20
        return ScimConstantsV1::SCHEMA_SCHEMA;
21
    }
22
23
    public function serializeObject()
24
    {
25
        $parentValue = parent::serializeObject();
26
27
        $result = [
28
            'id' => $parentValue['id'],
29
            'schema' => ScimConstantsV1::CORE,
30
        ];
31
32
        unset($parentValue['id']);
33
        unset($parentValue['schemas']);
34
35
        foreach ($parentValue as $k => $v) {
36
            $result[$k] = $v;
37
        }
38
39
        return $result;
40
    }
41
}
42