Code Duplication    Length = 14-14 lines in 2 locations

app/Controller/ApiController.php 2 locations

@@ 320-333 (lines=14) @@
317
		return;
318
	}
319
320
	public function inactiveClient($id_cliente) 
321
	{
322
		$dados['ativo'] = 0;
323
		
324
		$this->Cliente->id = $id_cliente;
325
326
		if ($this->Cliente->save($dados)) {
327
			$this->response->body('{"message": "success", "result":'.json_encode($dados).'}');
328
			return;
329
		} else {
330
			$this->response->body('{"message": "error"}');
331
			return;
332
		}	
333
	}
334
335
336
	public function postParent($dados)
@@ 397-410 (lines=14) @@
394
		return;
395
	}
396
397
	public function inactiveParent($id_parente) 
398
	{
399
		$dados['ativo'] = 0;
400
		
401
		$this->Parente->id = $id_parente;
402
403
		if ($this->Parente->save($dados)) {
404
			$this->response->body('{"message": "success", "result":'.json_encode($dados).'}');
405
			return;
406
		} else {
407
			$this->response->body('{"message": "error"}');
408
			return;
409
		}	
410
	}
411
412
	/**
413
	* Valida o usuario que está tentando usar a api