Code Duplication    Length = 12-12 lines in 2 locations

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

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

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

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