@@ -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(); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | /** |
| 51 | 51 | * @param $value |
| 52 | 52 | */ |
| 53 | - public function addStatusMapping($key,$value) |
|
| 53 | + public function addStatusMapping($key, $value) |
|
| 54 | 54 | { |
| 55 | 55 | $this->status_mapping[$key] = $value; |
| 56 | 56 | } |
@@ -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(); |
@@ -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 | } |
@@ -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) |
@@ -143,8 +143,8 @@ |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
| 146 | - * @return string |
|
| 147 | - */ |
|
| 146 | + * @return string |
|
| 147 | + */ |
|
| 148 | 148 | public function getKey() |
| 149 | 149 | { |
| 150 | 150 | return $this->key; |
@@ -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 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | /** |
| 51 | 51 | * @param $value |
| 52 | 52 | */ |
| 53 | - public function addTransactionstatusForwarding($value){ |
|
| 53 | + public function addTransactionstatusForwarding($value) { |
|
| 54 | 54 | $this->transactionstatus_forwarding[] = $value; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | $this->addChild($globalXml, $globalConfig, 'aid'); |
| 174 | 174 | $this->addChild($globalXml, $globalConfig, 'portalid'); |
| 175 | 175 | $this->addChild($globalXml, $globalConfig, 'request_type'); |
| 176 | - $this->mapParameterInvoice($globalConfig,$globalXml); |
|
| 176 | + $this->mapParameterInvoice($globalConfig, $globalXml); |
|
| 177 | 177 | $this->addStatusMapping($globalConfig, $globalXml); |
| 178 | - $this->mapPaymentCreditcard($globalConfig,$globalXml); |
|
| 178 | + $this->mapPaymentCreditcard($globalConfig, $globalXml); |
|
| 179 | 179 | return $shopXml; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | */ |
| 215 | 215 | protected function mapProtect(Payone_Settings_Data_ConfigFile_Shop_Protect $protectConfig, DOMElement $shopXml) |
| 216 | 216 | { |
| 217 | - $protectXml = $this->appendElement($shopXml,$protectConfig->getKey()); |
|
| 217 | + $protectXml = $this->appendElement($shopXml, $protectConfig->getKey()); |
|
| 218 | 218 | |
| 219 | 219 | $protectXml = $this->mapConsumerscore($protectConfig->getConsumerscore(), $protectXml); |
| 220 | 220 | $protectXml = $this->mapAddresscheck($protectConfig->getAddresscheck(), $protectXml); |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | $tasXml = $this->appendElement($miscXml, $tasForwarding->getKey()); |
| 322 | 322 | |
| 323 | 323 | foreach ($tasForwarding->getTransactionstatusForwarding() as $keyTas => $config) { |
| 324 | - $configNode = $this->appendElement($tasXml,'config'); |
|
| 324 | + $configNode = $this->appendElement($tasXml, 'config'); |
|
| 325 | 325 | |
| 326 | 326 | foreach ($config as $key => $value) { |
| 327 | 327 | $configNode->setAttribute($key, $value); |
@@ -336,10 +336,10 @@ discard block |
||
| 336 | 336 | public function addStatusMapping(Payone_Settings_Data_ConfigFile_Shop_Global $globalConfig, DOMElement $globalXml) |
| 337 | 337 | { |
| 338 | 338 | $statusMapping = $globalConfig->getStatusMapping(); |
| 339 | - $tasXml = $this->appendElement($globalXml,$statusMapping->getKey()); |
|
| 339 | + $tasXml = $this->appendElement($globalXml, $statusMapping->getKey()); |
|
| 340 | 340 | |
| 341 | 341 | foreach ($statusMapping->getStatusMapping() as $keyStatusMapping => $valueStatusMapping) { |
| 342 | - $parent = $this->appendElement($tasXml,$keyStatusMapping); |
|
| 342 | + $parent = $this->appendElement($tasXml, $keyStatusMapping); |
|
| 343 | 343 | |
| 344 | 344 | foreach ($valueStatusMapping as $key => $value) { |
| 345 | 345 | $mapNode = $this->appendElement($parent, 'map'); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | { |
| 386 | 386 | $feeConfig = $valueClearingType->getFeeConfig(); |
| 387 | 387 | if (!empty($feeConfig)) { |
| 388 | - $feeConfigNode = $this->appendElement($cleatringTypeNode,'fee_config'); |
|
| 388 | + $feeConfigNode = $this->appendElement($cleatringTypeNode, 'fee_config'); |
|
| 389 | 389 | |
| 390 | 390 | foreach ($feeConfig as $keyFeeConfig => $valueFeeConfig) { |
| 391 | 391 | if (array_key_exists('value', $valueFeeConfig) && array_key_exists('attribute', $valueFeeConfig)) { |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | $data = $object->$getter(); |
| 412 | 412 | $child = $parent; |
| 413 | 413 | if (is_array($data)) { |
| 414 | - $parentNode = $this->appendElement($parent,$property); |
|
| 414 | + $parentNode = $this->appendElement($parent, $property); |
|
| 415 | 415 | foreach ($data as $key => $value) { |
| 416 | 416 | $child = $this->appendElement($parentNode, $key, $value, $withCdata); |
| 417 | 417 | } |
@@ -452,9 +452,9 @@ discard block |
||
| 452 | 452 | * @param bool $asCdata |
| 453 | 453 | * @return DOMElement |
| 454 | 454 | */ |
| 455 | - protected function appendElement( $parent, $key, $value = null, $asCdata = false) |
|
| 455 | + protected function appendElement($parent, $key, $value = null, $asCdata = false) |
|
| 456 | 456 | { |
| 457 | - if($asCdata === true) |
|
| 457 | + if ($asCdata === true) |
|
| 458 | 458 | { |
| 459 | 459 | $cdata = $this->dom->createCDATASection($value); |
| 460 | 460 | $child = $this->dom->createElement($key); |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | else |
| 464 | 464 | { |
| 465 | 465 | $child = $this->dom->createElement($key); |
| 466 | - if($value !== null) |
|
| 466 | + if ($value !== null) |
|
| 467 | 467 | { |
| 468 | 468 | $domValue = $this->dom->createTextNode($value); |
| 469 | 469 | $child->appendChild($domValue); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | foreach ($objectArray as $key => $value) { |
| 79 | 79 | |
| 80 | - if($value instanceof Payone_Api_Response_Parameter_Interface){ |
|
| 80 | + if ($value instanceof Payone_Api_Response_Parameter_Interface) { |
|
| 81 | 81 | $stringArray[] = $this->apply($value->toArray()); |
| 82 | 82 | } elseif ($value !== null) { |
| 83 | 83 | $filter = $this->getFilterConfig($key); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | public function setFilters(array $filters) |
| 121 | 121 | { |
| 122 | 122 | $this->filters = array(); |
| 123 | - foreach($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value) |
|
| 123 | + foreach ($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value) |
|
| 124 | 124 | { |
| 125 | 125 | $this->addFilter($value); |
| 126 | 126 | } |
@@ -153,8 +153,8 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | public function getFilterConfig($key) |
| 155 | 155 | { |
| 156 | - foreach($this->filters_config as $filter => $config) { |
|
| 157 | - if(in_array($key, $config)) { |
|
| 156 | + foreach ($this->filters_config as $filter => $config) { |
|
| 157 | + if (in_array($key, $config)) { |
|
| 158 | 158 | return $this->getFilter($filter); |
| 159 | 159 | } |
| 160 | 160 | } |