Completed
Push — master ( ead248...b4a211 )
by Gaetano
06:23
created
Core/Matcher/ContentVersionMatcher.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $versions = array();
46 46
 
47 47
         $contentCollection = $this->contentMatcher->match($contentConditions, $sort, $offset, $limit);
48
-        foreach($contentCollection as $content) {
48
+        foreach ($contentCollection as $content) {
49 49
             $versions = array_merge($versions, $this->matchContentVersions($versionConditions, $content));
50 50
         }
51 51
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $versions = array();
153 153
         foreach ($this->findAllContentVersions($content) as $versionKey => $versionInfo) {
154
-            foreach($values as $acceptedStatus) {
154
+            foreach ($values as $acceptedStatus) {
155 155
                 if ($versionInfo->status == self::STATUS_MAP[$acceptedStatus]) {
156 156
                     $versions[$versionKey] = $versionInfo;
157 157
                     break;
@@ -173,15 +173,15 @@  discard block
 block discarded – undo
173 173
         $contentVersionsCount = count($contentVersions);
174 174
         $i = 0;
175 175
         foreach ($contentVersions as $versionKey => $versionInfo) {
176
-            foreach($values as $acceptedVersionNo) {
177
-                if ($acceptedVersionNo > 0 ) {
176
+            foreach ($values as $acceptedVersionNo) {
177
+                if ($acceptedVersionNo > 0) {
178 178
                     if ($acceptedVersionNo == $versionInfo->versionNo) {
179 179
                         $versions[$versionKey] = $versionInfo;
180 180
                         break;
181 181
                     }
182 182
                 } else {
183 183
                     // negative $acceptedVersionNo means 'leave the last X versions', eg: -1 = leave the last version
184
-                    if ($i < $contentVersionsCount + $acceptedVersionNo)  {
184
+                    if ($i < $contentVersionsCount + $acceptedVersionNo) {
185 185
                         $versions[$versionKey] = $versionInfo;
186 186
                         break;
187 187
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $contentVersions = $this->repository->getContentService()->loadVersions($content->contentInfo);
203 203
         // different eZ kernels apparently sort versions in different order...
204 204
         $sortedVersions = array();
205
-        foreach($contentVersions as $versionInfo) {
205
+        foreach ($contentVersions as $versionInfo) {
206 206
             $sortedVersions[$content->contentInfo->id . '/' . $versionInfo->versionNo] = $versionInfo;
207 207
         }
208 208
         ksort($sortedVersions);
Please login to merge, or discard this patch.