@@ -60,8 +60,7 @@ |
||
60 | 60 | $real = $request->getRequestUri(); |
61 | 61 | |
62 | 62 | $expected = 'homepage' == $page->getSlug() ? |
63 | - $this->get('piedweb.page_canonical')->generatePathForHomepage() : |
|
64 | - $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug()); |
|
63 | + $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug()); |
|
65 | 64 | |
66 | 65 | if ($real != $expected) { |
67 | 66 | return [$request->getBasePath().$expected, 301]; |
@@ -97,7 +97,7 @@ |
||
97 | 97 | |
98 | 98 | $this->eventDispatcher->addListener( |
99 | 99 | KernelEvents::TERMINATE, |
100 | - function () use ($media) { |
|
100 | + function() use ($media) { |
|
101 | 101 | $this->generateCache($media); |
102 | 102 | } |
103 | 103 | ); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $pathWebP = $this->projectDir.'/public/'.$media->getRelativeDir().'/'.$filter.'/'.$media->getSlug().'.webp'; |
119 | 119 | $webPConverterOptions = self::$webPConverterOptions; |
120 | 120 | |
121 | - $this->pool->add(function () use ($pathJpg, $pathWebP, $webPConverterOptions, $filter) { |
|
121 | + $this->pool->add(function() use ($pathJpg, $pathWebP, $webPConverterOptions, $filter) { |
|
122 | 122 | // took 46s (vs 43s) to add liip generation in async |
123 | 123 | //exec($projectDir.'/bin/console liip:imagine:cache:resolve "'.$path.'" --force --filter='.$filter |
124 | 124 | //.' >/dev/null 2>&1 &'); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $source = $this->projectDir.$media->getPath(); |
133 | 133 | //self::createWebPStatic($destination, $source); |
134 | 134 | |
135 | - $this->pool->add(function () use ($destination, $source) { |
|
135 | + $this->pool->add(function() use ($destination, $source) { |
|
136 | 136 | self::createWebPStatic($destination, $source); |
137 | 137 | }); |
138 | 138 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | protected function exists(string $name): bool |
26 | 26 | { |
27 | - return method_exists($this->getContainer()->getParameter('app.entity_user'), 'get' . $name); |
|
27 | + return method_exists($this->getContainer()->getParameter('app.entity_user'), 'get'.$name); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | protected function configureFormFields(FormMapper $formMapper): void |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function exists(string $name): bool |
66 | 66 | { |
67 | - return method_exists($this->getContainer()->getParameter('app.entity_page'), 'get' . $name); |
|
67 | + return method_exists($this->getContainer()->getParameter('app.entity_page'), 'get'.$name); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | protected function configureFormFieldsBlockDetails(FormMapper $formMapper): FormMapper |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'property' => 'title', // or any field in your media entity |
125 | 125 | 'label' => 'admin.page.relatedPage.label', |
126 | 126 | 'btn_add' => false, |
127 | - 'to_string_callback' => function ($entity) { |
|
127 | + 'to_string_callback' => function($entity) { |
|
128 | 128 | return $entity->getTitle(); |
129 | 129 | }, |
130 | 130 | ]); |
@@ -183,9 +183,9 @@ discard block |
||
183 | 183 | 'label' => 'admin.page.translations.label', |
184 | 184 | 'help' => 'admin.page.translations.help', |
185 | 185 | 'btn_add' => false, |
186 | - 'to_string_callback' => function ($entity) { |
|
186 | + 'to_string_callback' => function($entity) { |
|
187 | 187 | return $entity->getLocale() |
188 | - ? $entity->getLocale() . ' (' . $entity->getSlug() . ')' |
|
188 | + ? $entity->getLocale().' ('.$entity->getSlug().')' |
|
189 | 189 | : $entity->getSlug(); // switch for getLocale |
190 | 190 | // todo : remove it in next release and leave only get locale |
191 | 191 | // todo : add a clickable link to the other admin |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | { |
381 | 381 | $media = $page->getMainImage(); |
382 | 382 | if (null !== $media && false !== strpos($media->getMimeType(), 'image/')) { |
383 | - $fullPath = '/' . $media->getRelativeDir() . '/' . $media->getMedia(); |
|
383 | + $fullPath = '/'.$media->getRelativeDir().'/'.$media->getMedia(); |
|
384 | 384 | $thumb = $this->liipImage->getBrowserPath($fullPath, 'thumb'); |
385 | 385 | } else { |
386 | 386 | $thumb = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIzMnB4IiB2ZXJzaW9uP |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | |
45 | 45 | if ($this->mainContentIsMarkdown) { |
46 | 46 | if ($this->chapeau) { |
47 | - $this->chapeau = '{% filter markdown %}' . $this->chapeau . '{% endfilter %}'; |
|
47 | + $this->chapeau = '{% filter markdown %}'.$this->chapeau.'{% endfilter %}'; |
|
48 | 48 | } |
49 | 49 | if ($this->readableContent) { |
50 | - $this->readableContent = '{% filter markdown %}' . $this->readableContent . '{% endfilter %}'; |
|
50 | + $this->readableContent = '{% filter markdown %}'.$this->readableContent.'{% endfilter %}'; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } else { |
160 | 160 | $vars = array_keys(get_object_vars($this)); |
161 | 161 | if (in_array($method, $vars)) { |
162 | - return call_user_func_array([$this, 'get' . ucfirst($method)], $arguments); |
|
162 | + return call_user_func_array([$this, 'get'.ucfirst($method)], $arguments); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | return $this->getOtherProperty(lcfirst($method)) ?? $this->getEmc($method); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | // To remove next release |
170 | 170 | public function getEmc($name) |
171 | 171 | { |
172 | - if (preg_match('/<!--"' . $name . '"--(.*)--\/-->/sU', $this->getMainContent(), $match)) { |
|
172 | + if (preg_match('/<!--"'.$name.'"--(.*)--\/-->/sU', $this->getMainContent(), $match)) { |
|
173 | 173 | return $match[1]; |
174 | 174 | } |
175 | 175 | } |