Code Duplication    Length = 13-13 lines in 2 locations

htdocs/src/Oc/Page/BlockRepository.php 1 location

@@ 186-198 (lines=13) @@
183
     *
184
     * @return BlockEntity
185
     */
186
    public function getEntityFromDatabaseArray(array $data)
187
    {
188
        $entity = new BlockEntity();
189
        $entity->id = (int) $data['id'];
190
        $entity->pageId = (int) $data['page_id'];
191
        $entity->title = (string) $data['title'];
192
        $entity->html = (string) $data['html'];
193
        $entity->position = (int) $data['position'];
194
        $entity->updatedAt = new DateTime($data['updated_at']);
195
        $entity->active = (bool) $data['active'];
196
197
        return $entity;
198
    }
199
}
200

htdocs/src/Oc/Page/PageRepository.php 1 location

@@ 184-196 (lines=13) @@
181
     *
182
     * @return PageEntity
183
     */
184
    public function getEntityFromDatabaseArray(array $data)
185
    {
186
        $entity = new PageEntity();
187
        $entity->id = (int) $data['id'];
188
        $entity->slug = (string) $data['slug'];
189
        $entity->metaKeywords = (string) $data['meta_keywords'];
190
        $entity->metaDescription = (string) $data['meta_description'];
191
        $entity->metaSocial = (string) $data['meta_social'];
192
        $entity->updatedAt = new DateTime($data['updated_at']);
193
        $entity->active = (bool) $data['active'];
194
195
        return $entity;
196
    }
197
}
198