Parcourir la source

Refactoring of NoValueException

Peter Kokot il y a 13 ans
Parent
commit
5b75b51303

+ 1 - 0
Admin/AdminHelper.php

@@ -12,6 +12,7 @@ namespace Sonata\AdminBundle\Admin;
 
 use Symfony\Component\Form\FormBuilder;
 use Symfony\Component\Form\FormView;
+use Sonata\AdminBundle\Exception\NoValueException;
 use Sonata\AdminBundle\Util\FormViewIterator;
 use Sonata\AdminBundle\Util\FormBuilderIterator;
 

+ 1 - 0
Admin/BaseFieldDescription.php

@@ -12,6 +12,7 @@
 namespace Sonata\AdminBundle\Admin;
 
 use Sonata\AdminBundle\Admin\AdminInterface;
+use Sonata\AdminBundle\Exception\NoValueException;
 
 /**
  * A FieldDescription hold the information about a field. A typical

+ 1 - 1
Admin/NoValueException.php

@@ -9,7 +9,7 @@
  * file that was distributed with this source code.
  */
 
-namespace Sonata\AdminBundle\Admin;
+namespace Sonata\AdminBundle\Exception;
 
 class NoValueException extends \Exception
 {

+ 1 - 1
Form/Extension/Field/Type/FormTypeFieldExtension.php

@@ -16,8 +16,8 @@ use Symfony\Component\Form\FormBuilder;
 use Symfony\Component\Form\FormInterface;
 use Symfony\Component\Form\FormView;
 
-use Sonata\AdminBundle\Admin\NoValueException;
 use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
+use Sonata\AdminBundle\Exception\NoValueException;
 
 class FormTypeFieldExtension extends AbstractTypeExtension
 {

+ 1 - 1
Tests/Admin/BaseFieldDescriptionTest.php

@@ -96,7 +96,7 @@ class BaseFieldDescriptionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @expectedException Sonata\AdminBundle\Admin\NoValueException
+     * @expectedException Sonata\AdminBundle\Exception\NoValueException
      */
     public function testGetValueNoValueException()
     {

+ 1 - 1
Twig/Extension/SonataAdminExtension.php

@@ -12,8 +12,8 @@
 namespace Sonata\AdminBundle\Twig\Extension;
 
 use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
+use Sonata\AdminBundle\Exception\NoValueException;
 use Sonata\AdminBundle\Filter\FilterInterface;
-use Sonata\AdminBundle\Admin\NoValueException;
 
 use Symfony\Component\Form\FormView;