@@ -89,11 +89,11 @@ |
||
| 89 | 89 | $response = $this->postRequest('/private/api/v2/json/contacts/set', $parameters); |
| 90 | 90 | |
| 91 | 91 | if (isset($response['contacts']['add'])) { |
| 92 | - $result = array_map(function ($item) { |
|
| 93 | - if(!empty($item['id'])) |
|
| 92 | + $result = array_map(function($item) { |
|
| 93 | + if (!empty($item['id'])) |
|
| 94 | 94 | return $item['id']; |
| 95 | - elseif(!empty($item['error'])) |
|
| 96 | - throw new Exception($item['error'],filter_var(mb_strstr($item['error'],".",true), FILTER_SANITIZE_NUMBER_INT)); |
|
| 95 | + elseif (!empty($item['error'])) |
|
| 96 | + throw new Exception($item['error'], filter_var(mb_strstr($item['error'], ".", true), FILTER_SANITIZE_NUMBER_INT)); |
|
| 97 | 97 | else |
| 98 | 98 | return []; |
| 99 | 99 | }, $response['contacts']['add']); |
@@ -97,11 +97,11 @@ |
||
| 97 | 97 | $response = $this->postRequest('/private/api/v2/json/fields/set', $parameters); |
| 98 | 98 | |
| 99 | 99 | if (isset($response['fields']['add'])) { |
| 100 | - $result = array_map(function ($item) { |
|
| 101 | - if(!empty($item['id'])) |
|
| 100 | + $result = array_map(function($item) { |
|
| 101 | + if (!empty($item['id'])) |
|
| 102 | 102 | return $item['id']; |
| 103 | - elseif(!empty($item['error'])) |
|
| 104 | - throw new Exception($item['error'],filter_var(mb_strstr($item['error'],".",true), FILTER_SANITIZE_NUMBER_INT)); |
|
| 103 | + elseif (!empty($item['error'])) |
|
| 104 | + throw new Exception($item['error'], filter_var(mb_strstr($item['error'], ".", true), FILTER_SANITIZE_NUMBER_INT)); |
|
| 105 | 105 | else |
| 106 | 106 | return []; |
| 107 | 107 | }, $response['fields']['add']); |