Completed
Push — master ( b5854b...1ca308 )
by Joao
02:16
created
example.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 $webRequest = new \ByJG\Util\WebRequest('http://www.byjg.com.br/ws/cep');
6 6
 
7 7
 echo $webRequest->get([
8
-	'httpmethod' => 'obterVersao'
8
+    'httpmethod' => 'obterVersao'
9 9
 ]) . "\n";
10 10
 
11 11
 echo $webRequest->post([
12
-	'httpmethod' => 'obterLogradouro',
13
-	'cep' => '30130000'
12
+    'httpmethod' => 'obterLogradouro',
13
+    'cep' => '30130000'
14 14
 ]) . "\n";
15 15
 
16 16
 echo $webRequest->soapCall('obterLogradouro', ['cep' => '30130000']) . "\n";
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
 
7 7
 echo $webRequest->get([
8 8
 	'httpmethod' => 'obterVersao'
9
-]) . "\n";
9
+])."\n";
10 10
 
11 11
 echo $webRequest->post([
12 12
 	'httpmethod' => 'obterLogradouro',
13 13
 	'cep' => '30130000'
14
-]) . "\n";
14
+])."\n";
15 15
 
16
-echo $webRequest->soapCall('obterLogradouro', ['cep' => '30130000']) . "\n";
16
+echo $webRequest->soapCall('obterLogradouro', ['cep' => '30130000'])."\n";
Please login to merge, or discard this patch.
src/Whoops/PlainResponseHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
         $debug = $this->getDataTable();
52 52
         if (count($debug) > 0) {
53
-            $response .= "\n\n" . json_encode(["debug" => $debug]);
53
+            $response .= "\n\n".json_encode(["debug" => $debug]);
54 54
         }
55 55
 
56 56
         $this->setProperHeader($this->getException());
Please login to merge, or discard this patch.
src/ErrorHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         if (method_exists($this->_handler, 'addDataTable')) {
80 80
             $data = $this->_handler->getDataTable();
81
-            $this->_handler->addDataTable('Info #' . (count($data) + 1), array($name => $value));
81
+            $this->_handler->addDataTable('Info #'.(count($data) + 1), array($name => $value));
82 82
         }
83 83
     }
84 84
 }
Please login to merge, or discard this patch.
src/HttpRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,11 +180,11 @@
 block discarded – undo
180 180
         }
181 181
 
182 182
         if ($port && $this->server('SERVER_PORT' !== false)) {
183
-            $servername .= ':' . $this->server('SERVER_PORT');
183
+            $servername .= ':'.$this->server('SERVER_PORT');
184 184
         }
185 185
 
186 186
         if ($protocol) {
187
-            $servername = (($this->server('HTTPS') !== 'off' || $this->server('SERVER_PORT') == 443) ? "https://" : "http://") . $servername;
187
+            $servername = (($this->server('HTTPS') !== 'off' || $this->server('SERVER_PORT') == 443) ? "https://" : "http://").$servername;
188 188
         }
189 189
 
190 190
         return $servername;
Please login to merge, or discard this patch.
src/RouteHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $queryStr);
108 108
 
109 109
         // Generic Dispatcher for RestServer
110
-        $dispatcher = \FastRoute\simpleDispatcher(function (RouteCollector $r) {
110
+        $dispatcher = \FastRoute\simpleDispatcher(function(RouteCollector $r) {
111 111
 
112 112
             foreach ($this->getDefaultMethods() as $route) {
113 113
                 $r->addRoute(
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 if (isset($moduleAlias[$vars['module']])) {
140 140
                     $vars['module'] = $moduleAlias[$vars['module']];
141 141
                 }
142
-                $vars['module'] = '\\' . str_replace('.', '\\', $vars['module']);
142
+                $vars['module'] = '\\'.str_replace('.', '\\', $vars['module']);
143 143
 
144 144
                 // Define output
145 145
                 if (!isset($vars['output'])) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         // Execute the method
213 213
         $method = strtolower($instance->getRequest()->server("REQUEST_METHOD")); // get, post, put, delete
214
-        $customAction = $method . ($instance->getRequest()->get('action'));
214
+        $customAction = $method.($instance->getRequest()->get('action'));
215 215
         if (method_exists($instance, $customAction)) {
216 216
             $instance->$customAction();
217 217
         } else {
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             if (strpos($file, '.php') !== false) {
310 310
                 require_once($file);
311 311
             } else {
312
-                header("Content-Type: " . RouteHandler::mimeContentType($file));
312
+                header("Content-Type: ".RouteHandler::mimeContentType($file));
313 313
 
314 314
                 echo file_get_contents($file);
315 315
             }
Please login to merge, or discard this patch.
src/ResponseBag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function process()
25 25
     {
26 26
         $collection = (array)$this->collection;
27
-        if (count($collection)===1) {
27
+        if (count($collection) === 1) {
28 28
             $collection = $collection[0];
29 29
         }
30 30
         
Please login to merge, or discard this patch.