@@ -38,8 +38,9 @@ discard block |
||
38 | 38 | { |
39 | 39 | foreach ($params as $key => $param) |
40 | 40 | { |
41 | - if(!in_array($key, array_keys($params))) |
|
42 | - throw new \Exception(sprintf("Parâmetro %s inválido", $key)); |
|
41 | + if(!in_array($key, array_keys($params))) { |
|
42 | + throw new \Exception(sprintf("Parâmetro %s inválido", $key)); |
|
43 | + } |
|
43 | 44 | } |
44 | 45 | } |
45 | 46 | |
@@ -48,8 +49,9 @@ discard block |
||
48 | 49 | |
49 | 50 | if(!is_null($params) && is_array($params)) |
50 | 51 | { |
51 | - foreach ($params as $key => $value) |
|
52 | - putenv(sprintf("%s=%s",$key,$value)); |
|
52 | + foreach ($params as $key => $value) { |
|
53 | + putenv(sprintf("%s=%s",$key,$value)); |
|
54 | + } |
|
53 | 55 | } |
54 | 56 | } |
55 | 57 |
@@ -38,8 +38,9 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function __construct($tipo, Client $client = null) |
40 | 40 | { |
41 | - if(is_null($this->logger)) |
|
42 | - $this->logger = \Logger::getLogger(__CLASS__); |
|
41 | + if(is_null($this->logger)) { |
|
42 | + $this->logger = \Logger::getLogger(__CLASS__); |
|
43 | + } |
|
43 | 44 | |
44 | 45 | $this->_curl = new Curl(); |
45 | 46 | $this->tipo = $tipo; |
@@ -47,7 +48,7 @@ discard block |
||
47 | 48 | if(is_null($client)) |
48 | 49 | { |
49 | 50 | $this->client = new Client(); |
50 | - }else{ |
|
51 | + } else{ |
|
51 | 52 | $this->client = $client; |
52 | 53 | } |
53 | 54 | |
@@ -65,7 +66,7 @@ discard block |
||
65 | 66 | $this->tipo) |
66 | 67 | ); |
67 | 68 | return $this->getResponse(); |
68 | - }catch(\Exception $ex){ |
|
69 | + } catch(\Exception $ex){ |
|
69 | 70 | $this->logger->error("Falha ao executar requisição", $ex); |
70 | 71 | throw new \Exception($ex->getMessage()); |
71 | 72 | } |
@@ -86,7 +87,7 @@ discard block |
||
86 | 87 | $fabricante) |
87 | 88 | ); |
88 | 89 | return $this->getResponse(); |
89 | - }catch(\Exception $ex){ |
|
90 | + } catch(\Exception $ex){ |
|
90 | 91 | $this->logger->error("Falha ao executar requisição", $ex); |
91 | 92 | throw new \Exception($ex->getMessage()); |
92 | 93 | } |
@@ -109,7 +110,7 @@ discard block |
||
109 | 110 | $veiculo) |
110 | 111 | ); |
111 | 112 | return $this->getResponse(); |
112 | - }catch(\Exception $ex){ |
|
113 | + } catch(\Exception $ex){ |
|
113 | 114 | $this->logger->error("Falha ao executar requisição", $ex); |
114 | 115 | throw new \Exception($ex->getMessage()); |
115 | 116 | } |
@@ -126,7 +127,7 @@ discard block |
||
126 | 127 | $fipeCodigo) |
127 | 128 | ); |
128 | 129 | return $this->getResponse(); |
129 | - }catch(\Exception $ex){ |
|
130 | + } catch(\Exception $ex){ |
|
130 | 131 | $this->logger->error("Falha ao executar requisição", $ex); |
131 | 132 | throw new \Exception($ex->getMessage()); |
132 | 133 | } |