Code Duplication    Length = 14-14 lines in 2 locations

generator/templates/static/Graph.php 1 location

@@ 80-93 (lines=14) @@
77
        return $this;
78
    }
79
80
    public function toArray(): array
81
    {
82
        $properties = $this->getProperties();
83
        foreach ($this->hidden as $type => $hide) {
84
            if ($hide) {
85
                unset($properties[$type]);
86
            }
87
        }
88
89
        return [
90
            '@context' => $this->getContext(),
91
            '@graph' => $this->serializeProperty(array_values($properties)),
92
        ];
93
    }
94
}
95

src/Graph.php 1 location

@@ 77-90 (lines=14) @@
74
        return $this;
75
    }
76
77
    public function toArray(): array
78
    {
79
        $properties = $this->getProperties();
80
        foreach ($this->hidden as $type => $hide) {
81
            if ($hide) {
82
                unset($properties[$type]);
83
            }
84
        }
85
86
        return [
87
            '@context' => $this->getContext(),
88
            '@graph' => $this->serializeProperty(array_values($properties)),
89
        ];
90
    }
91
}
92