Skip to content

Commit

Permalink
Merge pull request #36 from larriereguichet/scrutinizer-patch-1
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
johnkrovitch authored Jun 13, 2016
2 parents 01610a3 + 857b505 commit ceb2acc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Action/Configuration/ActionConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ public function configureOptions(OptionsResolver $resolver)
$resolver
->setDefault('route', '')
->setAllowedTypes('route', 'string')
->setNormalizer('route', function (Options $options, $value) {
->setNormalizer('route', function(Options $options, $value) {
if (!$value) {
// if no route was provided, it should be linked to an Admin
if (!$this->admin) {
throw new InvalidOptionsException('No route was provided for action : ' . $this->actionName);
throw new InvalidOptionsException('No route was provided for action : '.$this->actionName);
}

// generate default route from admin
Expand Down Expand Up @@ -142,7 +142,7 @@ public function configureOptions(OptionsResolver $resolver)
->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_UNIQUE)
->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_MULTIPLE)
->addAllowedValues('load_strategy', null)
->setNormalizer('load_strategy', function (Options $options, $value) {
->setNormalizer('load_strategy', function(Options $options, $value) {

if (!$value) {
if ($this->actionName == 'create') {
Expand All @@ -167,7 +167,7 @@ public function configureOptions(OptionsResolver $resolver)
// criteria used to find entity in the data provider
$resolver
->setDefault('criteria', [])
->setNormalizer('criteria', function (Options $options, $value) {
->setNormalizer('criteria', function(Options $options, $value) {

if (!$value) {
$idActions = [
Expand All @@ -192,7 +192,7 @@ public function configureOptions(OptionsResolver $resolver)
// menus
$resolver
->setDefault('menus', [])
->setNormalizer('menus', function (Options $options, $menus) {
->setNormalizer('menus', function(Options $options, $menus) {
// set default to an array
if ($menus === false) {
$menus = [];
Expand Down
2 changes: 1 addition & 1 deletion Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function batchAction(Request $request)
$admin->remove();
}
} else {
throw new NotFoundHttpException('Invalid batch parameters : ' . $form->getErrors(true, false));
throw new NotFoundHttpException('Invalid batch parameters : '.$form->getErrors(true, false));
}
// redirect to list view
return $this->redirectToRoute($admin->generateRouteName('list'));
Expand Down

0 comments on commit ceb2acc

Please sign in to comment.