@@ -75,8 +75,7 @@ |
||
| 75 | 75 | $response = $this->getMapperResponse()->map($responseRaw); |
| 76 | 76 | |
| 77 | 77 | $this->protocol($request, $response); |
| 78 | - } |
|
| 79 | - catch (Exception $e) { |
|
| 78 | + } catch (Exception $e) { |
|
| 80 | 79 | $this->protocolException($e, $request); |
| 81 | 80 | throw $e; |
| 82 | 81 | } |
@@ -107,14 +107,16 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | $this->config = $this->getDefaultConfigData(); |
| 110 | - } |
|
| 111 | - else { |
|
| 112 | - if(array_key_exists('api', $data)) |
|
| 113 | - $this->setApiConfig($data['api']); |
|
| 114 | - if(array_key_exists('transaction_status', $data)) |
|
| 115 | - $this->setTransactionStatusConfig($data['transaction_status']); |
|
| 116 | - if(array_key_exists('session_status', $data)) |
|
| 117 | - $this->setSessionStatusConfig($data['session_status']); |
|
| 110 | + } else { |
|
| 111 | + if(array_key_exists('api', $data)) { |
|
| 112 | + $this->setApiConfig($data['api']); |
|
| 113 | + } |
|
| 114 | + if(array_key_exists('transaction_status', $data)) { |
|
| 115 | + $this->setTransactionStatusConfig($data['transaction_status']); |
|
| 116 | + } |
|
| 117 | + if(array_key_exists('session_status', $data)) { |
|
| 118 | + $this->setSessionStatusConfig($data['session_status']); |
|
| 119 | + } |
|
| 118 | 120 | $this->config = $data; |
| 119 | 121 | } |
| 120 | 122 | } |
@@ -173,8 +175,7 @@ discard block |
||
| 173 | 175 | $object = $tree[$currentKey]; |
| 174 | 176 | $object->setValue($newKey, $value); |
| 175 | 177 | return TRUE; |
| 176 | - } |
|
| 177 | - else { |
|
| 178 | + } else { |
|
| 178 | 179 | // Set value (can overwrite an existing value) |
| 179 | 180 | $tree[$key] = $value; |
| 180 | 181 | // Exit recursion, Success! |
@@ -208,11 +209,9 @@ discard block |
||
| 208 | 209 | /** @var $object Payone_Config_Abstract */ |
| 209 | 210 | $object = $tree[$currentKey]; |
| 210 | 211 | return $object->getValue($newKey); |
| 211 | - } |
|
| 212 | - elseif (is_array($tree) and array_key_exists($key, $tree)) { |
|
| 212 | + } elseif (is_array($tree) and array_key_exists($key, $tree)) { |
|
| 213 | 213 | return $tree[$key]; // Exit recursion, Success! |
| 214 | - } |
|
| 215 | - else { |
|
| 214 | + } else { |
|
| 216 | 215 | return NULL; // Exit recursion, unsuccessful |
| 217 | 216 | } |
| 218 | 217 | } |