@@ -30,10 +30,10 @@ |
||
30 | 30 | |
31 | 31 | public function __construct(?array $params = null) |
32 | 32 | { |
33 | - if ($params !== null) { |
|
33 | + if ($params!==null) { |
|
34 | 34 | foreach ($this as $key => $value) { |
35 | 35 | if (isset($params[$key])) { |
36 | - if ($key === 'options') { |
|
36 | + if ($key==='options') { |
|
37 | 37 | $this->{$key} = array(); |
38 | 38 | foreach ($params[$key] as $opt_key => $opt_value) { |
39 | 39 | array_push($this->{$key}, new Option($opt_value)); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function getUser(int $userId) : ResponseTeam |
120 | 120 | { |
121 | 121 | return $this->toResponseTeam(Route4Me::makeRequst([ |
122 | - 'url' => Endpoint::TEAM_USERS . '/' . $userId, |
|
122 | + 'url' => Endpoint::TEAM_USERS.'/'.$userId, |
|
123 | 123 | 'method' => 'GET' |
124 | 124 | ])); |
125 | 125 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | public function delete(int $userId) : ResponseTeam |
137 | 137 | { |
138 | 138 | return $this->toResponseTeam(Route4Me::makeRequst([ |
139 | - 'url' => Endpoint::TEAM_USERS . '/' . $userId, |
|
139 | + 'url' => Endpoint::TEAM_USERS.'/'.$userId, |
|
140 | 140 | 'method' => 'DELETE' |
141 | 141 | ])); |
142 | 142 | } |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | ]; |
196 | 196 | |
197 | 197 | return $this->toResponseTeam(Route4Me::makeRequst([ |
198 | - 'url' => Endpoint::TEAM_USERS . '/' . $userId, |
|
198 | + 'url' => Endpoint::TEAM_USERS.'/'.$userId, |
|
199 | 199 | 'method' => 'PATCH', |
200 | 200 | 'HTTPHEADER' => 'Content-Type: application/json', |
201 | 201 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | if (is_array($res_members) && isset($res_members['results'])) { |
27 | 27 | foreach ($res_members['results'] as $key => $value) { |
28 | - if ($value['OWNER_MEMBER_ID'] == 0) { |
|
28 | + if ($value['OWNER_MEMBER_ID']==0) { |
|
29 | 29 | $owner_member_id = $value['member_id']; |
30 | 30 | break; |
31 | 31 | } |
@@ -50,5 +50,5 @@ discard block |
||
50 | 50 | $res = $tm->create($params); |
51 | 51 | print_r($res); |
52 | 52 | } catch (Exception | ApiError $e) { |
53 | - echo $e->getMessage() . PHP_EOL; |
|
53 | + echo $e->getMessage().PHP_EOL; |
|
54 | 54 | } |
@@ -22,5 +22,5 @@ |
||
22 | 22 | $res = $tm->getUser($userId); |
23 | 23 | print_r($res); |
24 | 24 | } catch (ApiError $e) { |
25 | - echo 'Cannot get user with ID: ' . $userId . PHP_EOL; |
|
25 | + echo 'Cannot get user with ID: '.$userId.PHP_EOL; |
|
26 | 26 | } |
@@ -20,5 +20,5 @@ |
||
20 | 20 | $res = $tm->getUsers(); |
21 | 21 | print_r($res); |
22 | 22 | } catch (ApiError $e) { |
23 | - echo $e->getMessage() . PHP_EOL; |
|
23 | + echo $e->getMessage().PHP_EOL; |
|
24 | 24 | } |
@@ -27,5 +27,5 @@ |
||
27 | 27 | $res = $tm->update($userId, $params); |
28 | 28 | print_r($res); |
29 | 29 | } catch (ApiError $e) { |
30 | - echo $e->getMessage() . PHP_EOL; |
|
30 | + echo $e->getMessage().PHP_EOL; |
|
31 | 31 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | if (is_array($res_members) && isset($res_members['results'])) { |
28 | 28 | foreach ($res_members['results'] as $key => $value) { |
29 | - if ($value['OWNER_MEMBER_ID'] == 0) { |
|
29 | + if ($value['OWNER_MEMBER_ID']==0) { |
|
30 | 30 | $owner_member_id = $value['member_id']; |
31 | 31 | break; |
32 | 32 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $tm = new TeamManagement(); |
64 | 64 | $res = $tm->bulkInsert($params, $options); |
65 | 65 | //print_r($res); |
66 | - echo "Insert two sub-users." . PHP_EOL; |
|
66 | + echo "Insert two sub-users.".PHP_EOL; |
|
67 | 67 | } catch (Exception | ApiError $e) { |
68 | - echo $e->getMessage() . PHP_EOL; |
|
68 | + echo $e->getMessage().PHP_EOL; |
|
69 | 69 | } |
@@ -22,5 +22,5 @@ |
||
22 | 22 | $res = $tm->delete($userId); |
23 | 23 | print_r($res); |
24 | 24 | } catch (ApiError $e) { |
25 | - echo 'Cannot delete user with ID: ' . $userId . PHP_EOL; |
|
25 | + echo 'Cannot delete user with ID: '.$userId.PHP_EOL; |
|
26 | 26 | } |
@@ -42,6 +42,6 @@ |
||
42 | 42 | $res = $ab->updateAddressesByAreas($filter, $params); |
43 | 43 | print_r($res); |
44 | 44 | } catch (ApiError $e) { |
45 | - echo $e->getCode() . PHP_EOL; |
|
46 | - echo $e->getMessage() . PHP_EOL; |
|
45 | + echo $e->getCode().PHP_EOL; |
|
46 | + echo $e->getMessage().PHP_EOL; |
|
47 | 47 | } |