fix: Simplify statements and fix syntax.

To make sure that PHP CS Fixer do not fails.
This commit is contained in:
Pol Dellaiera
2021-04-26 13:06:40 +02:00
parent c5b21f360c
commit 09ed671734
2 changed files with 4 additions and 5 deletions

View File

@@ -152,7 +152,7 @@ class SingleTaskController extends AbstractController
$em = $this->getDoctrine()->getManager();
$task = $em->getRepository(SingleTask::class)->find($id);
if (!is_null($task->getPerson() === !null)) {
if ($task->getPerson() !== null) {
$personId = $task->getPerson()->getId();
if ($personId === null) {
@@ -206,7 +206,7 @@ class SingleTaskController extends AbstractController
$em = $this->getDoctrine()->getManager();
$task = $em->getRepository(SingleTask::class)->find($id);
if (!is_null($task->getPerson() === !null)) {
if ($task->getPerson() !== null) {
$personId = $task->getPerson()->getId();
if ($personId === null) {
return new Response("You must provide a person_id", Response::HTTP_BAD_REQUEST);
@@ -303,8 +303,7 @@ class SingleTaskController extends AbstractController
throw $this->createNotFoundException('Unable to find Task entity.');
}
if (!is_null($task->getPerson() === !null)) {
if ($task->getPerson() !== null) {
$personId = $task->getPerson()->getId();
if ($personId === null) {
return new Response("You must provide a person_id", Response::HTTP_BAD_REQUEST);