@@ -105,7 +105,7 @@ discard block  | 
                                                    ||
| 105 | 105 | }  | 
                                                        
| 106 | 106 | |
| 107 | 107 | /**  | 
                                                        
| 108 | - * @return string  | 
                                                        |
| 108 | + * @return integer  | 
                                                        |
| 109 | 109 | */  | 
                                                        
| 110 | 110 | public function getBirthday()  | 
                                                        
| 111 | 111 |      { | 
                                                        
@@ -311,7 +311,7 @@ discard block  | 
                                                    ||
| 311 | 311 | }  | 
                                                        
| 312 | 312 | |
| 313 | 313 | /**  | 
                                                        
| 314 | - * @return string  | 
                                                        |
| 314 | + * @return integer  | 
                                                        |
| 315 | 315 | */  | 
                                                        
| 316 | 316 | public function getUserid()  | 
                                                        
| 317 | 317 |      { | 
                                                        
@@ -164,7 +164,7 @@  | 
                                                    ||
| 164 | 164 | */  | 
                                                        
| 165 | 165 | public function getCustomerid()  | 
                                                        
| 166 | 166 |      { | 
                                                        
| 167 | - // See above  | 
                                                        |
| 167 | + // See above  | 
                                                        |
| 168 | 168 | // return $this->customerid;  | 
                                                        
| 169 | 169 | }  | 
                                                        
| 170 | 170 | |
@@ -181,7 +181,7 @@  | 
                                                    ||
| 181 | 181 | }  | 
                                                        
| 182 | 182 | |
| 183 | 183 | /**  | 
                                                        
| 184 | - * @return string  | 
                                                        |
| 184 | + * @return integer  | 
                                                        |
| 185 | 185 | */  | 
                                                        
| 186 | 186 | public function getUserid()  | 
                                                        
| 187 | 187 |      { | 
                                                        
@@ -40,7 +40,6 @@  | 
                                                    ||
| 40 | 40 | protected $data = NULL;  | 
                                                        
| 41 | 41 | |
| 42 | 42 | /**  | 
                                                        
| 43 | - * @param int $key  | 
                                                        |
| 44 | 43 | * @return array  | 
                                                        
| 45 | 44 | */  | 
                                                        
| 46 | 45 | public function toArray()  | 
                                                        
@@ -231,7 +231,7 @@ discard block  | 
                                                    ||
| 231 | 231 | }  | 
                                                        
| 232 | 232 | |
| 233 | 233 | /**  | 
                                                        
| 234 | - * @param $name  | 
                                                        |
| 234 | + * @param string $name  | 
                                                        |
| 235 | 235 | * @return null|mixed  | 
                                                        
| 236 | 236 | */  | 
                                                        
| 237 | 237 | protected function get($name)  | 
                                                        
@@ -245,7 +245,7 @@ discard block  | 
                                                    ||
| 245 | 245 | |
| 246 | 246 | /**  | 
                                                        
| 247 | 247 | * @param string $name  | 
                                                        
| 248 | - * @param mixed $value  | 
                                                        |
| 248 | + * @param string $value  | 
                                                        |
| 249 | 249 | * @return boolean|null  | 
                                                        
| 250 | 250 | */  | 
                                                        
| 251 | 251 | protected function set($name, $value)  | 
                                                        
@@ -266,7 +266,7 @@ discard block  | 
                                                    ||
| 266 | 266 | $this->rawResponse = $rawResponse;  | 
                                                        
| 267 | 267 | }  | 
                                                        
| 268 | 268 | /**  | 
                                                        
| 269 | - * @return null  | 
                                                        |
| 269 | + * @return string  | 
                                                        |
| 270 | 270 | */  | 
                                                        
| 271 | 271 | public function getRawResponse()  | 
                                                        
