@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | protected function configureFormFieldOtherProperties(FormMapper $formMapper): FormMapper |
103 | 103 | { |
104 | - return ! $this->exists('otherProperties') ? $formMapper : $formMapper->add('otherProperties', null, [ |
|
104 | + return !$this->exists('otherProperties') ? $formMapper : $formMapper->add('otherProperties', null, [ |
|
105 | 105 | 'required' => false, |
106 | 106 | 'attr' => [ |
107 | 107 | 'style' => 'min-height:15vh', |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | 'help_html' => true, |
144 | 144 | 'help' => 'admin.page.translations.help', |
145 | 145 | 'btn_add' => false, |
146 | - 'to_string_callback' => function ($entity) { |
|
146 | + 'to_string_callback' => function($entity) { |
|
147 | 147 | return $entity->getLocale() |
148 | 148 | ? $entity->getLocale().' ('.$entity->getSlug().')' |
149 | 149 | : $entity->getSlug(); // switch for getLocale |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | protected function getSlugHelp() |
187 | 187 | { |
188 | - $url = ! $this->getSubject() ? null |
|
188 | + $url = !$this->getSubject() ? null |
|
189 | 189 | : $this->pageCanonicalService->generatePathForPage($this->getSubject()->getSlug()); |
190 | 190 | |
191 | 191 | return $this->getSubject() && $this->getSubject()->getSlug() |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | protected function getMedialHelp($media) |
21 | 21 | { |
22 | - if (! ($media && $media->getMedia() && false !== strpos($media->getMimeType(), 'image/'))) { |
|
22 | + if (!($media && $media->getMedia() && false !== strpos($media->getMimeType(), 'image/'))) { |
|
23 | 23 | return null; |
24 | 24 | } |
25 | 25 | |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | 'required' => false, |
54 | 54 | 'btn_delete' => false, |
55 | 55 | 'btn_edit' => false, |
56 | - 'btn_add' => (! $media) ? ' ' : false, |
|
57 | - 'btn_list' => (! $media) ? ' ' : false, |
|
56 | + 'btn_add' => (!$media) ? ' ' : false, |
|
57 | + 'btn_list' => (!$media) ? ' ' : false, |
|
58 | 58 | 'sonata_help' => $this->getMedialHelp($media), |
59 | 59 | ] |
60 | 60 | ) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | if (null !== $encodedPath) { |
32 | 32 | $element = $this->getElements()->getOneByEncodedPath($encodedPath); |
33 | - if (! $element) { |
|
33 | + if (!$element) { |
|
34 | 34 | throw $this->createNotFoundException('This element does not exist...'); |
35 | 35 | } |
36 | 36 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $process = new Process(['rm', '-rf', $twigCacheFolder]); |
46 | 46 | $process->run(); |
47 | 47 | |
48 | - if (! $process->isSuccessful()) { |
|
48 | + if (!$process->isSuccessful()) { |
|
49 | 49 | throw new ProcessFailedException($process); |
50 | 50 | } |
51 | 51 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | |
68 | 68 | public function send() |
69 | 69 | { |
70 | - if (! $this->emailTo) { |
|
70 | + if (!$this->emailTo) { |
|
71 | 71 | return; |
72 | 72 | } |
73 | 73 |
@@ -167,11 +167,11 @@ discard block |
||
167 | 167 | { |
168 | 168 | foreach ($linkedDocs as $uri) { |
169 | 169 | ++$this->linksCheckedCounter; |
170 | - if (! \is_string($uri)) { |
|
170 | + if (!\is_string($uri)) { |
|
171 | 171 | continue; |
172 | 172 | } |
173 | - if (('/' == $uri[0] && ! $this->uriExist($uri)) |
|
174 | - || (0 === strpos($uri, 'http') && ! $this->urlExist($uri))) { |
|
173 | + if (('/' == $uri[0] && !$this->uriExist($uri)) |
|
174 | + || (0 === strpos($uri, 'http') && !$this->urlExist($uri))) { |
|
175 | 175 | $this->addError('<code>'.$uri.'</code> introuvable'); |
176 | 176 | } |
177 | 177 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | $this->everChecked[$slug] = ( |
218 | 218 | null === $page |
219 | - && ! file_exists($this->webDir.'/'.$slug) |
|
219 | + && !file_exists($this->webDir.'/'.$slug) |
|
220 | 220 | && 'feed.xml' !== $slug |
221 | 221 | ) ? false : true; |
222 | 222 |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->apps = $this->params->get('pwc.apps'); |
132 | 132 | $this->parser = HtmlCompressor::construct(); |
133 | 133 | |
134 | - if (! method_exists($this->filesystem, 'dumpFile')) { |
|
134 | + if (!method_exists($this->filesystem, 'dumpFile')) { |
|
135 | 135 | throw new \RuntimeException('Method dumpFile() is not available. Upgrade your Filesystem.'); |
136 | 136 | } |
137 | 137 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | public function generateAll($filter = null) |
143 | 143 | { |
144 | 144 | foreach ($this->apps as $app) { |
145 | - if ($filter && ! \in_array($filter, $app->getHost())) { |
|
145 | + if ($filter && !\in_array($filter, $app->getHost())) { |
|
146 | 146 | continue; |
147 | 147 | } |
148 | 148 | $this->generate($app, $this->mustGetPagesWithoutHost); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | if ('.' == $entry || '..' == $entry) { |
250 | 250 | continue; |
251 | 251 | } |
252 | - if (! \in_array($entry, $this->robotsFiles) && ! \in_array($entry, $this->dontCopy)) { |
|
252 | + if (!\in_array($entry, $this->robotsFiles) && !\in_array($entry, $this->dontCopy)) { |
|
253 | 253 | //$this->symlink( |
254 | 254 | if (true === $symlink) { |
255 | 255 | $this->filesystem->symlink( |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | { |
275 | 275 | $symlink = $this->mustSymlink(); |
276 | 276 | |
277 | - if (! file_exists($this->app->getStaticDir().'/download')) { |
|
277 | + if (!file_exists($this->app->getStaticDir().'/download')) { |
|
278 | 278 | $this->filesystem->mkdir($this->app->getStaticDir().'/download/'); |
279 | 279 | $this->filesystem->mkdir($this->app->getStaticDir().'/download/media'); |
280 | 280 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | continue; |
286 | 286 | } |
287 | 287 | // if the file is an image, it's ever exist (maybe it's slow to check every files) |
288 | - if (! file_exists($this->webDir.'/media/default/'.$entry)) { |
|
288 | + if (!file_exists($this->webDir.'/media/default/'.$entry)) { |
|
289 | 289 | if (true === $symlink) { |
290 | 290 | $this->filesystem->symlink( |
291 | 291 | '../../../media/'.$entry, |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | public function validate($value, Constraint $constraint) |
22 | 22 | { |
23 | - if (! $constraint instanceof PageRendering) { |
|
23 | + if (!$constraint instanceof PageRendering) { |
|
24 | 24 | throw new UnexpectedTypeException($constraint, PageRendering::class); |
25 | 25 | } |
26 | 26 |