@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * Check and return if received data has some error status. |
| 61 | 61 | * |
| 62 | 62 | * @param \StdClass $data |
| 63 | - * @return boolean |
|
| 63 | + * @return boolean|null |
|
| 64 | 64 | */ |
| 65 | 65 | public function wasAnError(StdClass $data) |
| 66 | 66 | { |
@@ -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 | |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | */ |
| 183 | 183 | protected function findMotives($occurrenceCode) |
| 184 | 184 | { |
| 185 | - $motives = array_filter($motives, function ($key) use ($occurrenceCode) { |
|
| 185 | + $motives = array_filter($motives, function($key) use ($occurrenceCode) { |
|
| 186 | 186 | return in_array($occurrenceCode, explode(',', $key)); |
| 187 | 187 | }, ARRAY_FILTER_USE_KEY); |
| 188 | 188 | |
@@ -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 | |