@@ -213,7 +213,9 @@ |
||
| 213 | 213 | */ |
| 214 | 214 | protected function toDefault($value, array $meta = []) |
| 215 | 215 | { |
| 216 | - if ( ! empty($value)) return $value; |
|
| 216 | + if ( ! empty($value)) { |
|
| 217 | + return $value; |
|
| 218 | + } |
|
| 217 | 219 | |
| 218 | 220 | if ( ! empty($meta['def'])) { |
| 219 | 221 | $value = $meta['def']; |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | { |
| 97 | 97 | $parsed = array_merge([ |
| 98 | 98 | 'data-type' => 'numeric', |
| 99 | - 'info-type' => empty($meta['type'])? 'generic' : $meta['type'], |
|
| 99 | + 'info-type' => empty($meta['type']) ? 'generic' : $meta['type'], |
|
| 100 | 100 | 'strict' => true, |
| 101 | 101 | 'translit' => true, |
| 102 | 102 | ], $meta); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @param mixed $value |
| 87 | 87 | * @param array $data |
| 88 | - * @return mixed |
|
| 88 | + * @return integer |
|
| 89 | 89 | */ |
| 90 | 90 | protected function mutateDetailCompanyDocumentType( |
| 91 | 91 | $value, |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * @param mixed $value |
| 115 | 115 | * @param array $data |
| 116 | - * @return mixed |
|
| 116 | + * @return integer |
|
| 117 | 117 | */ |
| 118 | 118 | protected function mutateDetailDocumentType( |
| 119 | 119 | $value, |
@@ -133,7 +133,9 @@ discard block |
||
| 133 | 133 | $value, |
| 134 | 134 | array $data = [] |
| 135 | 135 | ) { |
| 136 | - if (empty($data['account'])) return $value; |
|
| 136 | + if (empty($data['account'])) { |
|
| 137 | + return $value; |
|
| 138 | + } |
|
| 137 | 139 | |
| 138 | 140 | return $value ?: $data['account']; |
| 139 | 141 | } |
@@ -149,7 +151,9 @@ discard block |
||
| 149 | 151 | $value, |
| 150 | 152 | array $data = [] |
| 151 | 153 | ) { |
| 152 | - if (empty($data['account'])) return $value; |
|
| 154 | + if (empty($data['account'])) { |
|
| 155 | + return $value; |
|
| 156 | + } |
|
| 153 | 157 | |
| 154 | 158 | return $value ?: $data['accountDv']; |
| 155 | 159 | } |
@@ -165,7 +169,9 @@ discard block |
||
| 165 | 169 | $value, |
| 166 | 170 | array $data = [] |
| 167 | 171 | ) { |
| 168 | - if (empty($data['branch'])) return $value; |
|
| 172 | + if (empty($data['branch'])) { |
|
| 173 | + return $value; |
|
| 174 | + } |
|
| 169 | 175 | |
| 170 | 176 | return $value ?: $data['branch']; |
| 171 | 177 | } |
@@ -181,7 +187,9 @@ discard block |
||
| 181 | 187 | $value, |
| 182 | 188 | array $data = [] |
| 183 | 189 | ) { |
| 184 | - if (empty($data['branch'])) return $value; |
|
| 190 | + if (empty($data['branch'])) { |
|
| 191 | + return $value; |
|
| 192 | + } |
|
| 185 | 193 | |
| 186 | 194 | return $value ?: $data['branchDv']; |
| 187 | 195 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * |
| 36 | 36 | * @param mixed $value |
| 37 | 37 | * @param array $data |
| 38 | - * @return mixed |
|
| 38 | + * @return integer |
|
| 39 | 39 | */ |
| 40 | 40 | protected function mutateDetailLateInterestFlag( |
| 41 | 41 | $value, |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @param mixed $value |
| 23 | 23 | * @param array $data |
| 24 | - * @return mixed |
|
| 24 | + * @return integer |
|
| 25 | 25 | */ |
| 26 | 26 | protected function mutateDetailCompanyDocumentType( |
| 27 | 27 | $value, |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @param mixed $value |
| 51 | 51 | * @param array $data |
| 52 | - * @return mixed |
|
| 52 | + * @return integer |
|
| 53 | 53 | */ |
| 54 | 54 | protected function mutateDetailLateInterestFlag( |
| 55 | 55 | $value, |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * |
| 64 | 64 | * @param mixed $value |
| 65 | 65 | * @param array $data |
| 66 | - * @return mixed |
|
| 66 | + * @return integer |
|
| 67 | 67 | */ |
| 68 | 68 | protected function mutateDetailDocumentType( |
| 69 | 69 | $value, |
@@ -88,6 +88,6 @@ |
||
| 88 | 88 | return $value ?: 0; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - return !empty($data['deadline'])? $data['deadline'] : $value; |
|
| 91 | + return ! empty($data['deadline']) ? $data['deadline'] : $value; |
|
| 92 | 92 | } |
| 93 | 93 | } |
@@ -166,7 +166,9 @@ discard block |
||
| 166 | 166 | $value, |
| 167 | 167 | array $data = [] |
| 168 | 168 | ) { |
| 169 | - if (empty($data['account'])) return $value; |
|
| 169 | + if (empty($data['account'])) { |
|
| 170 | + return $value; |
|
| 171 | + } |
|
| 170 | 172 | |
| 171 | 173 | return $value ?: $data['account']; |
| 172 | 174 | } |
@@ -182,7 +184,9 @@ discard block |
||
| 182 | 184 | $value, |
| 183 | 185 | array $data = [] |
| 184 | 186 | ) { |
| 185 | - if (empty($data['accountDv'])) return $value; |
|
| 187 | + if (empty($data['accountDv'])) { |
|
| 188 | + return $value; |
|
| 189 | + } |
|
| 186 | 190 | |
| 187 | 191 | return $value ?: $data['accountDv']; |
| 188 | 192 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @param mixed $value |
| 87 | 87 | * @param array $data |
| 88 | - * @return mixed |
|
| 88 | + * @return integer |
|
| 89 | 89 | */ |
| 90 | 90 | protected function mutateDetailCompanyDocumentType( |
| 91 | 91 | $value, |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * @param mixed $value |
| 115 | 115 | * @param array $data |
| 116 | - * @return mixed |
|
| 116 | + * @return integer |
|
| 117 | 117 | */ |
| 118 | 118 | protected function mutateDetailDocumentType( |
| 119 | 119 | $value, |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @param mixed $value |
| 87 | 87 | * @param array $data |
| 88 | - * @return mixed |
|
| 88 | + * @return integer |
|
| 89 | 89 | */ |
| 90 | 90 | protected function mutateDetailCompanyDocumentType( |
| 91 | 91 | $value, |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * @param mixed $value |
| 115 | 115 | * @param array $data |
| 116 | - * @return mixed |
|
| 116 | + * @return integer |
|
| 117 | 117 | */ |
| 118 | 118 | protected function mutateDetailDocumentType( |
| 119 | 119 | $value, |
@@ -70,9 +70,13 @@ discard block |
||
| 70 | 70 | $value, |
| 71 | 71 | array $data = [] |
| 72 | 72 | ) { |
| 73 | - if ($data['occurrenceCode'] == 11) return Caixa::INSTRUCTION_PROTEST; |
|
| 73 | + if ($data['occurrenceCode'] == 11) { |
|
| 74 | + return Caixa::INSTRUCTION_PROTEST; |
|
| 75 | + } |
|
| 74 | 76 | |
| 75 | - if ($data['occurrenceCode'] == 12) return Caixa::INSTRUCTION_DEVOLUTION; |
|
| 77 | + if ($data['occurrenceCode'] == 12) { |
|
| 78 | + return Caixa::INSTRUCTION_DEVOLUTION; |
|
| 79 | + } |
|
| 76 | 80 | |
| 77 | 81 | return $value; |
| 78 | 82 | } |
@@ -90,7 +94,9 @@ discard block |
||
| 90 | 94 | ) { |
| 91 | 95 | $returnValue = $value == '' && $data['occurrenceCode'] == 9; |
| 92 | 96 | |
| 93 | - if ($returnValue) return $value; |
|
| 97 | + if ($returnValue) { |
|
| 98 | + return $value; |
|
| 99 | + } |
|
| 94 | 100 | |
| 95 | 101 | return $value ?: $data['expiration']->add(new \DateInterval('P1D')); |
| 96 | 102 | } |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace SmartCNAB\Services\Returning; |
| 4 | 4 | |
| 5 | 5 | use StdClass; |
| 6 | - |
|
| 7 | 6 | use SmartCNAB\Support\Bank; |
| 8 | 7 | use SmartCNAB\Support\Picture; |
| 9 | 8 | use SmartCNAB\Support\File\Returning as SupportReturning; |
@@ -197,9 +197,13 @@ |
||
| 197 | 197 | */ |
| 198 | 198 | public function motives($occurrenceCode = null) |
| 199 | 199 | { |
| 200 | - if ($occurrenceCode == '99') return []; |
|
| 200 | + if ($occurrenceCode == '99') { |
|
| 201 | + return []; |
|
| 202 | + } |
|
| 201 | 203 | |
| 202 | - if ( ! $occurrenceCode) return $this->rejectionCodes(); |
|
| 204 | + if ( ! $occurrenceCode) { |
|
| 205 | + return $this->rejectionCodes(); |
|
| 206 | + } |
|
| 203 | 207 | |
| 204 | 208 | $occurrenceCode = str_pad($occurrenceCode, 2, 0, STR_PAD_LEFT); |
| 205 | 209 | |
@@ -129,7 +129,9 @@ |
||
| 129 | 129 | */ |
| 130 | 130 | public function motives($occurrenceCode = null) |
| 131 | 131 | { |
| 132 | - if ( ! $occurrenceCode) return static::$motives; |
|
| 132 | + if ( ! $occurrenceCode) { |
|
| 133 | + return static::$motives; |
|
| 134 | + } |
|
| 133 | 135 | |
| 134 | 136 | $occurrenceCode = str_pad($occurrenceCode, 2, 0, STR_PAD_LEFT); |
| 135 | 137 | |