Passed
Push — master ( 04f1df...1c876c )
by Dev
47:54 queued 33:07
created
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.
src/Entity/PageRelatedPagesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function addRelatedPage(PageInterface $relatedPage): self
30 30
     {
31
-        if (! $this->relatedPages->contains($relatedPage)) {
31
+        if (!$this->relatedPages->contains($relatedPage)) {
32 32
             $this->relatedPages[] = $relatedPage;
33 33
         }
34 34
 
Please login to merge, or discard this patch.
src/Entity/PageI18nTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     public function addTranslation(self $translation, $recursive = true): self
46 46
     {
47
-        if (! $this->translations->contains($translation) && $this != $translation) {
47
+        if (!$this->translations->contains($translation) && $this != $translation) {
48 48
             $this->translations[] = $translation;
49 49
         }
50 50
 
Please login to merge, or discard this patch.
src/Entity/PageImageTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
     public function getImages(): Collection
83 83
     {
84
-        if (! $this->images) {
84
+        if (!$this->images) {
85 85
             $this->images = new ArrayCollection();
86 86
             foreach ($this->pageHasMedias as $p) {
87 87
                 if (null !== $p->getMedia()) {
Please login to merge, or discard this patch.
src/Entity/PageExtendedMainContentTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function validateOtherProperties(ExecutionContextInterface $context)
78 78
     {
79
-        if (! empty($this->otherProperties)) {
79
+        if (!empty($this->otherProperties)) {
80 80
             // ou utiliser yaml_parse
81 81
             try {
82 82
                 Yaml::parse($this->otherProperties);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         if (preg_match('/^get/', $method)) {
122 122
             $property = lcfirst(preg_replace('/^get/', '', $method));
123
-            if (! property_exists(static::class, $property)) {
123
+            if (!property_exists(static::class, $property)) {
124 124
                 return $this->getOtherProperty($property) ?? $this->getEmc($property);
125 125
                 // todo remove the else next release
126 126
             }
Please login to merge, or discard this patch.
src/Extension/Admin/UserAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                 'label' => 'admin.user.email.label',
45 45
             ])
46 46
             ->add('plainPassword', TextType::class, [
47
-                'required' => (! $this->getSubject() || null === $this->getSubject()->getId()),
47
+                'required' => (!$this->getSubject() || null === $this->getSubject()->getId()),
48 48
                 'label' => 'admin.user.password.label',
49 49
             ])
50 50
             ->end();
Please login to merge, or discard this patch.