Completed
Pull Request — master (#498)
by
unknown
28s
created
lib/Payone/ClientApi/Request/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,8 +189,7 @@
 block discarded – undo
189 189
 
190 190
                 return $object->get($propertyName);
191 191
             }
192
-        }
193
-        elseif (property_exists($this, $name)) {
192
+        } elseif (property_exists($this, $name)) {
194 193
             return $this->$name;
195 194
         }
196 195
 
Please login to merge, or discard this patch.
lib/Payone/Builder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/Payone/Protocol/Filter/MaskValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         }
63 63
 
64 64
         // Calc the char pos to start with
65
-        $start = round(($lengthValue - $numReplaceChars) / 2);
65
+        $start = round(($lengthValue-$numReplaceChars) / 2);
66 66
 
67 67
         // Generate the mask
68 68
         $mask = str_repeat(self::MASK_CHAR, $numReplaceChars);
Please login to merge, or discard this patch.
lib/Payone/Protocol/Service/ApplyFilters.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $stringArray = array();
77 77
 
78 78
         foreach ($objectArray as $key => $value) {
79
-            if($value instanceof Payone_Api_Response_Parameter_Interface){
79
+            if ($value instanceof Payone_Api_Response_Parameter_Interface) {
80 80
                 $stringArray[] = $this->apply($value->toArray());
81 81
             } elseif ($value !== null) {
82 82
                 $filter = $this->getFilterConfig($key);
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
                 }
87 87
             }
88 88
 
89
-            if(is_array($value)) {
89
+            if (is_array($value)) {
90 90
                 foreach ($value as $sArrayKey => $sArrayValue) {
91
-                    $stringArray[] = $key.'_'.$sArrayKey.'='.$sArrayValue;
91
+                    $stringArray[] = $key . '_' . $sArrayKey . '=' . $sArrayValue;
92 92
                 }
93 93
             } else {
94 94
                 $stringArray[] = $key . '=' . $value;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function setFilters(array $filters)
127 127
     {
128 128
         $this->filters = array();
129
-        foreach($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value)
129
+        foreach ($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value)
130 130
         {
131 131
             $this->addFilter($value);
132 132
         }
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function getFilterConfig($key)
162 162
     {
163
-        foreach($this->filters_config as $filter => $config) {
164
-            if(in_array($key, $config)) {
163
+        foreach ($this->filters_config as $filter => $config) {
164
+            if (in_array($key, $config)) {
165 165
                 return $this->getFilter($filter);
166 166
             }
167 167
         }
Please login to merge, or discard this patch.
lib/Payone/Protocol/Logger/Log4php.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
             return FALSE;
86 86
         }
87 87
 
88
-        $sFullLogMessage = date('[Y-m-d H:i:s] ').strtoupper($level).' - '.$message.PHP_EOL;
88
+        $sFullLogMessage = date('[Y-m-d H:i:s] ') . strtoupper($level) . ' - ' . $message . PHP_EOL;
89 89
         error_log($sFullLogMessage, 3, $fileName);
90 90
         
91 91
         return true;
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Payment/Preauthorize.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 
67 67
             $requestParams = $this->getMapperRequest()->map($request);
68 68
 
69
-            if($request->isFrontendApiCall() === false) {
69
+            if ($request->isFrontendApiCall() === false) {
70 70
                 $responseRaw = $this->getAdapter()->request($requestParams);
71 71
             } else {
72 72
                 $responseRaw = $request->getFrontendApiResponse();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
             $response = $this->getMapperResponse()->map($responseRaw);
74 74
 
75 75
             $this->protocol($request, $response);
76
-        }
77
-        catch (Exception $e) {
76
+        } catch (Exception $e) {
78 77
             $this->protocolException($e, $request);
79 78
             throw $e;
80 79
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Payment/CreateAccess.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
             $response = $this->getMapperResponse()->map($responseRaw);
74 74
 
75 75
             $this->protocol($request, $response);
76
-        }
77
-        catch (Exception $e) {
76
+        } catch (Exception $e) {
78 77
             $this->protocolException($e, $request);
79 78
             throw $e;
80 79
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Payment/Refund.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
             $response = $this->getMapperResponse()->map($responseRaw);
74 74
 
75 75
             $this->protocol($request, $response);
76
-        }
77
-        catch (Exception $e) {
76
+        } catch (Exception $e) {
78 77
             $this->protocolException($e, $request);
79 78
             throw $e;
80 79
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Payment/Capture.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
             $response = $this->getMapperResponse()->map($responseRaw);
74 74
 
75 75
             $this->protocol($request, $response);
76
-        }
77
-        catch (Exception $e) {
76
+        } catch (Exception $e) {
78 77
             $this->protocolException($e, $request);
79 78
             throw $e;
80 79
         }
Please login to merge, or discard this patch.