Bläddra i källkod

use RuntimeException instead of non existing RunTimeException

Oskar Stark 8 år sedan
förälder
incheckning
36767e27a0

+ 1 - 1
Admin/FieldDescriptionCollection.php

@@ -96,7 +96,7 @@ class FieldDescriptionCollection implements \ArrayAccess, \Countable
      */
     public function offsetSet($offset, $value)
     {
-        throw new \RunTimeException('Cannot set value, use add');
+        throw new \RuntimeException('Cannot set value, use add');
     }
 
     /**

+ 1 - 1
Command/ExplainAdminCommand.php

@@ -42,7 +42,7 @@ class ExplainAdminCommand extends ContainerAwareCommand
         $admin = $this->getContainer()->get($input->getArgument('admin'));
 
         if (!$admin instanceof \Sonata\AdminBundle\Admin\AdminInterface) {
-            throw new \RunTimeException(sprintf('Service "%s" is not an admin class', $input->getArgument('admin')));
+            throw new \RuntimeException(sprintf('Service "%s" is not an admin class', $input->getArgument('admin')));
         }
 
         $output->writeln('<comment>AdminBundle Information</comment>');

+ 3 - 3
Filter/FilterFactory.php

@@ -46,19 +46,19 @@ class FilterFactory implements FilterFactoryInterface
     public function create($name, $type, array $options = array())
     {
         if (!$type) {
-            throw new \RunTimeException('The type must be defined');
+            throw new \RuntimeException('The type must be defined');
         }
 
         $id = isset($this->types[$type]) ? $this->types[$type] : false;
 
         if (!$id) {
-            throw new \RunTimeException(sprintf('No attached service to type named `%s`', $type));
+            throw new \RuntimeException(sprintf('No attached service to type named `%s`', $type));
         }
 
         $filter = $this->container->get($id);
 
         if (!$filter instanceof FilterInterface) {
-            throw new \RunTimeException(sprintf('The service `%s` must implement `FilterInterface`', $id));
+            throw new \RuntimeException(sprintf('The service `%s` must implement `FilterInterface`', $id));
         }
 
         $filter->initialize($name, $options);

+ 1 - 1
Tests/Admin/FieldDescriptionCollectionTest.php

@@ -58,7 +58,7 @@ class FieldDescriptionCollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @expectedException        RunTimeException
+     * @expectedException        RuntimeException
      * @expectedExceptionMessage Cannot set value, use add
      */
     public function testArrayAccessSetField()

+ 1 - 1
Tests/Filter/FilterTest.php

@@ -99,7 +99,7 @@ class FilterTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @expectedException RunTimeException
+     * @expectedException RuntimeException
      */
     public function testExceptionOnNonDefinedFieldName()
     {

+ 1 - 1
Tests/Security/Handler/AclSecurityHandlerTest.php

@@ -120,7 +120,7 @@ class AclSecurityHandlerTest extends \PHPUnit_Framework_TestCase
         $authorizationChecker = $this->getAuthorizationCheckerMock();
         $authorizationChecker->expects($this->any())
             ->method('isGranted')
-            ->will($this->throwException(new \RunTimeException('FAIL')));
+            ->will($this->throwException(new \RuntimeException('FAIL')));
 
         $aclProvider = $this->getMock('Symfony\Component\Security\Acl\Model\MutableAclProviderInterface');
 

+ 1 - 1
Twig/Extension/SonataAdminExtension.php

@@ -300,7 +300,7 @@ EOT;
     }
 
     /**
-     * @throws \RunTimeException
+     * @throws \RuntimeException
      *
      * @param mixed                     $element
      * @param FieldDescriptionInterface $fieldDescription