Code Duplication    Length = 10-12 lines in 2 locations

src/classes/Model.php 2 locations

@@ 254-263 (lines=10) @@
251
     *
252
     * @throws Exception
253
     */
254
    public function put(array $data = array())
255
    {
256
        $this->set($data);
257
258
        $response = $this->getClient()->getResponse($this->getUrl(__FUNCTION__, array($this->getId())), $data);
259
260
        $this->set($response['data'], $response['status']);
261
262
        return $this;
263
    }
264
265
    /**
266
     * Удаление модели
@@ 283-294 (lines=12) @@
280
     *
281
     * @throws Exception
282
     */
283
    public function delete($id = null)
284
    {
285
        if (empty($this->getId())) {
286
            $this->set(array('id' => $id));
287
        }
288
289
        $response = $this->getClient()->getResponse($this->getUrl(__FUNCTION__, array($this->getId())));
290
291
        $this->set($response['data'], $response['status']);
292
293
        return $this;
294
    }
295
296
    /**
297
     * Магический Get