Completed
Push — master ( 4258d4...fe7c76 )
by Florian
03:33
created
lib/Payone/Api/Request/Parameter/ManageMandate/PersonalData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
     }
182 182
 
183 183
     /**
184
-     * @return string
184
+     * @return integer
185 185
      */
186 186
     public function getUserid()
187 187
     {
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Parameter/Vauthorization/PersonalData.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     }
96 96
 
97 97
     /**
98
-     * @return string
98
+     * @return integer
99 99
      */
100 100
     public function getBirthday()
101 101
     {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     }
260 260
 
261 261
     /**
262
-     * @return string
262
+     * @return integer
263 263
      */
264 264
     public function getUserid()
265 265
     {
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Abstract.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     }
225 225
 
226 226
     /**
227
-     * @param $name
227
+     * @param string $name
228 228
      * @return null|mixed
229 229
      */
230 230
     protected function get($name)
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
     /**
239 239
      * @param string $name
240
-     * @param mixed $value
240
+     * @param string $value
241 241
      * @return boolean|null
242 242
      */
243 243
     protected function set($name, $value)
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $this->rawResponse = $rawResponse;
258 258
     }
259 259
     /**
260
-     * @return null
260
+     * @return string
261 261
      */
262 262
     public function getRawResponse()
263 263
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Parameter/Paydata/DataItem.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,6 @@
 block discarded – undo
30 30
     protected $data = NULL;
31 31
 
32 32
     /**
33
-     * @param int $key
34 33
      * @return array
35 34
      */
36 35
     public function toArray()
Please login to merge, or discard this patch.
lib/Payone/Builder.php 2 patches
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * @api
67 67
      *
68
-     * @return Payone_ClientApi_Service_GenerateHash
68
+     * @return Payone_Api_Service_Payment_Abstract
69 69
      */
70 70
     public function buildServiceClientApiGenerateHash() {
71 71
         return $this->buildService(self::KEY_CLIENTAPI . '/generateHash');
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * @api
121 121
      *
122
-     * @return Payone_Api_Service_Verification_3dsCheck
122
+     * @return Payone_Api_Service_Payment_Abstract
123 123
      */
124 124
     public function buildServiceVerification3dsCheck() {
125 125
         return $this->buildService(self::KEY_API . '/verification/3dscheck');
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * @api
130 130
      *
131
-     * @return Payone_Api_Service_Management_GetInvoice
131
+     * @return Payone_Api_Service_Payment_Abstract
132 132
      */
133 133
     public function buildServiceManagementGetInvoice() {
134 134
         return $this->buildService(self::KEY_API . '/management/getInvoice');
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     /**
138 138
      * @api
139 139
      *
140
-     * @return Payone_Api_Service_Management_GetFile
140
+     * @return Payone_Api_Service_Payment_Abstract
141 141
      */
142 142
     public function buildServiceManagementGetFile() {
143 143
         return $this->buildService(self::KEY_API . '/management/getFile');
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     /**
147 147
      * @api
148 148
      *
149
-     * @return Payone_Api_Service_Management_ManageMandate
149
+     * @return Payone_Api_Service_Payment_Abstract
150 150
      */
151 151
     public function buildServiceManagementManageMandate() {
152 152
         return $this->buildService(self::KEY_API . '/management/manageMandate');
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     /**
156 156
      * @api
157 157
      *
158
-     * @return Payone_Api_Service_Verification_AddressCheck
158
+     * @return Payone_Api_Service_Payment_Abstract
159 159
      */
160 160
     public function buildServiceVerificationAddressCheck() {
161 161
         return $this->buildService(self::KEY_API . '/verification/addressCheck');
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * @api
166 166
      *
167
-     * @return Payone_Api_Service_Verification_CreditCardCheck
167
+     * @return Payone_Api_Service_Payment_Abstract
168 168
      */
169 169
     public function buildServiceVerificationCreditCardCheck() {
170 170
         return $this->buildService(self::KEY_API . '/verification/creditCardCheck');
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     /**
174 174
      * @api
175 175
      *
176
-     * @return Payone_Api_Service_Verification_BankAccountCheck
176
+     * @return Payone_Api_Service_Payment_Abstract
177 177
      */
178 178
     public function buildServiceVerificationBankAccountCheck() {
179 179
         return $this->buildService(self::KEY_API . '/verification/bankAccountCheck');
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     /**
183 183
      * @api
184 184
      *
185
-     * @return Payone_Api_Service_Verification_Consumerscore
185
+     * @return Payone_Api_Service_Payment_Abstract
186 186
      */
187 187
     public function buildServiceVerificationConsumerscore() {
188 188
         return $this->buildService(self::KEY_API . '/verification/consumerscore');
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * @api
193 193
      *
194
-     * @return Payone_Settings_Service_XmlGenerate
194
+     * @return Payone_Api_Service_Payment_Abstract
195 195
      */
196 196
     public function buildServiceSettingsXmlGenerate() {
197 197
         return $this->buildService(self::KEY_SETTINGS . '/xmlgenerate');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/Payone/ClientApi/Factory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
lib/Payone/Settings/Service/XmlGenerate.php 3 patches
Doc Comments   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -109,12 +109,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -453,9 +453,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/Payone/TransactionStatus/Factory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
lib/Payone/Config/Abstract.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.