@@ -117,10 +117,10 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function getGenericTree(string $class, ?StructuralDBElement $parent = null) : array |
119 | 119 | { |
120 | - if(!is_a($class, NamedDBElement::class, true)) { |
|
120 | + if (!is_a($class, NamedDBElement::class, true)) { |
|
121 | 121 | throw new \InvalidArgumentException('$class must be a class string that implements StructuralDBElement or NamedDBElement!'); |
122 | 122 | } |
123 | - if($parent !== null && !is_a($parent, $class)) { |
|
123 | + if ($parent !== null && !is_a($parent, $class)) { |
|
124 | 124 | throw new \InvalidArgumentException('$parent must be of the type $class!'); |
125 | 125 | } |
126 | 126 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $secure_class_name = str_replace('\\', '_', $class); |
136 | 136 | $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name; |
137 | 137 | |
138 | - $ret = $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
138 | + $ret = $this->cache->get($key, function(ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
139 | 139 | // Invalidate when groups, a element with the class or the user changes |
140 | 140 | $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]); |
141 | 141 | return $repo->getGenericNodeTree($parent); |