Andrej Hudec 10 years ago
parent
commit
adf24fc74f

+ 5 - 6
Command/GenerateAdminCommand.php

@@ -258,7 +258,7 @@ class GenerateAdminCommand extends ContainerAwareCommand
 
     /**
      * @param OutputInterface $output
-     * @param string $message
+     * @param string          $message
      */
     private function writeError(OutputInterface $output, $message)
     {
@@ -266,11 +266,11 @@ class GenerateAdminCommand extends ContainerAwareCommand
     }
 
     /**
-     * @param InputInterface $input
+     * @param InputInterface  $input
      * @param OutputInterface $output
-     * @param string $questionText
-     * @param mixed $default
-     * @param callable $validator
+     * @param string          $questionText
+     * @param mixed           $default
+     * @param callable        $validator
      *
      * @return mixed
      */
@@ -280,7 +280,6 @@ class GenerateAdminCommand extends ContainerAwareCommand
 
         if ($questionHelper instanceof DialogHelper) {
             // @todo remove this BC code for SensioGeneratorBundle 2.3/2.4 after dropping  support for Symfony 2.3
-
             return $questionHelper->askAndValidate($output, $questionHelper->getQuestion($questionText, $default), $validator, false, $default);
         }
 

+ 2 - 2
Controller/CoreController.php

@@ -112,8 +112,8 @@ class CoreController extends Controller
 
             $response = new JsonResponse(array(
                 'results' => $results,
-                'page'    => $pager ? (int)$pager->getPage() : false,
-                'total'   => $pager ? (int)$pager->getNbResults() : false
+                'page'    => $pager ? (int) $pager->getPage() : false,
+                'total'   => $pager ? (int) $pager->getNbResults() : false
             ));
             $response->setPrivate();
 

+ 2 - 1
Datagrid/Datagrid.php

@@ -245,7 +245,8 @@ class Datagrid implements DatagridInterface
     /**
      * {@inheritdoc}
      */
