Code Duplication    Length = 14-14 lines in 2 locations

app/Controller/ApiController.php 2 locations

@@ 371-384 (lines=14) @@
368
		return;
369
	}
370
371
	public function inactiveClient($id_cliente) 
372
	{
373
		$dados['ativo'] = 0;
374
		
375
		$this->Cliente->id = $id_cliente;
376
377
		if ($this->Cliente->save($dados)) {
378
			$this->response->body('{"message": "success", "result":'.json_encode($dados).'}');
379
			return;
380
		} else {
381
			$this->response->body('{"message": "error"}');
382
			return;
383
		}	
384
	}
385
386
387
	public function postParent($dados)
@@ 448-461 (lines=14) @@
445
		return;
446
	}
447
448
	public function inactiveParent($id_parente) 
449
	{
450
		$dados['ativo'] = 0;
451
		
452
		$this->Parente->id = $id_parente;
453
454
		if ($this->Parente->save($dados)) {
455
			$this->response->body('{"message": "success", "result":'.json_encode($dados).'}');
456
			return;
457
		} else {
458
			$this->response->body('{"message": "error"}');
459
			return;
460
		}	
461
	}
462
463
	public function postConsulta($dados)
464
	{