Completed
Push — master ( df1f12...4872e5 )
by Lucas
05:42
created

Hash   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 4 1
1
<?php
2
/**
3
 * Hash class file
4
 */
5
6
namespace Graviton\DocumentBundle\Entity;
7
8
/**
9
 * Special type for hash fields
10
 *
11
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
12
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
13
 * @link     http://swisscom.ch
14
 */
15
class Hash extends \ArrayObject implements \JsonSerializable
16
{
17
    /**
18
     * Specify data which should be serialized to JSON
19
     *
20
     * @return object
21
     */
22 27
    public function jsonSerialize()
23
    {
24 27
        return (object) $this->getArrayCopy();
25
    }
26
}
27