Code Duplication    Length = 12-12 lines in 2 locations

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

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

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

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