浏览代码

Fixed typos

Pascal Borreli 11 年之前
父节点
当前提交
ac2a6a5244

+ 2 - 2
Admin/Admin.php

@@ -896,7 +896,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
     public function getBaseRouteName()
     public function getBaseRouteName()
     {
     {
         if (!$this->baseRouteName) {
         if (!$this->baseRouteName) {
-            preg_match(self::CLASS_REGEX, $this->class , $matches);
+            preg_match(self::CLASS_REGEX, $this->class, $matches);
 
 
             if (!$matches) {
             if (!$matches) {
                 throw new \RuntimeException(sprintf('Cannot automatically determine base route name, please define a default `baseRouteName` value for the admin class `%s`', get_class($this)));
                 throw new \RuntimeException(sprintf('Cannot automatically determine base route name, please define a default `baseRouteName` value for the admin class `%s`', get_class($this)));
@@ -1219,7 +1219,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
     public function getNewInstance()
     public function getNewInstance()
     {
     {
         $object = $this->getModelManager()->getModelInstance($this->getClass());
         $object = $this->getModelManager()->getModelInstance($this->getClass());
-        foreach($this->getExtensions() as $extension) {
+        foreach ($this->getExtensions() as $extension) {
             $extension->alterNewInstance($this, $object);
             $extension->alterNewInstance($this, $object);
         }
         }
 
 

+ 0 - 1
Admin/AdminExtension.php

@@ -113,4 +113,3 @@ abstract class AdminExtension implements AdminExtensionInterface
     public function postRemove(AdminInterface $admin, $object)
     public function postRemove(AdminInterface $admin, $object)
     {}
     {}
 }
 }
-

+ 1 - 1
Admin/AdminInterface.php

@@ -286,7 +286,7 @@ interface AdminInterface
     public function getRoutes();
     public function getRoutes();
 
 
     /**
     /**
-     * Return the parameter name used to represente the id in the url
+     * Return the parameter name used to represent the id in the url
      *
      *
      * @return string
      * @return string
      */
      */

+ 1 - 0
Admin/Pool.php

@@ -35,6 +35,7 @@ class Pool
      * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
      * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
      * @param string                                                    $title
      * @param string                                                    $title
      * @param string                                                    $logoTitle
      * @param string                                                    $logoTitle
+     * @param array                                                     $options
      */
      */
     public function __construct(ContainerInterface $container, $title, $logoTitle, $options = array())
     public function __construct(ContainerInterface $container, $title, $logoTitle, $options = array())
     {
     {

+ 1 - 1
Filter/Filter.php

@@ -213,7 +213,7 @@ abstract class Filter implements FilterInterface
     }
     }
 
 
     /**
     /**
-     * @return
+     * @return string
      */
      */
     public function getCondition()
     public function getCondition()
     {
     {

+ 1 - 1
Form/ChoiceList/ModelChoiceList.php

@@ -182,7 +182,7 @@ class ModelChoiceList extends SimpleChoiceList
      * Returns the entity for the given key
      * Returns the entity for the given key
      *
      *
      * If the underlying entities have composite identifiers, the choices
      * If the underlying entities have composite identifiers, the choices
-     * are intialized. The key is expected to be the index in the choices
+     * are initialized. The key is expected to be the index in the choices
      * array in this case.
      * array in this case.
      *
      *
      * If they have single identifiers, they are either fetched from the
      * If they have single identifiers, they are either fetched from the

+ 2 - 2
Form/FormMapper.php

@@ -177,7 +177,7 @@ class FormMapper extends BaseGroupedMapper
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
-    protected function getGroups() 
+    protected function getGroups()
     {
     {
         return $this->admin->getFormGroups();
         return $this->admin->getFormGroups();
     }
     }
@@ -185,7 +185,7 @@ class FormMapper extends BaseGroupedMapper
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
-    protected function setGroups(array $groups) 
+    protected function setGroups(array $groups)
     {
     {
         $this->admin->setFormGroups($groups);
         $this->admin->setFormGroups($groups);
     }
     }

+ 1 - 1
Form/Type/AdminType.php

@@ -30,7 +30,7 @@ class AdminType extends AbstractType
     {
     {
         $admin = $this->getAdmin($options);
         $admin = $this->getAdmin($options);
 
 
-        if ($options['delete'] && $admin->isGranted('DELETE') ) {
+        if ($options['delete'] && $admin->isGranted('DELETE')) {
             $builder->add('_delete', 'checkbox', array('required' => false, 'mapped' => false));
             $builder->add('_delete', 'checkbox', array('required' => false, 'mapped' => false));
         }
         }
 
 

+ 1 - 1
Generator/ControllerGenerator.php

@@ -29,7 +29,7 @@ class ControllerGenerator extends AbstractBcGenerator
     private $file;
     private $file;
 
 
     /**
     /**
-     * @param array|string $skeletonDirectories
+     * @param array|string $skeletonDirectory
      */
      */
     public function __construct($skeletonDirectory)
     public function __construct($skeletonDirectory)
     {
     {

+ 1 - 1
Mapper/BaseMapper.php

@@ -43,7 +43,7 @@ abstract class BaseMapper
     }
     }
     
     
     /**
     /**
-     * @param string $name
+     * @param string $key
      *
      *
      * @return mixed
      * @return mixed
      */
      */

+ 1 - 1
Resources/doc/reference/preview_mode.rst

@@ -23,7 +23,7 @@ This will show a new button during create/edit mode named preview.
    :align: center
    :align: center
    :alt: Preview Button
    :alt: Preview Button
 
 
-While in preview mode two buttons will be shown to approve or decline persistance of the
+While in preview mode two buttons will be shown to approve or decline persistence of the
 entity. Decline will send you back to the edit mode with all your changes unpersisted but
 entity. Decline will send you back to the edit mode with all your changes unpersisted but
 still in the form so no data is lost and the entity can be further adjusted.
 still in the form so no data is lost and the entity can be further adjusted.
 Accepting the preview will store the entity as if the preview step was never there.
 Accepting the preview will store the entity as if the preview step was never there.

+ 1 - 1
Search/SearchHandler.php

@@ -44,7 +44,7 @@ class SearchHandler
         $datagrid = $admin->getDatagrid();
         $datagrid = $admin->getDatagrid();
 
 
         $found = false;
         $found = false;
-        foreach($datagrid->getFilters() as $name => $filter) {
+        foreach ($datagrid->getFilters() as $name => $filter) {
             /** @var $filter FilterInterface */
             /** @var $filter FilterInterface */
             if ($filter->getOption('global_search', false)) {
             if ($filter->getOption('global_search', false)) {
                 $filter->setCondition(FilterInterface::CONDITION_OR);
                 $filter->setCondition(FilterInterface::CONDITION_OR);

+ 1 - 2
Show/ShowMapper.php

@@ -123,7 +123,7 @@ class ShowMapper extends BaseGroupedMapper
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
-    protected function getGroups() 
+    protected function getGroups()
     {
     {
         return $this->admin->getShowGroups();
         return $this->admin->getShowGroups();
     }
     }
@@ -135,5 +135,4 @@ class ShowMapper extends BaseGroupedMapper
     {
     {
         $this->admin->setShowGroups($groups);
         $this->admin->setShowGroups($groups);
     }
     }
-
 }
 }

+ 1 - 1
Tests/Command/GenerateAdminCommandTest.php

@@ -222,7 +222,7 @@ class GenerateAdminCommandTest extends \PHPUnit_Framework_TestCase
 
 
                 switch ($questionClean) {
                 switch ($questionClean) {
                     case 'The fully qualified model class':
                     case 'The fully qualified model class':
-                        return $modelEntity;;
+                        return $modelEntity;
                         break;
                         break;
 
 
                     case 'The bundle name':
                     case 'The bundle name':

+ 1 - 1
Util/AdminAclManipulator.php

@@ -67,7 +67,7 @@ class AdminAclManipulator implements AdminAclManipulatorInterface
      */
      */
     public function addAdminClassAces(OutputInterface $output, AclInterface $acl, AclSecurityHandlerInterface $securityHandler, array $roleInformation = array())
     public function addAdminClassAces(OutputInterface $output, AclInterface $acl, AclSecurityHandlerInterface $securityHandler, array $roleInformation = array())
     {
     {
-        if (count($securityHandler->getAdminPermissions()) > 0 ) {
+        if (count($securityHandler->getAdminPermissions()) > 0) {
             $builder = new $this->maskBuilderClass();
             $builder = new $this->maskBuilderClass();
 
 
             foreach ($roleInformation as $role => $permissions) {
             foreach ($roleInformation as $role => $permissions) {