@@ -47,13 +47,11 @@ |
||
| 47 | 47 | |
| 48 | 48 | if ($this->isError()) { |
| 49 | 49 | $response = new Payone_Api_Response_Error($params); |
| 50 | - } |
|
| 51 | - elseif (empty($params) || $this->isApproved() || $this->isBlocked() || $this->isEnrolled() || |
|
| 50 | + } elseif (empty($params) || $this->isApproved() || $this->isBlocked() || $this->isEnrolled() || |
|
| 52 | 51 | $this->isInvalid() || $this->isRedirect() || $this->isValid() |
| 53 | 52 | ) { |
| 54 | 53 | throw new Payone_Api_Exception_UnknownStatus(); |
| 55 | - } |
|
| 56 | - else { |
|
| 54 | + } else { |
|
| 57 | 55 | $params = array('response' => $params); |
| 58 | 56 | $response = new Payone_Api_Response_Management_GetInvoice($params); |
| 59 | 57 | $response->setStatus(Payone_Api_Enum_ResponseType::VALID); |
@@ -47,11 +47,9 @@ |
||
| 47 | 47 | |
| 48 | 48 | if ($this->isApproved()) { |
| 49 | 49 | $response = new Payone_Api_Response_Refund_Approved($params); |
| 50 | - } |
|
| 51 | - elseif ($this->isError()) { |
|
| 50 | + } elseif ($this->isError()) { |
|
| 52 | 51 | $response = new Payone_Api_Response_Error($params); |
| 53 | - } |
|
| 54 | - else { |
|
| 52 | + } else { |
|
| 55 | 53 | throw new Payone_Api_Exception_UnknownStatus(); |
| 56 | 54 | } |
| 57 | 55 | |
@@ -46,11 +46,9 @@ |
||
| 46 | 46 | |
| 47 | 47 | if ($this->isApproved()) { |
| 48 | 48 | $response = new Payone_Api_Response_Management_ManageMandate_Approved($params); |
| 49 | - } |
|
| 50 | - elseif ($this->isError()) { |
|
| 49 | + } elseif ($this->isError()) { |
|
| 51 | 50 | $response = new Payone_Api_Response_Error($params); |
| 52 | - } |
|
| 53 | - else { |
|
| 51 | + } else { |
|
| 54 | 52 | throw new Payone_Api_Exception_UnknownStatus(); |
| 55 | 53 | } |
| 56 | 54 | |
@@ -69,8 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | if (!is_array($data) and !is_object($data)) { |
| 71 | 71 | $result[$key] = $data; |
| 72 | - } |
|
| 73 | - else if ($data instanceof Payone_Api_Request_Parameter_Interface) { |
|
| 72 | + } else if ($data instanceof Payone_Api_Request_Parameter_Interface) { |
|
| 74 | 73 | /** |
| 75 | 74 | * @var Payone_Api_Request_Parameter_Interface $data |
| 76 | 75 | */ |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | { |
| 61 | 61 | if ($this->isError()) { |
| 62 | 62 | $result = parent::__toString(); |
| 63 | - } |
|
| 64 | - else { |
|
| 63 | + } else { |
|
| 65 | 64 | $stringArray = array('status=' . $this->getStatus(), 'data=PDF-Content'); |
| 66 | 65 | $result = implode('|', $stringArray); |
| 67 | 66 | } |
@@ -73,8 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | if ($this->secstatus == Payone_Api_Enum_AddressCheckSecstatus::ADDRESS_CORRECT) { |
| 75 | 75 | return TRUE; |
| 76 | - } |
|
| 77 | - else { |
|
| 76 | + } else { |
|
| 78 | 77 | return FALSE; |
| 79 | 78 | } |
| 80 | 79 | } |
@@ -86,8 +85,7 @@ discard block |
||
| 86 | 85 | { |
| 87 | 86 | if ($this->secstatus == Payone_Api_Enum_AddressCheckSecstatus::ADDRESS_CORRECTABLE) { |
| 88 | 87 | return TRUE; |
| 89 | - } |
|
| 90 | - else { |
|
| 88 | + } else { |
|
| 91 | 89 | return FALSE; |
| 92 | 90 | } |
| 93 | 91 | } |
@@ -99,8 +97,7 @@ discard block |
||
| 99 | 97 | { |
| 100 | 98 | if ($this->secstatus == Payone_Api_Enum_AddressCheckSecstatus::ADDRESS_NONE_CORRECTABLE) { |
| 101 | 99 | return TRUE; |
| 102 | - } |
|
| 103 | - else { |
|
| 100 | + } else { |
|
| 104 | 101 | return FALSE; |
| 105 | 102 | } |
| 106 | 103 | } |
@@ -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 | } |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | $response = $this->getMapperResponse()->map($responseRaw); |
| 84 | 84 | |
| 85 | 85 | $this->protocol($request, $response); |
| 86 | - } |
|
| 87 | - catch (Exception $e) { |
|
| 86 | + } catch (Exception $e) { |
|
| 88 | 87 | $this->protocolException($e, $request); |
| 89 | 88 | throw $e; |
| 90 | 89 | } |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | $response->setRawResponse($adapter->getRawResponse()); |
| 55 | 55 | |
| 56 | 56 | $this->protocol($request, $response); |
| 57 | - } |
|
| 58 | - catch (Exception $e) { |
|
| 57 | + } catch (Exception $e) { |
|
| 59 | 58 | $this->protocolException($e, $request); |
| 60 | 59 | throw $e; |
| 61 | 60 | } |