@@ -28,7 +28,7 @@ |
||
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 |
@@ -44,7 +44,7 @@ |
||
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 |
@@ -81,7 +81,7 @@ |
||
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()) { |
@@ -76,7 +76,7 @@ discard block |
||
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 |
||
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 | } |
@@ -44,7 +44,7 @@ |
||
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(); |
@@ -114,7 +114,7 @@ |
||
114 | 114 | { |
115 | 115 | $relatedPages = $this->getRelatedPages(); |
116 | 116 | |
117 | - if (! empty($relatedPages['content']) |
|
117 | + if (!empty($relatedPages['content']) |
|
118 | 118 | || $relatedPages['gallery']->count() > 0 |
119 | 119 | || $relatedPages['mainImage']->count() > 0 |
120 | 120 | ) { |
@@ -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 | } |