Code Duplication    Length = 11-11 lines in 2 locations

src/Database/ActiveRecordModel.php 2 locations

@@ 128-138 (lines=11) @@
125
     *
126
     * @return this
127
     */
128
    public function findWhere($where, $value)
129
    {
130
        $this->checkDb();
131
        $params = is_array($value) ? $value : [$value];
132
        return $this->db->connect()
133
                        ->select()
134
                        ->from($this->tableName)
135
                        ->where($where)
136
                        ->execute($params)
137
                        ->fetchInto($this);
138
    }
139
140
141
@@ 173-183 (lines=11) @@
170
     *
171
     * @return array of object of this class
172
     */
173
    public function findAllWhere($where, $value)
174
    {
175
        $this->checkDb();
176
        $params = is_array($value) ? $value : [$value];
177
        return $this->db->connect()
178
                        ->select()
179
                        ->from($this->tableName)
180
                        ->where($where)
181
                        ->execute($params)
182
                        ->fetchAllClass(get_class($this));
183
    }
184
185
186