Passed
Push — master ( 9668d1...ad69c3 )
by Jan
04:30
created
src/Services/Trees/TreeViewGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.