Completed
Push — master ( 4786ff...ea6359 )
by Adriano
02:42
created
src/FipeApi/Client.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,17 +34,19 @@
 block discarded – undo
34 34
         {
35 35
             foreach ($params as $key => $param)
36 36
             {
37
-                if(!in_array($key, array_keys($params)))
38
-                    throw new \Exception(sprintf("Parâmetro %s inválido", $key));
37
+                if(!in_array($key, array_keys($params))) {
38
+                                    throw new \Exception(sprintf("Parâmetro %s inválido", $key));
39
+                }
39 40
             }
40 41
         }
41 42
 
42 43
         putenv(sprintf("%s=%s", FipeApiParameter::FIPE_API_HOST, Client::DEFAULT_URL));
43 44
         putenv(sprintf("%s=%s", FipeApiParameter::FIPE_API_TIMEOUT, Client::DEFAULT_TIMEOUT));
44 45
 
45
-        if(!is_null($params) && is_array($params))
46
-            foreach ($params as $key => $value)
46
+        if(!is_null($params) && is_array($params)) {
47
+                    foreach ($params as $key => $value)
47 48
                 putenv(sprintf("%s=%s",$key,$value));
49
+        }
48 50
 
49 51
     }
50 52
 
Please login to merge, or discard this patch.