@@ -82,7 +82,7 @@ |
||
82 | 82 | //$result = iterator_to_array($recursiveIterator); |
83 | 83 | |
84 | 84 | //We can not use iterator_to_array here or we get only the parent elements |
85 | - foreach($recursiveIterator as $item) { |
|
85 | + foreach ($recursiveIterator as $item) { |
|
86 | 86 | $result[] = $item; |
87 | 87 | } |
88 | 88 |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function getGenericTree(string $class, ?StructuralDBElement $parent = null) : array |
87 | 87 | { |
88 | - if(!is_a($class, StructuralDBElement::class, true)) { |
|
88 | + if (!is_a($class, StructuralDBElement::class, true)) { |
|
89 | 89 | throw new \InvalidArgumentException('$class must be a class string that implements StructuralDBElement!'); |
90 | 90 | } |
91 | - if($parent !== null && !is_a($parent, $class)) { |
|
91 | + if ($parent !== null && !is_a($parent, $class)) { |
|
92 | 92 | throw new \InvalidArgumentException('$parent must be of the type class!'); |
93 | 93 | } |
94 | 94 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $secure_class_name = str_replace('\\', '_', $class); |
104 | 104 | $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name; |
105 | 105 | |
106 | - $ret = $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
106 | + $ret = $this->cache->get($key, function(ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
107 | 107 | // Invalidate when groups, a element with the class or the user changes |
108 | 108 | $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]); |
109 | 109 | return $repo->getGenericNodeTree($parent); |