-    public function hasDisplayableFilters() {
+    public function hasDisplayableFilters()
+    {
         foreach ($this->filters as $name => $filter) {
             if ($filter->isActive() && $filter->getOption('show_filter', true)) {
                 return true;

+ 0 - 1
Datagrid/DatagridMapper.php

@@ -12,7 +12,6 @@ namespace Sonata\AdminBundle\Datagrid;
 
 use Sonata\AdminBundle\Admin\AdminInterface;
 use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
-use Sonata\AdminBundle\Datagrid\DatagridInterface;
 use Sonata\AdminBundle\Builder\DatagridBuilderInterface;
 use Sonata\AdminBundle\Mapper\BaseMapper;
 

+ 0 - 1
Datagrid/Pager.php

@@ -44,7 +44,6 @@ abstract class Pager implements \Iterator, \Countable, \Serializable, PagerInter
         $this->setMaxPerPage($maxPerPage);
     }
 
-
     /**
      * Returns the current pager's max link.
      *

+ 0 - 1
DependencyInjection/AbstractSonataAdminExtension.php

@@ -12,7 +12,6 @@
 namespace Sonata\AdminBundle\DependencyInjection;
 
 use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
 use Symfony\Component\HttpKernel\DependencyInjection\Extension;
 
 /**

+ 3 - 3
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -172,9 +172,9 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
     /**
      * Apply the default values required by the AdminInterface to the Admin service definition
      *
-     * @param  ContainerBuilder $container
-     * @param  string           $serviceId
-     * @param  array            $attributes
+     * @param ContainerBuilder $container
+     * @param string           $serviceId
+     * @param array            $attributes
      *
      * @return Definition
      */

+ 1 - 1
DependencyInjection/Configuration.php

@@ -52,7 +52,7 @@ class Configuration implements ConfigurationInterface
                                 ->performNoDeepMerging()
                                 ->beforeNormalization()
                                     ->ifString()
-                                    ->then(function($v){ return array($v); })
+                                    ->then(function ($v) { return array($v); })
                                 ->end()
                                 ->prototype('scalar')->end()
                             ->end()

+ 1 - 1
Resources/config/form_types.xml

@@ -34,7 +34,7 @@
         <service id="sonata.admin.form.type.collection" class="Sonata\AdminBundle\Form\Type\CollectionType">
             <tag name="form.type" alias="sonata_type_native_collection" />
         </service>
-        
+
         <service id="sonata.admin.doctrine_orm.form.type.choice_field_mask" class="Sonata\AdminBundle\Form\Type\ChoiceFieldMaskType">
             <tag name="form.type" alias="sonata_type_choice_field_mask" />
         </service>

+ 1 - 1
Resources/views/Block/block_rss_dashboard.html.twig

@@ -28,4 +28,4 @@ file that was distributed with this source code.
             {% endfor %}
         </div>
     </div>
-{% endblock %}
+{% endblock %}

+ 1 - 1
Resources/views/Button/acl_button.html.twig

@@ -13,4 +13,4 @@ file that was distributed with this source code.
     <a class="sonata-action-element" href="{{ admin.generateObjectUrl('acl', object) }}">
         <i class="fa fa-users"></i>
         {{ 'link_action_acl'|trans({}, 'SonataAdminBundle') }}</a>
-{% endif %}
+{% endif %}

+ 1 - 1
Resources/views/Button/edit_button.html.twig

@@ -13,4 +13,4 @@ file that was distributed with this source code.
     <a class="sonata-action-element" href="{{ admin.generateObjectUrl('edit', object) }}">
         <i class="fa fa-edit"></i>
         {{ 'link_action_edit'|trans({}, 'SonataAdminBundle') }}</a>
-{% endif %}
+{% endif %}

+ 1 - 1
Resources/views/Button/history_button.html.twig

@@ -13,4 +13,4 @@ file that was distributed with this source code.
     <a class="sonata-action-element" href="{{ admin.generateObjectUrl('history', object) }}">
         <i class="fa fa-archive"></i>
         {{ 'link_action_history'|trans({}, 'SonataAdminBundle') }}</a>
-{% endif %}
+{% endif %}

+ 1 - 1
Resources/views/Button/list_button.html.twig

@@ -13,4 +13,4 @@ file that was distributed with this source code.
     <a class="sonata-action-element" href="{{ admin.generateUrl('list') }}">
         <i class="fa fa-list"></i>
         {{ 'link_action_list'|trans({}, 'SonataAdminBundle') }}</a>
-{% endif %}
+{% endif %}

+ 1 - 1
Resources/views/Button/show_button.html.twig

@@ -13,4 +13,4 @@ file that was distributed with this source code.
     <a class="sonata-action-element" href="{{ admin.generateObjectUrl('show', object) }}">
         <i class="fa fa-eye"></i>
         {{ 'link_action_show'|trans({}, 'SonataAdminBundle') }}</a>
-{% endif %}
+{% endif %}

+ 1 - 1
Resources/views/CRUD/base_list_flat_inner_row.html.twig

@@ -23,4 +23,4 @@ file that was distributed with this source code.
     <td class="sonata-ba-list-field sonata-ba-list-field-_action" objectId="{{ admin.id(object) }}">
         {{ object|render_list_element(admin.list['_action']) }}
     </td>
-{% endif %}
+{% endif %}

+ 1 - 1
Resources/views/CRUD/base_list_inner_row.html.twig

@@ -17,4 +17,4 @@ file that was distributed with this source code.
     {% else %}
         {{ object|render_list_element(field_description) }}
     {% endif %}
-{% endfor %}
+{% endfor %}

+ 1 - 1
Resources/views/CRUD/list__action.html.twig

@@ -17,4 +17,4 @@ file that was distributed with this source code.
             {% include actions.template %}
         {% endfor %}
     </div>
-{% endblock %}
+{% endblock %}

+ 1 - 1
Resources/views/CRUD/list_boolean.html.twig

@@ -31,4 +31,4 @@ file that was distributed with this source code.
             <span class="label label-danger">{%- trans from 'SonataAdminBundle' %}label_type_no{% endtrans -%}</span>
         {% endif %}
     {% endspaceless %}
-{% endblock %}
+{% endblock %}

+ 1 - 1
Resources/views/CRUD/list_outer_rows_mosaic.html.twig

@@ -79,4 +79,4 @@ This template can be customized to match your needs. You should only extends the
             {% endfor %}
         </div>
     </td>
-</tr>
+</tr>

+ 1 - 1
Resources/views/CRUD/tree.html.twig

@@ -75,4 +75,4 @@ file that was distributed with this source code.
             {{ tree.navigate_child(collection, admin, true) }}
         </div>
     </div>
-{% endblock %}
+{% endblock %}

+ 1 - 1
Resources/views/Core/create_button.html.twig

@@ -12,4 +12,4 @@ file that was distributed with this source code.
 {# DEPRECATED #}
 {# This file is kept here for backward compatibility - Rather use SonataAdminBundle:Button:create_button.html.twig #}
 
-{% extends 'SonataAdminBundle:Button:create_button.html.twig' %}
+{% extends 'SonataAdminBundle:Button:create_button.html.twig' %}

+ 1 - 1
Resources/views/Core/tab_menu_template.html.twig

@@ -115,4 +115,4 @@
     </a>
 {% endblock %}
 
-{% block label %}{{ item.label|trans }}{% endblock %}
+{% block label %}{{ item.label|trans }}{% endblock %}

+ 1 - 1
Resources/views/empty_layout.html.twig

@@ -32,4 +32,4 @@ file that was distributed with this source code.
     {% block sonata_page_content %}
         {{ parent() }}
     {% endblock %}
-{% endblock %}
+{% endblock %}

+ 1 - 1
Tests/Fixtures/Command/classes.php

@@ -26,4 +26,4 @@ public function barAction()
 {
 }
 }
-}
+}

+ 1 - 0
Validator/ErrorElement.php

@@ -161,6 +161,7 @@ class ErrorElement
         }
 
         $propertyAccessor = PropertyAccess::createPropertyAccessor();
+
         return $propertyAccessor->getValue($this->subject, $this->getCurrentPropertyPath());
     }