@@ -147,8 +147,8 @@ discard block |
||
147 | 147 | * @return array |
148 | 148 | */ |
149 | 149 | public function post($ressourceName, $ressourcePath =null, $ressourceId = null, |
150 | - $bodyData = array(), $query = array(), $assoc = false, |
|
151 | - $contentType = 'json') |
|
150 | + $bodyData = array(), $query = array(), $assoc = false, |
|
151 | + $contentType = 'json') |
|
152 | 152 | { |
153 | 153 | if ($contentType !== 'json') { |
154 | 154 | throw new \Exception('Use only json to update or create'); |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | * @return array |
180 | 180 | */ |
181 | 181 | public function put($ressourceName, $ressourcePath =null, $ressourceId = null, |
182 | - $bodyData = array(), $query = array(), $assoc = false, |
|
183 | - $contentType = 'json') |
|
182 | + $bodyData = array(), $query = array(), $assoc = false, |
|
183 | + $contentType = 'json') |
|
184 | 184 | { |
185 | 185 | if ($contentType !== 'json') { |
186 | 186 | throw new \Exception('Use only json to update or create'); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * @return array |
210 | 210 | */ |
211 | 211 | public function delete($ressourceName, $ressourcePath =null, $ressourceId = null, $assoc = false, |
212 | - $contentType = 'json') |
|
212 | + $contentType = 'json') |
|
213 | 213 | { |
214 | 214 | try { |
215 | 215 | $urlRessource = $this->builPathToCall($ressourceName, $ressourcePath, $ressourceId); |
@@ -121,7 +121,7 @@ |
||
121 | 121 | if(!is_null($ressourcePath)){ |
122 | 122 | $this->builPath = 'accounts/'.$this->getAccountCode().$ressourceAdded; |
123 | 123 | return $this->builPath; |
124 | - }else{ |
|
124 | + } else{ |
|
125 | 125 | $this->builPath = $ressourceName.'/'.$this->getAccountCode().$ressourceAdded; |
126 | 126 | return $this->builPath; |
127 | 127 | } |
@@ -45,59 +45,59 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * Send a "GET" request to get information about ressource; |
|
49 | - * @param string $ressourceName |
|
50 | - * @param string $ressourcePath |
|
51 | - * @param string $ressourceId |
|
52 | - * @param array $params |
|
53 | - * @param boolean $assoc |
|
54 | - * @param string $contentType |
|
55 | - * @return array |
|
56 | - */ |
|
48 | + * Send a "GET" request to get information about ressource; |
|
49 | + * @param string $ressourceName |
|
50 | + * @param string $ressourcePath |
|
51 | + * @param string $ressourceId |
|
52 | + * @param array $params |
|
53 | + * @param boolean $assoc |
|
54 | + * @param string $contentType |
|
55 | + * @return array |
|
56 | + */ |
|
57 | 57 | public function get($ressourceName, $ressourcePath =null, $ressourceId=null, $params = array(),$assoc = false,$contentType='json'){ |
58 | 58 | return $this->getCertainClient()->get($ressourceName, $ressourcePath, $ressourceId, $params, $assoc,$contentType); |
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * Send a "POST" request to put information to certain; |
|
63 | - * @param string $ressourceName |
|
64 | - * @param string $ressourcePath |
|
65 | - * @param string $ressourceId |
|
66 | - * @param array $bodyData |
|
67 | - * @param array $query |
|
68 | - * @param boolean $assoc |
|
69 | - * @param string $contentType |
|
70 | - * @return array |
|
71 | - */ |
|
62 | + * Send a "POST" request to put information to certain; |
|
63 | + * @param string $ressourceName |
|
64 | + * @param string $ressourcePath |
|
65 | + * @param string $ressourceId |
|
66 | + * @param array $bodyData |
|
67 | + * @param array $query |
|
68 | + * @param boolean $assoc |
|
69 | + * @param string $contentType |
|
70 | + * @return array |
|
71 | + */ |
|
72 | 72 | public function post($ressourceName, $ressourcePath =null, $ressourceId=null, $bodyData = array(),$query=array(), $assoc = false,$contentType='json'){ |
73 | 73 | return $this->getCertainClient()->post($ressourceName, $ressourcePath, $ressourceId, $bodyData, $query, $assoc,$contentType); |
74 | 74 | } |
75 | 75 | |
76 | 76 | |
77 | 77 | /** |
78 | - * Send a "PUT" request to put information to certain; |
|
79 | - * @param string $ressourceName |
|
80 | - * @param string $ressourcePath |
|
81 | - * @param string $ressourceId |
|
82 | - * @param array $bodyData |
|
83 | - * @param array $query |
|
84 | - * @param boolean $assoc |
|
85 | - * @param string $contentType |
|
86 | - * @return array |
|
87 | - */ |
|
78 | + * Send a "PUT" request to put information to certain; |
|
79 | + * @param string $ressourceName |
|
80 | + * @param string $ressourcePath |
|
81 | + * @param string $ressourceId |
|
82 | + * @param array $bodyData |
|
83 | + * @param array $query |
|
84 | + * @param boolean $assoc |
|
85 | + * @param string $contentType |
|
86 | + * @return array |
|
87 | + */ |
|
88 | 88 | public function put($ressourceName, $ressourcePath =null, $ressourceId=null, $bodyData = array(),$query=array(), $assoc = false,$contentType='json'){ |
89 | 89 | return $this->getCertainClient()->put($ressourceName, $ressourcePath, $ressourceId, $bodyData, $query, $assoc,$contentType); |
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * Send a "DELETE" request to delete information from certain; |
|
94 | - * @param string $ressourceName |
|
95 | - * @param string $ressourcePath |
|
96 | - * @param string $ressourceId |
|
97 | - * @param boolean $assoc |
|
98 | - * @param string $contentType |
|
99 | - * @return array |
|
100 | - */ |
|
93 | + * Send a "DELETE" request to delete information from certain; |
|
94 | + * @param string $ressourceName |
|
95 | + * @param string $ressourcePath |
|
96 | + * @param string $ressourceId |
|
97 | + * @param boolean $assoc |
|
98 | + * @param string $contentType |
|
99 | + * @return array |
|
100 | + */ |
|
101 | 101 | public function delete($ressourceName, $ressourcePath =null, $ressourceId=null, $assoc = false,$contentType='json'){ |
102 | 102 | return $this->getCertainClient()->delete($ressourceName, $ressourcePath, $ressourceId, $assoc,$contentType); |
103 | 103 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @throws Exceptions\RessourceMandatoryFieldException |
76 | 76 | */ |
77 | 77 | public function post($bodyData, $query = array(), $ressourceId = null, |
78 | - $assoc = false, $contentType = 'json') |
|
78 | + $assoc = false, $contentType = 'json') |
|
79 | 79 | { |
80 | 80 | $ressourceName = $this->getRessourceName(); |
81 | 81 | ; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * @return \Wabel\CertainAPI\CertainRessourceAbstract |
225 | 225 | */ |
226 | 226 | public function getWithEventCode($eventCode, $ressourceId, $params = array(), |
227 | - $assoc = false, $contentType = 'json') |
|
227 | + $assoc = false, $contentType = 'json') |
|
228 | 228 | { |
229 | 229 | $ressourceId = $eventCode.'/'.$ressourceId; |
230 | 230 | return $this->get($ressourceId, $params, $assoc, $contentType); |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | * @return \Wabel\CertainAPI\CertainRessourceAbstract |
242 | 242 | */ |
243 | 243 | public function postWithEventCode($eventCode, $ressourceId, $bodyData, |
244 | - $query = array(), $assoc = false, |
|
245 | - $contentType = 'json') |
|
244 | + $query = array(), $assoc = false, |
|
245 | + $contentType = 'json') |
|
246 | 246 | { |
247 | 247 | $ressourceId = $eventCode.'/'.$ressourceId; |
248 | 248 | return $this->post($bodyData, $query, $ressourceId, $assoc, $contentType); |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | * @return \Wabel\CertainAPI\CertainRessourceAbstract |
260 | 260 | */ |
261 | 261 | public function putWithEventCode($eventCode, $ressourceId, $bodyData, |
262 | - $query = array(), $assoc = false, |
|
263 | - $contentType = 'json') |
|
262 | + $query = array(), $assoc = false, |
|
263 | + $contentType = 'json') |
|
264 | 264 | { |
265 | 265 | $ressourceId = $eventCode.'/'.$ressourceId; |
266 | 266 | return $this->put($bodyData, $query, $ressourceId, $assoc, $contentType); |
@@ -61,9 +61,9 @@ |
||
61 | 61 | $bodyString = $streamBody->getContents(); |
62 | 62 | |
63 | 63 | if($contentType === 'json'){ |
64 | - $response['results'] = $this->jsonp_decode($bodyString, $assoc); |
|
64 | + $response['results'] = $this->jsonp_decode($bodyString, $assoc); |
|
65 | 65 | }else{ |
66 | - $response['results']=$bodyString; |
|
66 | + $response['results']=$bodyString; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | $response['success'] = true; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | if($contentType === 'json'){ |
64 | 64 | $response['results'] = $this->jsonp_decode($bodyString, $assoc); |
65 | - }else{ |
|
65 | + } else{ |
|
66 | 66 | $response['results']=$bodyString; |
67 | 67 | } |
68 | 68 |
@@ -69,8 +69,7 @@ |
||
69 | 69 | 'registrationCode' => $registrationCertainResults->registrations[0]->registrationCode, |
70 | 70 | 'attendeeTypeCode' => (isset($registrationCertainResults->registrations[0]->attendeeTypeCode))?$registrationCertainResults->registrations[0]->attendeeTypeCode:'', |
71 | 71 | ]; |
72 | - } |
|
73 | - elseif($registrationCertainResults->size > 0 && $returnRegCode){ |
|
72 | + } elseif($registrationCertainResults->size > 0 && $returnRegCode){ |
|
74 | 73 | return $registrationCertainResults->registrations[0]->registrationCode; |
75 | 74 | } elseif($registrationCertainResults->size > 0 && !$returnRegCode){ |
76 | 75 | return true; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | if(!$appointmentsOldHistoryFilePath){ |
87 | 87 | //No files so it's the first time we attempt to synchronize. |
88 | 88 | $appointmentsOld = []; |
89 | - }else{ |
|
89 | + } else{ |
|
90 | 90 | //Get the last old appointments data. |
91 | 91 | $appointmentsOldHistory = FileChangesHelper::getJsonContentFromFile($appointmentsOldHistoryFilePath); |
92 | 92 | $appointmentsOld = DetectAppointmentsChangingsService::recursiveArrayObjectToFullArray($appointmentsOldHistory); |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | //Changes? So we save the new online appointments |
99 | 99 | FileChangesHelper::saveAppointmentsFileByHistory($this->dirPathHistoryAppointments.'/appointments_'.$eventCode.'.json',json_encode($appointmentsNew)); |
100 | 100 | $output->writeln('Detect changes - Save Changes'); |
101 | - }else{ |
|
101 | + } else{ |
|
102 | 102 | $output->writeln('Detect changes - No Changes'); |
103 | 103 | } |
104 | 104 | foreach ($this->listeners as $listener){ |
105 | 105 | //Run Listener. For instance,Here we can use ChangingsToFileListeners to save the changes in file. |
106 | 106 | $listener->run($eventCode,$listChangings); |
107 | 107 | } |
108 | - }else{ |
|
108 | + } else{ |
|
109 | 109 | $output->writeln('Detect changes - Stop.'); |
110 | 110 | } |
111 | 111 | } |