@@ -142,7 +142,6 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * Set the default options |
| 144 | 144 | * |
| 145 | - * @param ConfigurationInterface $configuration |
|
| 146 | 145 | * @param OptionsResolverInterface $resolver |
| 147 | 146 | */ |
| 148 | 147 | protected function setDefaultOptions(OptionsResolverInterface $resolver) |
@@ -203,8 +202,8 @@ discard block |
||
| 203 | 202 | * Adds a flash message |
| 204 | 203 | * |
| 205 | 204 | * @param Request $request |
| 206 | - * @param type $type |
|
| 207 | - * @param type $message |
|
| 205 | + * @param string $type |
|
| 206 | + * @param type string |
|
| 208 | 207 | * @param array $messageParameters |
| 209 | 208 | */ |
| 210 | 209 | protected function addFlash(Request $request, $type, $message, array $messageParameters = []) |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | * |
| 122 | 122 | * @param object $object |
| 123 | 123 | * |
| 124 | - * @return Response |
|
| 124 | + * @return RedirectResponse |
|
| 125 | 125 | */ |
| 126 | 126 | protected function getRedirectResponse($object) |
| 127 | 127 | { |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | */ |
| 100 | 100 | protected function saveForm(Request $request, FormInterface $form) |
| 101 | 101 | { |
| 102 | - $this->getManager()->save($form->getData(), $this->options['save_options']); |
|
| 102 | + $this->getManager()->save($form->getData(), $this->options['save_options']); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -34,8 +34,6 @@ |
||
| 34 | 34 | /** |
| 35 | 35 | * Constructor |
| 36 | 36 | * |
| 37 | - * @param EntityManager $em |
|
| 38 | - * @param AclHelper $aclHelper |
|
| 39 | 37 | * @param LocaleHelper $localeHelper |
| 40 | 38 | */ |
| 41 | 39 | public function __construct( |
@@ -64,9 +64,9 @@ |
||
| 64 | 64 | /** |
| 65 | 65 | * Creates a query builder for options |
| 66 | 66 | * |
| 67 | - * @param type $dataLocale |
|
| 67 | + * @param string $dataLocale |
|
| 68 | 68 | * @param type $collectionId |
| 69 | - * @param type $search |
|
| 69 | + * @param string $search |
|
| 70 | 70 | * @param array $options |
| 71 | 71 | * |
| 72 | 72 | * @return \Doctrine\ORM\QueryBuilder |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | return array( |
| 50 | 50 | 'results' => array_map( |
| 51 | - function ($option) { |
|
| 51 | + function($option) { |
|
| 52 | 52 | if (!$option['text']) { |
| 53 | 53 | $option['text'] = $option['code']; |
| 54 | 54 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * Constructor |
| 28 | 28 | * |
| 29 | 29 | * @param ActionInterface $action |
| 30 | - * @param type $template |
|
| 30 | + * @param string $template |
|
| 31 | 31 | * @param array $templateVars |
| 32 | 32 | */ |
| 33 | 33 | public function __construct(ActionInterface $action, $template, array $templateVars) |
@@ -80,7 +80,6 @@ |
||
| 80 | 80 | * Sets the configuration for row actions |
| 81 | 81 | * |
| 82 | 82 | * @param DatagridConfiguration $datagridConfig |
| 83 | - * @param ConfigurationInterface $customEntityConfig |
|
| 84 | 83 | */ |
| 85 | 84 | protected function setRowActions(DatagridConfiguration $datagridConfig, ActionInterface $indexAction) |
| 86 | 85 | { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | $customEntityConfig = $indexAction->getConfiguration(); |
| 68 | 68 | $options = $indexAction->getOptions(); |
| 69 | - $sourceOptions = ($datagridConfig->offsetGetByPath('[source]')?:[]) + [ |
|
| 69 | + $sourceOptions = ($datagridConfig->offsetGetByPath('[source]') ?: []) + [ |
|
| 70 | 70 | 'entity' => $customEntityConfig->getEntityClass(), |
| 71 | 71 | 'type' => 'pim_custom_entity' |
| 72 | 72 | ]; |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | $actions = []; |
| 90 | 90 | |
| 91 | 91 | foreach ($indexAction->getRowActions() as $rowActionType) { |
| 92 | - $link = $rowActionType . '_link'; |
|
| 93 | - $rowAction = $this->actionFactory->getAction($name, $rowActionType); |
|
| 92 | + $link = $rowActionType.'_link'; |
|
| 93 | + $rowAction = $this->actionFactory->getAction($name, $rowActionType); |
|
| 94 | 94 | $actions[$rowActionType] = $rowAction->getGridActionOptions() + ['link' => $link]; |
| 95 | 95 | $properties[$link] = [ |
| 96 | 96 | 'type' => 'custom_entity_url', |
@@ -92,6 +92,7 @@ |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | + * @param string $datagridName |
|
| 95 | 96 | * @return array |
| 96 | 97 | */ |
| 97 | 98 | public function getIds(Request $request, $datagridName) |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $response = new StreamedResponse( |
| 91 | - function () use ($request) { |
|
| 91 | + function() use ($request) { |
|
| 92 | 92 | $this->export($request); |
| 93 | 93 | } |
| 94 | 94 | ); |
@@ -88,9 +88,9 @@ discard block |
||
| 88 | 88 | $resolver->setOptional(['acl_suffix']); |
| 89 | 89 | $resolver->setNormalizers( |
| 90 | 90 | [ |
| 91 | - 'acl' => function ($actionOptions, $acl) use ($options) { |
|
| 91 | + 'acl' => function($actionOptions, $acl) use ($options) { |
|
| 92 | 92 | if (null === $acl && isset($options['acl_prefix']) && isset($actionOptions['acl_suffix'])) { |
| 93 | - return $options['acl_prefix'] . $options['acl_separator'] . |
|
| 93 | + return $options['acl_prefix'].$options['acl_separator']. |
|
| 94 | 94 | $actionOptions['acl_suffix']; |
| 95 | 95 | } |
| 96 | 96 | |
@@ -99,10 +99,10 @@ discard block |
||
| 99 | 99 | ] |
| 100 | 100 | ); |
| 101 | 101 | $customEntityName = $event->getAction()->getConfiguration()->getName(); |
| 102 | - $normalizeActions = function ($options, $actionTypes) use ($customEntityName) { |
|
| 102 | + $normalizeActions = function($options, $actionTypes) use ($customEntityName) { |
|
| 103 | 103 | return array_filter( |
| 104 | 104 | $actionTypes, |
| 105 | - function ($actionType) use ($customEntityName) { |
|
| 105 | + function($actionType) use ($customEntityName) { |
|
| 106 | 106 | $action = $this->actionFactory->getAction($customEntityName, $actionType); |
| 107 | 107 | $options = $action->getOptions(); |
| 108 | 108 | |