Code Duplication    Length = 10-10 lines in 2 locations

src/Type/AbstractType.php 1 location

@@ 48-57 (lines=10) @@
45
     *
46
     * @return array
47
     */
48
    public function jsonSerialize()
49
    {
50
        $array = get_object_vars($this);
51
52
        if (isset($array['attributes'])) {
53
            $array = $array['attributes'];
54
        }
55
56
        return $array;
57
    }
58
59
    /**
60
     * Convert the object into array.

src/DumpTrait.php 1 location

@@ 12-21 (lines=10) @@
9
     *
10
     * @return array
11
     */
12
    public function jsonSerialize()
13
    {
14
        $array = get_object_vars($this);
15
16
        if (isset($array['attributes'])) {
17
            $array = $array['attributes'];
18
        }
19
20
        return $array;
21
    }
22
23
    /**
24
     * Dump object to array.