Completed
Pull Request — master (#1198)
by Martin Poirier
13:10
created
src/Exclusion/GroupsExclusionStrategy.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         foreach ($groups as $key => $value) {
45 45
             if (is_string($key) && is_array($value)) {
46 46
                 $this->nestedGroups = true;
47
-                $this->prepare($value, $path . '.' . $key);
47
+                $this->prepare($value, $path.'.'.$key);
48 48
                 continue;
49 49
             }
50 50
 
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function shouldSkipProperty(PropertyMetadata $property, Context $navigatorContext): bool
73 73
     {
74
-        if (!$this->nestedGroups) {
75
-            if(!$property->groups) {
76
-                return !isset($this->rootGroups[self::DEFAULT_GROUP]);
74
+        if ( ! $this->nestedGroups) {
75
+            if ( ! $property->groups) {
76
+                return ! isset($this->rootGroups[self::DEFAULT_GROUP]);
77 77
             }
78 78
 
79 79
             foreach ($property->groups as $group) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         } else {
86 86
             $groups = $property->groups ?: [self::DEFAULT_GROUP];
87 87
             $path = $this->buildPathFromContext($navigatorContext);
88
-            if(!isset($this->parsedGroups[$path])) {
88
+            if ( ! isset($this->parsedGroups[$path])) {
89 89
                 // If we reach that path it's because we were allowed so we fallback on default group
90 90
                 $this->parsedGroups[$path] = [self::DEFAULT_GROUP => true];
91 91
             }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
     private function buildPathFromContext(Context $navigatorContext): string
106 106
     {
107
-        return '.' . implode('.', $navigatorContext->getCurrentPath());
107
+        return '.'.implode('.', $navigatorContext->getCurrentPath());
108 108
     }
109 109
 
110 110
     /**
@@ -112,21 +112,21 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function getGroupsFor(Context $navigatorContext): array
114 114
     {
115
-        if (!$this->nestedGroups) {
115
+        if ( ! $this->nestedGroups) {
116 116
             return array_keys($this->rootGroups);
117 117
         }
118 118
 
119 119
         $paths = $navigatorContext->getCurrentPath();
120 120
         $groups = $this->groups;
121 121
         foreach ($paths as $index => $path) {
122
-            if (!array_key_exists($path, $groups)) {
122
+            if ( ! array_key_exists($path, $groups)) {
123 123
                 if ($index > 0) {
124 124
                     $groups = [self::DEFAULT_GROUP];
125 125
                 }
126 126
                 break;
127 127
             }
128 128
             $groups = $groups[$path];
129
-            if (!array_filter($groups, 'is_string')) {
129
+            if ( ! array_filter($groups, 'is_string')) {
130 130
                 $groups += [self::DEFAULT_GROUP];
131 131
             }
132 132
         }
Please login to merge, or discard this patch.