Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 64-75 (lines=12) @@
61
     *
62
     * @return array
63
     */
64
    public function toDatabaseArray()
65
    {
66
        return [
67
            'id' => $this->id,
68
            'page_id' => $this->pageId,
69
            'title' => $this->title,
70
            'html' => $this->html,
71
            'position' => (int) $this->position,
72
            'updated_at' => $this->updatedAt->format(DateTime::ATOM),
73
            'active' => $this->active
74
        ];
75
    }
76
77
    /**
78
     * Prepares database array from properties.

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

@@ 64-75 (lines=12) @@
61
     *
62
     * @return array
63
     */
64
    public function toDatabaseArray()
65
    {
66
        return [
67
            'id' => $this->id,
68
            'slug' => $this->slug,
69
            'meta_keywords' => $this->metaKeywords,
70
            'meta_description' => $this->metaDescription,
71
            'meta_social' => $this->metaSocial,
72
            'updated_at' => $this->updatedAt->format(DateTime::ATOM),
73
            'active' => $this->active
74
        ];
75
    }
76
77
    /**
78
     * Prepares database array from properties.