@@ -77,8 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | if (empty($data)) { |
| 79 | 79 | $this->config = $this->getDefaultConfigData(); |
| 80 | - } |
|
| 81 | - else { |
|
| 80 | + } else { |
|
| 82 | 81 | $this->config = $data; |
| 83 | 82 | } |
| 84 | 83 | } |
@@ -127,8 +126,7 @@ discard block |
||
| 127 | 126 | // Start recursion: |
| 128 | 127 | return $this->set($newKey, $value, $tree[$currentKey]); |
| 129 | 128 | |
| 130 | - } |
|
| 131 | - else { |
|
| 129 | + } else { |
|
| 132 | 130 | // Set value (can overwrite an existing value) |
| 133 | 131 | $tree[$key] = $value; |
| 134 | 132 | // Exit recursion, Success! |
@@ -166,16 +164,13 @@ discard block |
||
| 166 | 164 | // Reassemble key, start recursion: |
| 167 | 165 | $newKey = implode(self::KEY_SEPARATOR, $explodedKey); |
| 168 | 166 | return $this->get($newKey, $newTree); |
| 169 | - } |
|
| 170 | - else { |
|
| 167 | + } else { |
|
| 171 | 168 | return NULL; // Exit recursion, unsuccessful |
| 172 | 169 | } |
| 173 | 170 | |
| 174 | - } |
|
| 175 | - elseif (is_array($tree) and array_key_exists($key, $tree)) { |
|
| 171 | + } elseif (is_array($tree) and array_key_exists($key, $tree)) { |
|
| 176 | 172 | return $tree[$key]; // Exit recursion, Success! |
| 177 | - } |
|
| 178 | - else { |
|
| 173 | + } else { |
|
| 179 | 174 | return NULL; // Exit recursion, unsuccessful |
| 180 | 175 | } |
| 181 | 176 | } |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | if (is_array($validatorConfig)) { |
| 390 | 390 | $validator = array(); |
| 391 | 391 | foreach ($validatorConfig as $config) { |
| 392 | - if ($config === 'default' or ! class_exists($config)) { |
|
| 392 | + if ($config === 'default' or !class_exists($config)) { |
|
| 393 | 393 | return null; |
| 394 | 394 | } else { |
| 395 | 395 | $validator[] = new $config(); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | return $validator; |
| 400 | 400 | } else { |
| 401 | 401 | // Load validator by config (if non-default): |
| 402 | - if ($validatorConfig === 'default' or ! class_exists($validatorConfig)) { |
|
| 402 | + if ($validatorConfig === 'default' or !class_exists($validatorConfig)) { |
|
| 403 | 403 | return null; |
| 404 | 404 | } else { |
| 405 | 405 | $validator = new $validatorConfig(); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | protected $parameter_invoice = array(); |
| 53 | 53 | |
| 54 | 54 | /** @var Payone_Settings_Data_ConfigFile_Global_StatusMapping */ |
| 55 | - protected $status_mapping = null ; |
|
| 55 | + protected $status_mapping = null; |
|
| 56 | 56 | |
| 57 | 57 | /** @var array */ |
| 58 | 58 | protected $payment_creditcard = array(); |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | if ($value instanceof Payone_Settings_Data_ConfigFile_Interface) { |
| 59 | 59 | /** @var Payone_Api_Request_Parameter_Interface $value */ |
| 60 | 60 | $array[$value->getKey()] = $value->toArray(); |
| 61 | - } |
|
| 62 | - else { |
|
| 61 | + } else { |
|
| 63 | 62 | $array[$key] = $value; |
| 64 | 63 | } |
| 65 | 64 | } |
@@ -68,6 +68,6 @@ |
||
| 68 | 68 | |
| 69 | 69 | public function addShop($shop) |
| 70 | 70 | { |
| 71 | - return $this->shop[]=$shop; |
|
| 71 | + return $this->shop[] = $shop; |
|
| 72 | 72 | } |
| 73 | 73 | } |
@@ -50,21 +50,18 @@ |
||
| 50 | 50 | if ($data instanceof Payone_Settings_Data_ConfigFile_Interface) { |
| 51 | 51 | /** @var Payone_Api_Request_Parameter_Interface $data */ |
| 52 | 52 | $array[$key] = $data->toArray(); |
| 53 | - } |
|
| 54 | - elseif (is_array($data)) |
|
| 53 | + } elseif (is_array($data)) |
|
| 55 | 54 | { |
| 56 | 55 | foreach ($data as $innerKey => $innerValue) |
| 57 | 56 | { |
| 58 | 57 | if ($innerValue instanceof Payone_Settings_Data_ConfigFile_Interface) { |
| 59 | 58 | /** @var Payone_Api_Request_Parameter_Interface $innerValue */ |
| 60 | 59 | $array[$key][$innerValue->getKey()] = $innerValue->toArray(); |
| 61 | - } |
|
| 62 | - else { |
|
| 60 | + } else { |
|
| 63 | 61 | $array[$key][$innerKey] = $innerValue; |
| 64 | 62 | } |
| 65 | 63 | } |
| 66 | - } |
|
| 67 | - else { |
|
| 64 | + } else { |
|
| 68 | 65 | $array[$key] = $data; |
| 69 | 66 | } |
| 70 | 67 | } |
@@ -41,11 +41,11 @@ discard block |
||
| 41 | 41 | protected $title = ''; |
| 42 | 42 | |
| 43 | 43 | protected $mid = null; |
| 44 | - protected $aid =null; |
|
| 44 | + protected $aid = null; |
|
| 45 | 45 | protected $portalid = null; |
| 46 | 46 | protected $fee_config = array(); |
| 47 | 47 | protected $min_order_total = null; |
| 48 | - protected $max_order_total =null; |
|
| 48 | + protected $max_order_total = null; |
|
| 49 | 49 | /** @var string */ |
| 50 | 50 | protected $types = null; |
| 51 | 51 | /** @var string */ |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | public function addFeeConfig($value) |
| 115 | 115 | { |
| 116 | - return $this->fee_config[]=$value; |
|
| 116 | + return $this->fee_config[] = $value; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | public function setMaxOrderTotal($max_order_total) |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | /** |
| 57 | 57 | * @param string $active |
| 58 | 58 | */ |
| 59 | - public function setActive( $active) |
|
| 59 | + public function setActive($active) |
|
| 60 | 60 | { |
| 61 | 61 | $this->active = $active; |
| 62 | 62 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * @param string $authorization |
| 74 | 74 | */ |
| 75 | - public function setAuthorization( $authorization) |
|
| 75 | + public function setAuthorization($authorization) |
|
| 76 | 76 | { |
| 77 | 77 | $this->authorization = $authorization; |
| 78 | 78 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | /** |
| 89 | 89 | * @param string $countries |
| 90 | 90 | */ |
| 91 | - public function setCountries( $countries) |
|
| 91 | + public function setCountries($countries) |
|
| 92 | 92 | { |
| 93 | 93 | $this->countries = $countries; |
| 94 | 94 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | /** |
| 106 | 106 | * @param string $mode |
| 107 | 107 | */ |
| 108 | - public function setMode( $mode) |
|
| 108 | + public function setMode($mode) |
|
| 109 | 109 | { |
| 110 | 110 | $this->mode = $mode; |
| 111 | 111 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | /** |
| 122 | 122 | * @param string $newOrderStatus |
| 123 | 123 | */ |
| 124 | - public function setNewOrderStatus( $newOrderStatus) |
|
| 124 | + public function setNewOrderStatus($newOrderStatus) |
|
| 125 | 125 | { |
| 126 | 126 | $this->newOrderStatus = $newOrderStatus; |
| 127 | 127 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function __toString() |
| 64 | 64 | { |
| 65 | - if($this->applyFilters) { |
|
| 65 | + if ($this->applyFilters) { |
|
| 66 | 66 | $result = $this->applyFilters->apply($this->toArray()); |
| 67 | 67 | } else { |
| 68 | 68 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | { |
| 84 | 84 | if ($data === null) { |
| 85 | 85 | continue; |
| 86 | - } |
|
| 87 | - elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) { |
|
| 86 | + } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) { |
|
| 88 | 87 | $result[$key] = $data; |
| 89 | 88 | } |
| 90 | 89 | } |