Passed
Branch master (cf86cf)
by Dev
20:07
created
src/Admin/PageAdmin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
             'required' => false,
132 132
              'multiple' => true,
133 133
              'class' => Faq::class,
134
-             'property' => 'question',   // or any field in your media entity
134
+             'property' => 'question', // or any field in your media entity
135 135
              'label' => 'admin.page.faq.label',
136 136
              'btn_add' => true,
137
-             'to_string_callback' => function ($entity, $property) {
137
+             'to_string_callback' => function($entity, $property) {
138 138
                  return $entity->getQuestion();
139 139
              },
140 140
          ]);
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
             'required' => false,
146 146
              'multiple' => true,
147 147
              'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'),
148
-             'property' => 'title',   // or any field in your media entity
148
+             'property' => 'title', // or any field in your media entity
149 149
              'label' => 'admin.page.relatedPage.label',
150 150
              'btn_add' => false,
151
-             'to_string_callback' => function ($entity, $property) {
151
+             'to_string_callback' => function($entity, $property) {
152 152
                  return $entity->getTitle();
153 153
              },
154 154
          ]);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
              'property' => 'media',
163 163
              'label' => 'admin.page.images.label',
164 164
              'btn_add' => true,
165
-             'to_string_callback' => function ($entity, $property) {
165
+             'to_string_callback' => function($entity, $property) {
166 166
                  return $entity->getName();
167 167
              //'<img src="'.$this->getConfigurationPool()->getContainer()->getParameter('img_dir').'/'.$entity->getImage().'" style="max-width:200px; max-height: 200px;">';
168 168
              },
Please login to merge, or discard this patch.
src/Controller/PageController.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
         $defaultLocale = $this->container->getParameter('locale');
56 56
 
57 57
         $expected = 'homepage' == $page->getSlug() && $defaultLocale == $request->getLocale() ?
58
-            $this->get('router')->generate('piedweb_cms_homepage') :
59
-            $this->get('router')->generate('piedweb_cms_page', ['slug' => $page->getRealSlug()])
58
+            $this->get('router')->generate('piedweb_cms_homepage') : $this->get('router')->generate('piedweb_cms_page', ['slug' => $page->getRealSlug()])
60 59
         ;
61 60
 
62 61
         if ($real != $expected) {
Please login to merge, or discard this patch.