@@ -64,10 +64,10 @@ |
||
64 | 64 | //If the user is null, then treat it as anonymous user. |
65 | 65 | //When the anonymous user is passed as user then use this path too. |
66 | 66 | if ($user === null || $user->getID() === User::ID_ANONYMOUS) { |
67 | - return 'user$_' . User::ID_ANONYMOUS; |
|
67 | + return 'user$_'.User::ID_ANONYMOUS; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | //In the most cases we can just use the username (its unique) |
71 | - return "user_" . $user->getUsername(); |
|
71 | + return "user_".$user->getUsername(); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | \ No newline at end of file |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $tree_node = new TreeViewNode($element->__toString(), $href, $children_nodes); |
104 | 104 | |
105 | - if($children_nodes != null) { |
|
105 | + if ($children_nodes != null) { |
|
106 | 106 | $tree_node->addTag((string) count($children_nodes)); |
107 | 107 | } |
108 | 108 | |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | $parent_id = $parent != null ? $parent->getID() : "0"; |
178 | 178 | // Backslashes are not allowed in cache keys |
179 | 179 | $secure_class_name = str_replace("\\", '_', $class_name); |
180 | - $key = "list_" . $this->keyGenerator->generateKey() . "_" . $secure_class_name . $parent_id; |
|
180 | + $key = "list_".$this->keyGenerator->generateKey()."_".$secure_class_name.$parent_id; |
|
181 | 181 | |
182 | - $ret = $this->cache->get($key, function (ItemInterface $item) use ($class_name, $parent, $secure_class_name) { |
|
182 | + $ret = $this->cache->get($key, function(ItemInterface $item) use ($class_name, $parent, $secure_class_name) { |
|
183 | 183 | // Invalidate when groups, a element with the class or the user changes |
184 | 184 | $item->tag(['groups', 'tree_list', $this->keyGenerator->generateKey(), $secure_class_name]); |
185 | 185 | /** |
@@ -66,9 +66,9 @@ |
||
66 | 66 | */ |
67 | 67 | public function getTree() : array |
68 | 68 | { |
69 | - $key = "tree_tools_" . $this->keyGenerator->generateKey(); |
|
69 | + $key = "tree_tools_".$this->keyGenerator->generateKey(); |
|
70 | 70 | |
71 | - return $this->cache->get($key, function (ItemInterface $item) { |
|
71 | + return $this->cache->get($key, function(ItemInterface $item) { |
|
72 | 72 | //Invalidate tree, whenever group or the user changes |
73 | 73 | $item->tag(["tree_tools", "groups", $this->keyGenerator->generateKey()]); |
74 | 74 |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $em->flush(); |
96 | 96 | //$this->addFlash('success', $translator->trans('part.created_flash')); |
97 | 97 | |
98 | - return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]); |
|
98 | + return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | //Import form |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | foreach ($errors as $name => $error) { |
116 | 116 | /** @var $error ConstraintViolationList */ |
117 | - $this->addFlash('error', $name . ':' . $error); |
|
117 | + $this->addFlash('error', $name.':'.$error); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | //Show errors to user: |
134 | 134 | foreach ($errors as $name => $error) { |
135 | 135 | /** @var $error ConstraintViolationList */ |
136 | - $this->addFlash('error', $name . ':' . $error); |
|
136 | + $this->addFlash('error', $name.':'.$error); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $this->addFlash('success', 'attachment_type.deleted'); |
175 | 175 | } |
176 | 176 | |
177 | - return $this->redirectToRoute($this->route_base . '_new'); |
|
177 | + return $this->redirectToRoute($this->route_base.'_new'); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | protected function _exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request) |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | $entities = $em->getRepository($this->entity_class)->findAll(); |
187 | 187 | |
188 | - return $exporter->exportEntityFromRequest($entities,$request); |
|
188 | + return $exporter->exportEntityFromRequest($entities, $request); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | protected function _exportEntity(NamedDBElement $entity, EntityExporter $exporter, Request $request) |