Code Duplication    Length = 12-12 lines in 2 locations

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

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

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

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