Completed
Push — support/2.0 ( caf4ac...243edf )
by Vítor
03:02
created
PPI/Module/Controller.php 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -254,34 +254,34 @@
 block discarded – undo
254 254
     {
255 255
         switch ($key = strtolower($key)) {
256 256
 
257
-            case 'ajax':
258
-                if (!isset($this->_isCache['ajax'])) {
259
-                    return $this->_isCache['ajax'] = $this->getService('request')->isXmlHttpRequest();
260
-                }
261
-
262
-                return $this->_isCache['ajax'];
263
-
264
-            case 'put':
265
-            case 'delete':
266
-            case 'post':
267
-            case 'patch':
268
-                if (!isset($this->_isCache['requestMethod'][$key])) {
269
-                    $this->_isCache['requestMethod'][$key] = $this->getService('request')->getMethod() === strtoupper($key);
270
-                }
271
-
272
-                return $this->_isCache['requestMethod'][$key];
273
-
274
-            case 'ssl':
275
-            case 'https':
276
-            case 'secure':
277
-                if (!isset($this->_isCache['secure'])) {
278
-                    $this->_isCache['secure'] = $this->getService('request')->isSecure();
279
-                }
280
-
281
-                return $this->_isCache['secure'];
282
-
283
-            default:
284
-                throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");
257
+        case 'ajax':
258
+            if (!isset($this->_isCache['ajax'])) {
259
+                return $this->_isCache['ajax'] = $this->getService('request')->isXmlHttpRequest();
260
+            }
261
+
262
+            return $this->_isCache['ajax'];
263
+
264
+        case 'put':
265
+        case 'delete':
266
+        case 'post':
267
+        case 'patch':
268
+            if (!isset($this->_isCache['requestMethod'][$key])) {
269
+                $this->_isCache['requestMethod'][$key] = $this->getService('request')->getMethod() === strtoupper($key);
270
+            }
271
+
272
+            return $this->_isCache['requestMethod'][$key];
273
+
274
+        case 'ssl':
275
+        case 'https':
276
+        case 'secure':
277
+            if (!isset($this->_isCache['secure'])) {
278
+                $this->_isCache['secure'] = $this->getService('request')->isSecure();
279
+            }
280
+
281
+            return $this->_isCache['secure'];
282
+
283
+        default:
284
+            throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");
285 285
 
286 286
         }
287 287
 
Please login to merge, or discard this patch.
PPI/DataSource/DataSource.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -134,18 +134,18 @@
 block discarded – undo
134 134
     {
135 135
         switch ($type) {
136 136
 
137
-            case 'mongodb':
138
-                throw new \InvalidArgumentException('Invalid activeQueryFactory type. MongoDB not yet implemented');
139
-                break;
140
-
141
-            case 'couchdb':
142
-                throw new \InvalidArgumentException('Invalid activeQueryFactory type. CouchDB not yet implemented');
143
-                break;
144
-
145
-            case 'pdo':
146
-            default:
147
-                return new \PPI\DataSource\PDO\ActiveQuery($options);
148
-                break;
137
+        case 'mongodb':
138
+            throw new \InvalidArgumentException('Invalid activeQueryFactory type. MongoDB not yet implemented');
139
+            break;
140
+
141
+        case 'couchdb':
142
+            throw new \InvalidArgumentException('Invalid activeQueryFactory type. CouchDB not yet implemented');
143
+            break;
144
+
145
+        case 'pdo':
146
+        default:
147
+            return new \PPI\DataSource\PDO\ActiveQuery($options);
148
+            break;
149 149
         }
150 150
     }
151 151
 
Please login to merge, or discard this patch.
PPI/App.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -263,15 +263,15 @@
 block discarded – undo
263 263
         switch (true) {
264 264
 
265 265
             // If the controller is just returning HTML content then that becomes our body response.
266
-            case is_string($result):
267
-            case is_null($result):
268
-                $this->_response = $controller->getServiceLocator()->get('response');
269
-                $this->_response->setContent($result);
270
-                break;
271
-
272
-            case $result instanceof Response:
273
-                $this->_response = $result;
274
-                break;
266
+        case is_string($result):
267
+        case is_null($result):
268
+            $this->_response = $controller->getServiceLocator()->get('response');
269
+            $this->_response->setContent($result);
270
+            break;
271
+
272
+        case $result instanceof Response:
273
+            $this->_response = $result;
274
+            break;
275 275
 
276 276
         }
277 277
 
Please login to merge, or discard this patch.