Skip to content

Commit

Permalink
use RuntimeException instead of non existing RunTimeException
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Aug 8, 2016
1 parent 1065722 commit 36767e2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Admin/FieldDescriptionCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function offsetGet($offset)
*/
public function offsetSet($offset, $value)
{
throw new \RunTimeException('Cannot set value, use add');
throw new \RuntimeException('Cannot set value, use add');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Command/ExplainAdminCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function execute(InputInterface $input, OutputInterface $output)
$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>');
Expand Down
6 changes: 3 additions & 3 deletions Filter/FilterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ public function __construct(ContainerInterface $container, array $types = array(
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);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Admin/FieldDescriptionCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testNonExistentField()
}

/**
* @expectedException RunTimeException
* @expectedException RuntimeException
* @expectedExceptionMessage Cannot set value, use add
*/
public function testArrayAccessSetField()
Expand Down
2 changes: 1 addition & 1 deletion Tests/Filter/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testLabel()
}

/**
* @expectedException RunTimeException
* @expectedException RuntimeException
*/
public function testExceptionOnNonDefinedFieldName()
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/Security/Handler/AclSecurityHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function testWithNonAuthenticationCredentialsNotFoundException()
$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');

Expand Down
2 changes: 1 addition & 1 deletion Twig/Extension/SonataAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function renderViewElementCompare(
}

/**
* @throws \RunTimeException
* @throws \RuntimeException
*
* @param mixed $element
* @param FieldDescriptionInterface $fieldDescription
Expand Down

0 comments on commit 36767e2

Please sign in to comment.