From 38d9832b720014c2abceffb99c070fd9fbd268df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 31 Mar 2015 21:30:34 +0200 Subject: [PATCH 1/2] Fix syntax - namespace should be first declaration https://insight.sensiolabs.com/projects/6031863a-10a3-44d5-891d-ac6dac2ed65a/analyses/1?status=violations#239680027 --- Entity/Report.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Entity/Report.php b/Entity/Report.php index 117956cd1..04a47a150 100644 --- a/Entity/Report.php +++ b/Entity/Report.php @@ -1,9 +1,5 @@ @@ -24,6 +20,10 @@ use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; namespace Chill\ReportBundle\Entity; +use Chill\MainBundle\Entity\User; +use Chill\PersonBundle\Entity\Person; +use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; + /** * Report */ @@ -218,4 +218,4 @@ class Report { return $this->cFGroup; } -} \ No newline at end of file +} From ee205d33863d7c0d19af53e8d7f6a5356e68ca4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 31 Mar 2015 21:32:03 +0200 Subject: [PATCH 2/2] set namespace/use declaration on exception highlighted by https://insight.sensiolabs.com/projects/6031863a-10a3-44d5-891d-ac6dac2ed65a/analyses/1?status=violations#239680028 --- Controller/ReportController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/ReportController.php b/Controller/ReportController.php index a01e005ee..aab1b341a 100644 --- a/Controller/ReportController.php +++ b/Controller/ReportController.php @@ -332,7 +332,7 @@ class ReportController extends Controller } if(intval($person_id) !== intval($report->getPerson()->getId())) { - throw new Exception( + throw new \Exception( $this->get('translator')->trans('This is not the report of the person.'), 1); }