@@ -60,7 +60,7 @@ |
||
| 60 | 60 | /** |
| 61 | 61 | * Always returns false. |
| 62 | 62 | * Because LoggerRoot has no parents, it returns false. |
| 63 | - * @param Logger $parent |
|
| 63 | + * @param Payone_Log4php_Logger $parent |
|
| 64 | 64 | * @return boolean |
| 65 | 65 | */ |
| 66 | 66 | public function setParent(Payone_Log4php_Logger $parent) { |
@@ -26,45 +26,45 @@ |
||
| 26 | 26 | * @see Logger |
| 27 | 27 | */ |
| 28 | 28 | class Payone_Log4php_LoggerRoot extends Payone_Log4php_Logger { |
| 29 | - /** |
|
| 30 | - * Constructor |
|
| 31 | - * |
|
| 32 | - * @param integer $level initial log level |
|
| 33 | - */ |
|
| 34 | - public function __construct($level = null) { |
|
| 35 | - parent::__construct('root'); |
|
| 29 | + /** |
|
| 30 | + * Constructor |
|
| 31 | + * |
|
| 32 | + * @param integer $level initial log level |
|
| 33 | + */ |
|
| 34 | + public function __construct($level = null) { |
|
| 35 | + parent::__construct('root'); |
|
| 36 | 36 | |
| 37 | - if($level == null) { |
|
| 38 | - $level = Payone_Log4php_LoggerLevel::getLevelAll(); |
|
| 39 | - } |
|
| 40 | - $this->setLevel($level); |
|
| 41 | - } |
|
| 37 | + if($level == null) { |
|
| 38 | + $level = Payone_Log4php_LoggerLevel::getLevelAll(); |
|
| 39 | + } |
|
| 40 | + $this->setLevel($level); |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @return Payone_Log4php_LoggerLevel the level |
|
| 45 | - */ |
|
| 46 | - public function getChainedLevel() { |
|
| 47 | - return parent::getLevel(); |
|
| 48 | - } |
|
| 43 | + /** |
|
| 44 | + * @return Payone_Log4php_LoggerLevel the level |
|
| 45 | + */ |
|
| 46 | + public function getChainedLevel() { |
|
| 47 | + return parent::getLevel(); |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * Setting a null value to the level of the root category may have catastrophic results. |
|
| 52 | - * @param Payone_Log4php_LoggerLevel $level |
|
| 53 | - */ |
|
| 54 | - public function setLevel($level) { |
|
| 55 | - if($level != null) { |
|
| 56 | - parent::setLevel($level); |
|
| 57 | - } |
|
| 58 | - } |
|
| 50 | + /** |
|
| 51 | + * Setting a null value to the level of the root category may have catastrophic results. |
|
| 52 | + * @param Payone_Log4php_LoggerLevel $level |
|
| 53 | + */ |
|
| 54 | + public function setLevel($level) { |
|
| 55 | + if($level != null) { |
|
| 56 | + parent::setLevel($level); |
|
| 57 | + } |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * Always returns false. |
|
| 62 | - * Because LoggerRoot has no parents, it returns false. |
|
| 63 | - * @param Logger $parent |
|
| 64 | - * @return boolean |
|
| 65 | - */ |
|
| 66 | - public function setParent(Payone_Log4php_Logger $parent) { |
|
| 67 | - return false; |
|
| 68 | - } |
|
| 60 | + /** |
|
| 61 | + * Always returns false. |
|
| 62 | + * Because LoggerRoot has no parents, it returns false. |
|
| 63 | + * @param Logger $parent |
|
| 64 | + * @return boolean |
|
| 65 | + */ |
|
| 66 | + public function setParent(Payone_Log4php_Logger $parent) { |
|
| 67 | + return false; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | 70 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function __construct($level = null) { |
| 35 | 35 | parent::__construct('root'); |
| 36 | 36 | |
| 37 | - if($level == null) { |
|
| 37 | + if ($level == null) { |
|
| 38 | 38 | $level = Payone_Log4php_LoggerLevel::getLevelAll(); |
| 39 | 39 | } |
| 40 | 40 | $this->setLevel($level); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @param Payone_Log4php_LoggerLevel $level |
| 53 | 53 | */ |
| 54 | 54 | public function setLevel($level) { |
| 55 | - if($level != null) { |
|
| 55 | + if ($level != null) { |
|
| 56 | 56 | parent::setLevel($level); |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @api |
| 50 | 50 | * |
| 51 | 51 | * @param Payone_Settings_Data_ConfigFile_Root $config |
| 52 | - * @return mixed @see SimpleXMLElement::asXml() |
|
| 52 | + * @return string @see SimpleXMLElement::asXml() |
|
| 53 | 53 | */ |
| 54 | 54 | public function generate(Payone_Settings_Data_ConfigFile_Root $config) |
| 55 | 55 | { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @api |
| 75 | 75 | * |
| 76 | 76 | * @param Payone_Settings_Data_ConfigFile_Root $config |
| 77 | - * @return mixed @see SimpleXMLElement::asXml() |
|
| 77 | + * @return string|false @see SimpleXMLElement::asXml() |
|
| 78 | 78 | */ |
| 79 | 79 | public function execute(Payone_Settings_Data_ConfigFile_Root $config) |
| 80 | 80 | { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | /** |
| 126 | 126 | * @param Payone_Settings_Data_ConfigFile_Shop $shopConfig |
| 127 | 127 | * @param DOMElement $configXml |
| 128 | - * @return string |
|
| 128 | + * @return DOMElement |
|
| 129 | 129 | */ |
| 130 | 130 | protected function mapShop(Payone_Settings_Data_ConfigFile_Shop $shopConfig, DOMElement $configXml) |
| 131 | 131 | { |
@@ -366,6 +366,10 @@ discard block |
||
| 366 | 366 | $this->addGlobal($cleatringTypeNode, $valueClearingType); |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | + /** |
|
| 370 | + * @param DOMElement $parent |
|
| 371 | + * @param Payone_Settings_Data_ConfigFile_PaymentMethod_Abstract $type |
|
| 372 | + */ |
|
| 369 | 373 | public function addGlobal($parent, $type) |
| 370 | 374 | { |
| 371 | 375 | |
@@ -401,7 +405,7 @@ discard block |
||
| 401 | 405 | /** |
| 402 | 406 | * @param DOMElement $parent |
| 403 | 407 | * @param $object |
| 404 | - * @param $property |
|
| 408 | + * @param string $property |
|
| 405 | 409 | * @param bool $withCdata |
| 406 | 410 | * @return DOMElement |
| 407 | 411 | */ |
@@ -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); |
@@ -109,12 +109,10 @@ discard block |
||
| 109 | 109 | foreach ($value['attribute'] as $attributKey => $attributData) { |
| 110 | 110 | $node->addAttribute($attributKey, $attributData); |
| 111 | 111 | } |
| 112 | - } |
|
| 113 | - else { |
|
| 112 | + } else { |
|
| 114 | 113 | $this->simpleXmlFromNestedArray($key, $value, $parent); |
| 115 | 114 | } |
| 116 | - } |
|
| 117 | - else { |
|
| 115 | + } else { |
|
| 118 | 116 | $parent->addChild($key, $value); |
| 119 | 117 | } |
| 120 | 118 | |
@@ -415,8 +413,7 @@ discard block |
||
| 415 | 413 | foreach ($data as $key => $value) { |
| 416 | 414 | $child = $this->appendElement($parentNode, $key, $value, $withCdata); |
| 417 | 415 | } |
| 418 | - } |
|
| 419 | - else { |
|
| 416 | + } else { |
|
| 420 | 417 | if (isset($data)) { |
| 421 | 418 | $child = $this->appendElement($parent, $property, $data, $withCdata); |
| 422 | 419 | } |
@@ -436,8 +433,7 @@ discard block |
||
| 436 | 433 | foreach ($value as $key => $data) { |
| 437 | 434 | $mapNode->setAttribute($key, $data); |
| 438 | 435 | } |
| 439 | - } |
|
| 440 | - else { |
|
| 436 | + } else { |
|
| 441 | 437 | if (!empty($data)) { |
| 442 | 438 | $mapNode->setAttribute($name, $value); |
| 443 | 439 | } |
@@ -459,8 +455,7 @@ discard block |
||
| 459 | 455 | $cdata = $this->dom->createCDATASection($value); |
| 460 | 456 | $child = $this->dom->createElement($key); |
| 461 | 457 | $child->appendChild($cdata); |
| 462 | - } |
|
| 463 | - else |
|
| 458 | + } else |
|
| 464 | 459 | { |
| 465 | 460 | $child = $this->dom->createElement($key); |
| 466 | 461 | if($value !== null) |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * @param $key |
|
| 56 | + * @param string $key |
|
| 57 | 57 | * @return Payone_TransactionStatus_Service_HandleRequest |
| 58 | 58 | * @throws Exception |
| 59 | 59 | */ |
@@ -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 | } |
@@ -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) |