Passed
Push — master ( a3cc07...eb52df )
by Nashwan
03:50
created
src/EBloodBank/Controllers/AddCity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function __invoke()
34 34
     {
35
-        if (! $this->hasAuthenticatedUser() || ! $this->getAcl()->isUserAllowed($this->getAuthenticatedUser(), 'City', 'add')) {
35
+        if (!$this->hasAuthenticatedUser() || !$this->getAcl()->isUserAllowed($this->getAuthenticatedUser(), 'City', 'add')) {
36 36
             $this->viewFactory->displayView('error-403');
37 37
             return;
38 38
         }
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
     protected function doSubmitAction()
81 81
     {
82 82
         try {
83
-            if (! $this->hasAuthenticatedUser() || ! $this->getAcl()->isUserAllowed($this->getAuthenticatedUser(), 'City', 'add')) {
83
+            if (!$this->hasAuthenticatedUser() || !$this->getAcl()->isUserAllowed($this->getAuthenticatedUser(), 'City', 'add')) {
84 84
                 return;
85 85
             }
86 86
 
87 87
             $actionToken = filter_input(INPUT_POST, 'token');
88 88
             $sessionToken = $this->getSession()->getCsrfToken();
89 89
 
90
-            if (! $actionToken || ! $sessionToken->isValid($actionToken)) {
90
+            if (!$actionToken || !$sessionToken->isValid($actionToken)) {
91 91
                 return;
92 92
             }
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
             $duplicateCity = $this->getCityRepository()->findOneBy(['name' => $city->get('name')]);
100 100
 
101
-            if (! empty($duplicateCity)) {
101
+            if (!empty($duplicateCity)) {
102 102
                 throw new InvalidArgumentException(__('Please enter a unique city name.'));
103 103
             }
104 104
 
Please login to merge, or discard this patch.