Thomas Rabaix 14 سال پیش
والد
کامیت
960104e28e

+ 1 - 1
Builder/ORM/FormContractor.php

@@ -252,7 +252,7 @@ class FormContractor implements FormContractorInterface
     {
         $fieldDescription->mergeOptions($options);
 
-        if($admin->getModelManager()->hasMetadata($admin->getClass()))
+        if ($admin->getModelManager()->hasMetadata($admin->getClass()))
         {
             $metadata = $admin->getModelManager()->getMetadata($admin->getClass());
 

+ 1 - 1
Builder/ORM/ListBuilder.php

@@ -48,7 +48,7 @@ class ListBuilder implements ListBuilderInterface
         $fieldDescription->mergeOptions($options);
         $fieldDescription->setAdmin($admin);
 
-        if($admin->getModelManager()->hasMetadata($admin->getClass())) {
+        if ($admin->getModelManager()->hasMetadata($admin->getClass())) {
             $metadata = $admin->getModelManager()->getMetadata($admin->getClass());
 
             // set the default field mapping

+ 1 - 1
Datagrid/Datagrid.php

@@ -64,7 +64,7 @@ class Datagrid implements DatagridInterface
 
     public function buildPager()
     {
-        if($this->bound) {
+        if ($this->bound) {
             return;
         }
 

+ 1 - 1
Datagrid/ORM/Pager.php

@@ -33,7 +33,7 @@ class Pager extends BasePager
     {
         $countQuery = clone $this->getQuery();
 
-        if(count($this->getParameters()) > 0) {
+        if (count($this->getParameters()) > 0) {
             $countQuery->setParameters($this->getParameters());
         }
 

+ 2 - 2
Resources/doc/reference/routing.rst

@@ -52,7 +52,7 @@ A route is always generated with the ``Admin`` context, that is why a route can
 .. code-block:: php
 
     use Sonata\AdminBundle\Route\RouteCollection;
-    
+
     class MediaAdmin extends Admin
     {
         public function configureRoutes(RouteCollection $collection)
@@ -76,7 +76,7 @@ method. This method will be used when a link is being generated.
     {
         public function getPersistentParameters()
         {
-            if(!$this->getRequest()) {
+            if (!$this->getRequest()) {
                 return array();
             }
 

+ 2 - 2
Route/RouteCollection.php

@@ -71,7 +71,7 @@ class RouteCollection
      */
     public function addCollection(RouteCollection $collection)
     {
-        foreach($collection->getElements() as $name => $route) {
+        foreach ($collection->getElements() as $name => $route) {
             $this->elements[$name] = $route;
         }
     }
@@ -114,7 +114,7 @@ class RouteCollection
      */
     public function actionify($action)
     {
-        if(($pos = strrpos($action, '.')) !== false) {
+        if (($pos = strrpos($action, '.')) !== false) {
 
           $action = substr($action, $pos + 1);
         }