Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 162-173 (lines=12) @@
159
     *
160
     * @return array
161
     */
162
    public function getDatabaseArrayFromEntity(BlockEntity $entity)
163
    {
164
        return [
165
            'id' => $entity->id,
166
            'page_id' => $entity->pageId,
167
            'title' => $entity->title,
168
            'html' => $entity->html,
169
            'position' => (int) $entity->position,
170
            'updated_at' => $entity->updatedAt->format(DateTime::ATOM),
171
            'active' => $entity->active
172
        ];
173
    }
174
175
    /**
176
     * Prepares database array from properties.

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

@@ 160-171 (lines=12) @@
157
     *
158
     * @return array
159
     */
160
    public function getDatabaseArrayFromEntity(PageEntity $entity)
161
    {
162
        return [
163
            'id' => $entity->id,
164
            'slug' => $entity->slug,
165
            'meta_keywords' => $entity->metaKeywords,
166
            'meta_description' => $entity->metaDescription,
167
            'meta_social' => $entity->metaSocial,
168
            'updated_at' => $entity->updatedAt->format(DateTime::ATOM),
169
            'active' => $entity->active
170
        ];
171
    }
172
173
    /**
174
     * Prepares database array from properties.