Passed
Push — master ( 04f1df...1c876c )
by Dev
47:54 queued 33:07
created
src/Security/UserAuthenticator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@
 block discarded – undo
65 65
     public function getUser($credentials, UserProviderInterface $userProvider)
66 66
     {
67 67
         $token = new CsrfToken('authenticate', $credentials['csrf_token']);
68
-        if (! $this->csrfTokenManager->isTokenValid($token)) {
68
+        if (!$this->csrfTokenManager->isTokenValid($token)) {
69 69
             throw new InvalidCsrfTokenException();
70 70
         }
71 71
 
72 72
         $user = $this->entityManager->getRepository(User::class)->findOneBy(['email' => $credentials['email']]);
73 73
 
74
-        if (! $user) {
74
+        if (!$user) {
75 75
             // fail authentication with a custom error
76 76
             throw new CustomUserMessageAuthenticationException('security.login.email_not_found');
77 77
         }
Please login to merge, or discard this patch.
src/DependencyInjection/PiedWebCMSExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     {
60 60
         $result = [];
61 61
         foreach ($apps as $app) {
62
-            if (! $app['template']) {
62
+            if (!$app['template']) {
63 63
                 $app['template'] = $pwcTemplate;
64 64
             }
65 65
             $result[$app['hosts'][0]] = $app;
Please login to merge, or discard this patch.
src/EventListener/PageListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     public function preRemove(Page $page)
40 40
     {
41 41
         // method_exists($page, 'getChildrenPages') &&
42
-        if (! $page->getChildrenPages()->isEmpty()) {
42
+        if (!$page->getChildrenPages()->isEmpty()) {
43 43
             foreach ($page->getChildrenPages() as $cPage) {
44 44
                 $cPage->setParentPage(null);
45 45
             }
Please login to merge, or discard this patch.
src/Service/PageMainContentManager/Raw.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         preg_match_all('/(?:!\[(.*?)\]\((.*?)\))/', $body, $matches);
147 147
 
148
-        if (! isset($matches[1])) {
148
+        if (!isset($matches[1])) {
149 149
             return;
150 150
         }
151 151
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     protected function render($string)
169 169
     {
170
-        if (! $string) {
170
+        if (!$string) {
171 171
             return '';
172 172
         }
173 173
 
Please login to merge, or discard this patch.
src/Service/WebPConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $defaultConverterOptions = [];
66 66
 
67 67
         foreach ($this->options2->getOptionsMap() as $id => $option) {
68
-            if ($option->isValueExplicitlySet() && ! ($option instanceof GhostOption)) {
68
+            if ($option->isValueExplicitlySet() && !($option instanceof GhostOption)) {
69 69
                 //$this->logLn('hi' . $id);
70 70
                 $defaultConverterOptions[$id] = $option->getValue();
71 71
             }
Please login to merge, or discard this patch.
src/Utils/LastTime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function get($default = false)
37 37
     {
38
-        if (! file_exists($this->filePath)) {
38
+        if (!file_exists($this->filePath)) {
39 39
             return false === $default ? false : new DateTime($default);
40 40
         }
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function setWasRun($datetime = 'now', $setIfNotExist = true): void
46 46
     {
47
-        if (! file_exists($this->filePath)) {
47
+        if (!file_exists($this->filePath)) {
48 48
             if (false === $setIfNotExist) {
49 49
                 return;
50 50
             }
Please login to merge, or discard this patch.
src/Controller/MediaController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         $projectDir = $this->get('kernel')->getProjectDir();
16 16
         $pathToFile = $projectDir.'/media/'.substr(str_replace('..', '', $path), \strlen('media/'));
17 17
 
18
-        if (! file_exists($pathToFile)) {
18
+        if (!file_exists($pathToFile)) {
19 19
             throw $this->createNotFoundException('The media does not exist...');
20 20
         }
21 21
 
Please login to merge, or discard this patch.
src/Controller/PageController.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $this->app->switchCurrentApp($host);
121 121
         $pages = $this->getPages(null, $request);
122 122
 
123
-        if (! $pages) {
123
+        if (!$pages) {
124 124
             throw $this->createNotFoundException();
125 125
         }
126 126
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             }
172 172
         }
173 173
 
174
-        if (! $page->getLocale()) { // avoid bc break
174
+        if (!$page->getLocale()) { // avoid bc break
175 175
             $page->setLocale($this->params->get('pwc.locale'));
176 176
         }
177 177
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $this->get('translator')->setLocale($page->getLocale());
180 180
 
181 181
         // Check if page is public
182
-        if ($page->getCreatedAt() > new \DateTimeImmutable() && ! $this->isGranted('ROLE_EDITOR')) {
182
+        if ($page->getCreatedAt() > new \DateTimeImmutable() && !$this->isGranted('ROLE_EDITOR')) {
183 183
             if ($throwException) {
184 184
                 throw $this->createNotFoundException();
185 185
             } else {
@@ -200,8 +200,7 @@  discard block
 block discarded – undo
200 200
         $real = $request->getRequestUri();
201 201
 
202 202
         $expected = 'homepage' == $page->getSlug() ?
203
-            $this->get('piedweb.page_canonical')->generatePathForHomepage() :
204
-            $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
203
+            $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
205 204
 
206 205
         if ($real != $expected) {
207 206
             return [$request->getBasePath().$expected, 301];
Please login to merge, or discard this patch.
src/Entity/MediaTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function setSlugForce($slug)
133 133
     {
134
-        if (! $slug) {
134
+        if (!$slug) {
135 135
             return $this;
136 136
         }
137 137
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function setSlug($slug)
166 166
     {
167
-        if (! $slug) {
167
+        if (!$slug) {
168 168
             return $this;
169 169
         }
170 170
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
     public function setMedia($media): self
239 239
     {
240
-        if (! $media) {
240
+        if (!$media) {
241 241
             return $this;
242 242
         }
243 243
 
Please login to merge, or discard this patch.