| 272 | 272 |      { | 
                                                        
@@ -99,7 +99,7 @@  | 
                                                    ||
| 99 | 99 | |
| 100 | 100 | protected function _toString($aValue)  | 
                                                        
| 101 | 101 |      { | 
                                                        
| 102 | -        if($this->applyFilters) { | 
                                                        |
| 102 | +        if ($this->applyFilters) { | 
                                                        |
| 103 | 103 | $result = $this->applyFilters->apply($aValue);  | 
                                                        
| 104 | 104 |          } else { | 
                                                        
| 105 | 105 | $protocolFactory = new Payone_Protocol_Factory();  | 
                                                        
@@ -75,8 +75,7 @@  | 
                                                    ||
| 75 | 75 |          foreach ($this as $key => $data) { | 
                                                        
| 76 | 76 |              if ($data === null) { | 
                                                        
| 77 | 77 | continue;  | 
                                                        
| 78 | - }  | 
                                                        |
| 79 | -            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) { | 
                                                        |
| 78 | +            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) { | 
                                                        |
| 80 | 79 | $result[$key] = $data;  | 
                                                        
| 81 | 80 | }  | 
                                                        
| 82 | 81 | }  | 
                                                        
@@ -68,7 +68,7 @@ discard block  | 
                                                    ||
| 68 | 68 | /**  | 
                                                        
| 69 | 69 | * @api  | 
                                                        
| 70 | 70 | *  | 
                                                        
| 71 | - * @return Payone_ClientApi_Service_GenerateHash  | 
                                                        |
| 71 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 72 | 72 | */  | 
                                                        
| 73 | 73 | public function buildServiceClientApiGenerateHash()  | 
                                                        
| 74 | 74 |      { | 
                                                        
@@ -128,7 +128,7 @@ discard block  | 
                                                    ||
| 128 | 128 | /**  | 
                                                        
| 129 | 129 | * @api  | 
                                                        
| 130 | 130 | *  | 
                                                        
| 131 | - * @return Payone_Api_Service_Verification_3dsCheck  | 
                                                        |
| 131 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 132 | 132 | */  | 
                                                        
| 133 | 133 | public function buildServiceVerification3dsCheck()  | 
                                                        
| 134 | 134 |      { | 
                                                        
@@ -138,7 +138,7 @@ discard block  | 
                                                    ||
| 138 | 138 | /**  | 
                                                        
| 139 | 139 | * @api  | 
                                                        
| 140 | 140 | *  | 
                                                        
| 141 | - * @return Payone_Api_Service_Management_GetInvoice  | 
                                                        |
| 141 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 142 | 142 | */  | 
                                                        
| 143 | 143 | public function buildServiceManagementGetInvoice()  | 
                                                        
| 144 | 144 |      { | 
                                                        
@@ -148,7 +148,7 @@ discard block  | 
                                                    ||
| 148 | 148 | /**  | 
                                                        
| 149 | 149 | * @api  | 
                                                        
| 150 | 150 | *  | 
                                                        
| 151 | - * @return Payone_Api_Service_Management_GetFile  | 
                                                        |
| 151 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 152 | 152 | */  | 
                                                        
| 153 | 153 | public function buildServiceManagementGetFile()  | 
                                                        
| 154 | 154 |      { | 
                                                        
@@ -158,7 +158,7 @@ discard block  | 
                                                    ||
| 158 | 158 | /**  | 
                                                        
| 159 | 159 | * @api  | 
                                                        
| 160 | 160 | *  | 
                                                        
| 161 | - * @return Payone_Api_Service_Management_ManageMandate  | 
                                                        |
| 161 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 162 | 162 | */  | 
                                                        
| 163 | 163 | public function buildServiceManagementManageMandate()  | 
                                                        
| 164 | 164 |      { | 
                                                        
@@ -168,7 +168,7 @@ discard block  | 
                                                    ||
| 168 | 168 | /**  | 
                                                        
| 169 | 169 | * @api  | 
                                                        
| 170 | 170 | *  | 
                                                        
| 171 | - * @return Payone_Api_Service_Verification_AddressCheck  | 
                                                        |
| 171 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 172 | 172 | */  | 
                                                        
| 173 | 173 | public function buildServiceVerificationAddressCheck()  | 
                                                        
| 174 | 174 |      { | 
                                                        
@@ -178,7 +178,7 @@ discard block  | 
                                                    ||
| 178 | 178 | /**  | 
                                                        
| 179 | 179 | * @api  | 
                                                        
| 180 | 180 | *  | 
                                                        
| 181 | - * @return Payone_Api_Service_Verification_CreditCardCheck  | 
                                                        |
| 181 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 182 | 182 | */  | 
                                                        
| 183 | 183 | public function buildServiceVerificationCreditCardCheck()  | 
                                                        
| 184 | 184 |      { | 
                                                        
@@ -188,7 +188,7 @@ discard block  | 
                                                    ||
| 188 | 188 | /**  | 
                                                        
| 189 | 189 | * @api  | 
                                                        
| 190 | 190 | *  | 
                                                        
| 191 | - * @return Payone_Api_Service_Verification_BankAccountCheck  | 
                                                        |
| 191 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 192 | 192 | */  | 
                                                        
| 193 | 193 | public function buildServiceVerificationBankAccountCheck()  | 
                                                        
| 194 | 194 |      { | 
                                                        
@@ -198,7 +198,7 @@ discard block  | 
                                                    ||
| 198 | 198 | /**  | 
                                                        
| 199 | 199 | * @api  | 
                                                        
| 200 | 200 | *  | 
                                                        
| 201 | - * @return Payone_Api_Service_Verification_Consumerscore  | 
                                                        |
| 201 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 202 | 202 | */  | 
                                                        
| 203 | 203 | public function buildServiceVerificationConsumerscore()  | 
                                                        
| 204 | 204 |      { | 
                                                        
@@ -208,7 +208,7 @@ discard block  | 
                                                    ||
| 208 | 208 | /**  | 
                                                        
| 209 | 209 | * @api  | 
                                                        
| 210 | 210 | *  | 
                                                        
| 211 | - * @return Payone_Settings_Service_XmlGenerate  | 
                                                        |
| 211 | + * @return Payone_Api_Service_Payment_Abstract  | 
                                                        |
| 212 | 212 | */  | 
                                                        
| 213 | 213 | public function buildServiceSettingsXmlGenerate()  | 
                                                        
| 214 | 214 |      { | 
                                                        
@@ -419,7 +419,7 @@ discard block  | 
                                                    ||
| 419 | 419 |          if (is_array($validatorConfig)) { | 
                                                        
| 420 | 420 | $validator = array();  | 
                                                        
| 421 | 421 |              foreach ($validatorConfig as $config) { | 
                                                        
| 422 | -                if ($config === 'default' or ! class_exists($config)) { | 
                                                        |
| 422 | +                if ($config === 'default' or !class_exists($config)) { | 
                                                        |
| 423 | 423 | return null;  | 
                                                        
| 424 | 424 |                  } else { | 
                                                        
| 425 | 425 | $validator[] = new $config();  | 
                                                        
@@ -429,7 +429,7 @@ discard block  | 
                                                    ||
| 429 | 429 | return $validator;  | 
                                                        
| 430 | 430 |          } else { | 
                                                        
| 431 | 431 | // Load validator by config (if non-default):  | 
                                                        
| 432 | -            if ($validatorConfig === 'default' or ! class_exists($validatorConfig)) { | 
                                                        |
| 432 | +            if ($validatorConfig === 'default' or !class_exists($validatorConfig)) { | 
                                                        |
| 433 | 433 | return null;  | 
                                                        
| 434 | 434 |              } else { | 
                                                        
| 435 | 435 | $validator = new $validatorConfig();  | 
                                                        
@@ -24,7 +24,7 @@  | 
                                                    ||
| 24 | 24 | |
| 25 | 25 | /**  | 
                                                        
| 26 | 26 | * @param string $key Service Key, e.g. 'payment/refund'  | 
                                                        
| 27 | - * @return Payone_Api_Service_Payment_Authorize|Payone_Api_Service_Payment_Debit|Payone_Api_Service_Payment_Preauthorize|Payone_Api_Service_Payment_Refund  | 
                                                        |
| 27 | + * @return Payone_ClientApi_Service_GenerateHash|null  | 
                                                        |
| 28 | 28 | * @throws Exception  | 
                                                        
| 29 | 29 | */  | 
                                                        
| 30 | 30 | public function buildService($key)  | 
                                                        
@@ -34,7 +34,7 @@  | 
                                                    ||
| 34 | 34 | }  | 
                                                        
| 35 | 35 | |
| 36 | 36 | /**  | 
                                                        
| 37 | - * @param $key  | 
                                                        |
| 37 | + * @param string $key  | 
                                                        |
| 38 | 38 | * @return Payone_Settings_Service_XmlGenerate  | 
                                                        
| 39 | 39 | *  | 
                                                        
| 40 | 40 | * @throws Exception  | 
                                                        
@@ -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 |      { | 
                                                        
@@ -124,7 +124,7 @@ discard block  | 
                                                    ||
| 124 | 124 | /**  | 
                                                        
| 125 | 125 | * @param Payone_Settings_Data_ConfigFile_Shop $shopConfig  | 
                                                        
| 126 | 126 | * @param DOMElement $configXml  | 
                                                        
| 127 | - * @return string  | 
                                                        |
| 127 | + * @return DOMElement  | 
                                                        |
| 128 | 128 | */  | 
                                                        
| 129 | 129 | protected function mapShop(Payone_Settings_Data_ConfigFile_Shop $shopConfig, DOMElement $configXml)  | 
                                                        
| 130 | 130 |      { | 
                                                        
@@ -365,6 +365,10 @@ discard block  | 
                                                    ||
| 365 | 365 | $this->addGlobal($cleatringTypeNode, $valueClearingType);  | 
                                                        
| 366 | 366 | }  | 
                                                        
| 367 | 367 | |
| 368 | + /**  | 
                                                        |
| 369 | + * @param DOMElement $parent  | 
                                                        |
| 370 | + * @param Payone_Settings_Data_ConfigFile_PaymentMethod_Abstract $type  | 
                                                        |
| 371 | + */  | 
                                                        |
| 368 | 372 | public function addGlobal($parent, $type)  | 
                                                        
| 369 | 373 |      { | 
                                                        
| 370 | 374 | |
@@ -400,7 +404,7 @@ discard block  | 
                                                    ||
| 400 | 404 | /**  | 
                                                        
| 401 | 405 | * @param DOMElement $parent  | 
                                                        
| 402 | 406 | * @param $object  | 
                                                        
| 403 | - * @param $property  | 
                                                        |
| 407 | + * @param string $property  | 
                                                        |
| 404 | 408 | * @param bool $withCdata  | 
                                                        
| 405 | 409 | * @return DOMElement  | 
                                                        
| 406 | 410 | */  | 
                                                        
@@ -453,9 +453,9 @@ discard block  | 
                                                    ||
| 453 | 453 | * @param bool $asCdata  | 
                                                        
| 454 | 454 | * @return DOMElement  | 
                                                        
| 455 | 455 | */  | 
                                                        
| 456 | - protected function appendElement( $parent, $key, $value = null, $asCdata = false)  | 
                                                        |
| 456 | + protected function appendElement($parent, $key, $value = null, $asCdata = false)  | 
                                                        |
| 457 | 457 |      { | 
                                                        
| 458 | - if($asCdata === true)  | 
                                                        |
| 458 | + if ($asCdata === true)  | 
                                                        |
| 459 | 459 |          { | 
                                                        
| 460 | 460 | $cdata = $this->dom->createCDATASection($value);  | 
                                                        
| 461 | 461 | $child = $this->dom->createElement($key);  | 
                                                        
@@ -464,7 +464,7 @@ discard block  | 
                                                    ||
| 464 | 464 | else  | 
                                                        
| 465 | 465 |          { | 
                                                        
| 466 | 466 | $child = $this->dom->createElement($key);  | 
                                                        
| 467 | - if($value !== null)  | 
                                                        |
| 467 | + if ($value !== null)  | 
                                                        |
| 468 | 468 |              { | 
                                                        
| 469 | 469 | $domValue = $this->dom->createTextNode($value);  | 
                                                        
| 470 | 470 | $child->appendChild($domValue);  | 
                                                        
@@ -108,12 +108,10 @@ discard block  | 
                                                    ||
| 108 | 108 |                      foreach ($value['attribute'] as $attributKey => $attributData) { | 
                                                        
| 109 | 109 | $node->addAttribute($attributKey, $attributData);  | 
                                                        
| 110 | 110 | }  | 
                                                        
| 111 | - }  | 
                                                        |
| 112 | -                else { | 
                                                        |
| 111 | +                } else { | 
                                                        |
| 113 | 112 | $this->simpleXmlFromNestedArray($key, $value, $parent);  | 
                                                        
| 114 | 113 | }  | 
                                                        
| 115 | - }  | 
                                                        |
| 116 | -            else { | 
                                                        |
| 114 | +            } else { | 
                                                        |
| 117 | 115 | $parent->addChild($key, $value);  | 
                                                        
| 118 | 116 | }  | 
                                                        
| 119 | 117 | }  | 
                                                        
@@ -414,8 +412,7 @@ discard block  | 
                                                    ||
| 414 | 412 |              foreach ($data as $key => $value) { | 
                                                        
| 415 | 413 | $child = $this->appendElement($parentNode, $key, $value, $withCdata);  | 
                                                        
| 416 | 414 | }  | 
                                                        
| 417 | - }  | 
                                                        |
| 418 | -        else { | 
                                                        |
| 415 | +        } else { | 
                                                        |
| 419 | 416 |              if (isset($data)) { | 
                                                        
| 420 | 417 | $child = $this->appendElement($parent, $property, $data, $withCdata);  | 
                                                        
| 421 | 418 | }  | 
                                                        
@@ -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 | }  | 
                                                        
@@ -460,8 +456,7 @@ discard block  | 
                                                    ||
| 460 | 456 | $cdata = $this->dom->createCDATASection($value);  | 
                                                        
| 461 | 457 | $child = $this->dom->createElement($key);  | 
                                                        
| 462 | 458 | $child->appendChild($cdata);  | 
                                                        
| 463 | - }  | 
                                                        |
| 464 | - else  | 
                                                        |
| 459 | + } else  | 
                                                        |
| 465 | 460 |          { | 
                                                        
| 466 | 461 | $child = $this->dom->createElement($key);  | 
                                                        
| 467 | 462 | 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 | */  |