@@ -142,7 +142,7 @@ |
||
142 | 142 | $slimMode = (bool) $slimMode; |
143 | 143 | |
144 | 144 | if (!empty($idList)) { |
145 | - return $repository->selectByIdList($idList, $useJoins, $slimMode); |
|
145 | + return $repository->selectByIdList($idList, $useJoins, $slimMode); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | return $repository->selectWhere($where, $orderBy, $useJoins, $slimMode); |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | $objectType = $this->determineObjectType($objectType, 'getEntity'); |
114 | 114 | $repository = $this->getRepository($objectType); |
115 | 115 | |
116 | - $useJoins = (bool) $useJoins; |
|
117 | - $slimMode = (bool) $slimMode; |
|
116 | + $useJoins = (bool)$useJoins; |
|
117 | + $slimMode = (bool)$slimMode; |
|
118 | 118 | |
119 | 119 | $entity = $repository->selectById($id, $useJoins, $slimMode); |
120 | 120 | |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | $objectType = $this->determineObjectType($objectType, 'getEntities'); |
139 | 139 | $repository = $this->getRepository($objectType); |
140 | 140 | |
141 | - $useJoins = (bool) $useJoins; |
|
142 | - $slimMode = (bool) $slimMode; |
|
141 | + $useJoins = (bool)$useJoins; |
|
142 | + $slimMode = (bool)$slimMode; |
|
143 | 143 | |
144 | 144 | if (!empty($idList)) { |
145 | 145 | return $repository->selectByIdList($idList, $useJoins, $slimMode); |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | $objectType = $this->determineObjectType($objectType, 'getEntitiesPaginated'); |
167 | 167 | $repository = $this->getRepository($objectType); |
168 | 168 | |
169 | - $useJoins = (bool) $useJoins; |
|
170 | - $slimMode = (bool) $slimMode; |
|
169 | + $useJoins = (bool)$useJoins; |
|
170 | + $slimMode = (bool)$slimMode; |
|
171 | 171 | |
172 | 172 | return $repository->selectWherePaginated($where, $orderBy, $currentPage, $resultsPerPage, $useJoins, $slimMode); |
173 | 173 | } |
@@ -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 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $configs, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
30 | 30 | |
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | 'decorate' => true, |
74 | 74 | 'representationField' => 'title', |
75 | 75 | 'html' => true, |
76 | - 'childOpen' => function ($node) { |
|
76 | + 'childOpen' => function($node) { |
|
77 | 77 | return '<li class="jstree-open" id="' . $this->domTreeNodePrefix . $node['id'] . '">'; |
78 | 78 | } |
79 | 79 | ] |
@@ -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'; |
@@ -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(); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $configs, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
30 | 30 | |
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
@@ -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]; |
@@ -61,11 +61,11 @@ |
||
61 | 61 | 'multiple' => $options['multiple'], |
62 | 62 | 'class' => 'ZikulaCategoriesModule:CategoryEntity', |
63 | 63 | 'property' => 'name', |
64 | - 'query_builder' => function (EntityRepository $repo) use ($categoryId) { |
|
64 | + 'query_builder' => function(EntityRepository $repo) use ($categoryId) { |
|
65 | 65 | //TODO: (move to)/use own entity repository |
66 | 66 | return $repo->createQueryBuilder('e') |
67 | 67 | ->where('e.parent = :parentId') |
68 | - ->setParameter('parentId', (int) $categoryId); |
|
68 | + ->setParameter('parentId', (int)$categoryId); |
|
69 | 69 | } |
70 | 70 | ]); |
71 | 71 | } |