@@ -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(); |
@@ -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) |
@@ -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); |
@@ -112,14 +112,14 @@ discard block |
||
| 112 | 112 | * @return Logger Logger instance. |
| 113 | 113 | */ |
| 114 | 114 | public function getLogger($name) { |
| 115 | - if(!isset($this->loggers[$name])) { |
|
| 115 | + if (!isset($this->loggers[$name])) { |
|
| 116 | 116 | $logger = new Payone_Log4php_Logger($name); |
| 117 | 117 | |
| 118 | 118 | $nodes = explode('.', $name); |
| 119 | 119 | $firstNode = array_shift($nodes); |
| 120 | 120 | |
| 121 | 121 | // if name is not a first node but another first node is their |
| 122 | - if($firstNode != $name and isset($this->loggers[$firstNode])) { |
|
| 122 | + if ($firstNode != $name and isset($this->loggers[$firstNode])) { |
|
| 123 | 123 | $logger->setParent($this->loggers[$firstNode]); |
| 124 | 124 | } else { |
| 125 | 125 | // if there is no father, set root logger as father |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // if there are more nodes than one |
| 130 | - if(count($nodes) > 0) { |
|
| 130 | + if (count($nodes) > 0) { |
|
| 131 | 131 | // find parent node |
| 132 | - foreach($nodes as $node) { |
|
| 132 | + foreach ($nodes as $node) { |
|
| 133 | 133 | $parentNode = "$firstNode.$node"; |
| 134 | - if(isset($this->loggers[$parentNode]) and $parentNode != $name) { |
|
| 134 | + if (isset($this->loggers[$parentNode]) and $parentNode != $name) { |
|
| 135 | 135 | $logger->setParent($this->loggers[$parentNode]); |
| 136 | 136 | } |
| 137 | 137 | $firstNode .= ".$node"; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @return Payone_Log4php_LoggerRoot |
| 158 | 158 | */ |
| 159 | 159 | public function getRootLogger() { |
| 160 | - if(!isset($this->root) or $this->root == null) { |
|
| 160 | + if (!isset($this->root) or $this->root == null) { |
|
| 161 | 161 | $this->root = new Payone_Log4php_LoggerRoot(); |
| 162 | 162 | } |
| 163 | 163 | return $this->root; |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $this->setThreshold(Payone_Log4php_LoggerLevel::getLevelAll()); |
| 202 | 202 | $this->shutDown(); |
| 203 | 203 | |
| 204 | - foreach($this->loggers as $logger) { |
|
| 204 | + foreach ($this->loggers as $logger) { |
|
| 205 | 205 | $logger->setLevel(null); |
| 206 | 206 | $logger->setAdditivity(true); |
| 207 | 207 | $logger->removeAllAppenders(); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | public function shutdown() { |
| 234 | 234 | $this->root->removeAllAppenders(); |
| 235 | 235 | |
| 236 | - foreach($this->loggers as $logger) { |
|
| 236 | + foreach ($this->loggers as $logger) { |
|
| 237 | 237 | $logger->removeAllAppenders(); |
| 238 | 238 | } |
| 239 | 239 | } |
@@ -42,9 +42,9 @@ |
||
| 42 | 42 | class Payone_Log4php_LoggerAppenderPhp extends Payone_Log4php_LoggerAppender { |
| 43 | 43 | |
| 44 | 44 | public function append(Payone_Log4php_LoggerLoggingEvent $event) { |
| 45 | - if($this->layout !== null) { |
|
| 45 | + if ($this->layout !== null) { |
|
| 46 | 46 | $level = $event->getLevel(); |
| 47 | - if($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelError())) { |
|
| 47 | + if ($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelError())) { |
|
| 48 | 48 | trigger_error($this->layout->format($event), E_USER_ERROR); |
| 49 | 49 | } else if ($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelWarn())) { |
| 50 | 50 | trigger_error($this->layout->format($event), E_USER_WARNING); |