@@ -32,10 +32,10 @@ |
||
| 32 | 32 | ; |
| 33 | 33 | $builder->get('content') |
| 34 | 34 | ->addModelTransformer(new CallbackTransformer( |
| 35 | - function ($originalDescription) { |
|
| 35 | + function($originalDescription) { |
|
| 36 | 36 | return $originalDescription; |
| 37 | 37 | }, |
| 38 | - function ($submittedDescription) { |
|
| 38 | + function($submittedDescription) { |
|
| 39 | 39 | // remove all HTML tags |
| 40 | 40 | return strip_tags($submittedDescription); |
| 41 | 41 | } |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | */ |
| 86 | 86 | public function deleteAction(Request $request, BlockPositionEntity $positionEntity) |
| 87 | 87 | { |
| 88 | - if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() .'::'. $positionEntity->getPid(), ACCESS_DELETE)) { |
|
| 88 | + if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() . '::' . $positionEntity->getPid(), ACCESS_DELETE)) { |
|
| 89 | 89 | throw new AccessDeniedException(); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block'; |
| 83 | 83 | } catch (\Exception $e) { |
| 84 | 84 | $moduleBundle = null; |
| 85 | - $blockClassName = '\\' . ucwords($moduleName).'\\'.'Block\\'.ucwords($blockEntity->getBkey()); |
|
| 85 | + $blockClassName = '\\' . ucwords($moduleName) . '\\' . 'Block\\' . ucwords($blockEntity->getBkey()); |
|
| 86 | 86 | $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block'; |
| 87 | 87 | $blockClassNameOld = '\\' . ucwords($moduleName) . '_' . 'Block_' . ucwords($blockEntity->getBkey()); |
| 88 | 88 | $blockClassName = class_exists($blockClassName) ? $blockClassName : $blockClassNameOld; |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | || (self::STRATEGY_PREFIX_EXCEPT_DEFAULT === $this->strategy && $this->defaultLocale !== $locale)) { |
| 105 | 105 | $i18nPattern = '/' . $locale . $i18nPattern; |
| 106 | 106 | if (null !== $route->getOption('i18n_prefix')) { |
| 107 | - $i18nPattern = $route->getOption('i18n_prefix').$i18nPattern; |
|
| 107 | + $i18nPattern = $route->getOption('i18n_prefix') . $i18nPattern; |
|
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | |
@@ -39,10 +39,10 @@ |
||
| 39 | 39 | ; |
| 40 | 40 | $builder->get('options') |
| 41 | 41 | ->addModelTransformer(new CallbackTransformer( |
| 42 | - function ($text) { |
|
| 42 | + function($text) { |
|
| 43 | 43 | return $text; |
| 44 | 44 | }, |
| 45 | - function ($text) { |
|
| 45 | + function($text) { |
|
| 46 | 46 | if (empty($text)) { |
| 47 | 47 | return '{}'; |
| 48 | 48 | } |
@@ -122,9 +122,9 @@ |
||
| 122 | 122 | $entityId = str_replace($this->domTreeNodePrefix, '', $node['id']); |
| 123 | 123 | $menuItemEntity = $repo->find($entityId); |
| 124 | 124 | $oldParent = $request->request->get('old_parent'); |
| 125 | - $oldPosition = (int) $request->request->get('old_position'); |
|
| 125 | + $oldPosition = (int)$request->request->get('old_position'); |
|
| 126 | 126 | $parent = $request->request->get('parent'); |
| 127 | - $position = (int) $request->request->get('position'); |
|
| 127 | + $position = (int)$request->request->get('position'); |
|
| 128 | 128 | if ($oldParent == $parent) { |
| 129 | 129 | $diff = $oldPosition - $position; // if $diff is positive, then node moved up |
| 130 | 130 | $methodName = $diff > 0 ? 'moveUp' : 'moveDown'; |
@@ -56,7 +56,8 @@ |
||
| 56 | 56 | $parent = $repo->find($request->request->get('parent')); |
| 57 | 57 | $menuItemEntity->setParent($parent); |
| 58 | 58 | $menuItemEntity->setRoot($parent->getRoot()); |
| 59 | - } elseif (empty($parentId) && $request->request->has('after')) { // sibling of top-level child |
|
| 59 | + } elseif (empty($parentId) && $request->request->has('after')) { |
|
| 60 | +// sibling of top-level child |
|
| 60 | 61 | $sibling = $repo->find($request->request->get('after')); |
| 61 | 62 | $menuItemEntity->setParent($sibling->getParent()); |
| 62 | 63 | $menuItemEntity->setRoot($sibling->getRoot()); |
@@ -36,12 +36,12 @@ |
||
| 36 | 36 | |
| 37 | 37 | if ($parentId > 0) { |
| 38 | 38 | $qb->andWhere('c.parent = :parentid') |
| 39 | - ->setParameter('parentid', $parentId); |
|
| 39 | + ->setParameter('parentid', $parentId); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | if ($excludedId > 0) { |
| 43 | 43 | $qb->andWhere('c.id != :id') |
| 44 | - ->setParameter('id', $excludedId); |
|
| 44 | + ->setParameter('id', $excludedId); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $query = $qb->getQuery(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $class = $this->entityCategoryClass; |
| 36 | 36 | |
| 37 | 37 | foreach ($value as $regId => $categories) { |
| 38 | - $regId = (int) substr($regId, strpos($regId, '_') + 1); |
|
| 38 | + $regId = (int)substr($regId, strpos($regId, '_') + 1); |
|
| 39 | 39 | $subCollection = new ArrayCollection(); |
| 40 | 40 | if (!is_array($categories) && $categories instanceof CategoryEntity) { |
| 41 | 41 | $categories = [$categories]; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function display(array $properties) |
| 27 | 27 | { |
| 28 | - if (!$this->hasPermission('Onlineblock::', $properties['bid'].'::', ACCESS_READ)) { |
|
| 28 | + if (!$this->hasPermission('Onlineblock::', $properties['bid'] . '::', ACCESS_READ)) { |
|
| 29 | 29 | return ''; |
| 30 | 30 | } |
| 31 | 31 | |