Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 84-95 (lines=12) @@
81
     *
82
     * @return self
83
     */
84
    public function fromDatabaseArray(array $data)
85
    {
86
        $this->id = (int) $data['id'];
87
        $this->pageId = (int) $data['page_id'];
88
        $this->title = (string) $data['title'];
89
        $this->html = (string) $data['html'];
90
        $this->position = (int) $data['position'];
91
        $this->updatedAt = new DateTime($data['updated_at']);
92
        $this->active = (bool) $data['active'];
93
94
        return $this;
95
    }
96
97
    /**
98
     * Sets all properties from array.

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

@@ 84-95 (lines=12) @@
81
     *
82
     * @return self
83
     */
84
    public function fromDatabaseArray(array $data)
85
    {
86
        $this->id = (int) $data['id'];
87
        $this->slug = (string) $data['slug'];
88
        $this->metaKeywords = (string) $data['meta_keywords'];
89
        $this->metaDescription = (string) $data['meta_description'];
90
        $this->metaSocial = (string) $data['meta_social'];
91
        $this->updatedAt = new DateTime($data['updated_at']);
92
        $this->active = (bool) $data['active'];
93
94
        return $this;
95
    }
96
97
    /**
98
     * Sets all properties from array.