@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | if (is_object($object)) { |
103 | 103 | |
104 | - return (array)$object; |
|
104 | + return (array) $object; |
|
105 | 105 | } |
106 | 106 | return $object; |
107 | 107 | } |
@@ -246,15 +246,15 @@ discard block |
||
246 | 246 | } |
247 | 247 | $codeCheckDirectory = FileChangesHelper::checkDirectory($this->dirPathHistoryAppointments); |
248 | 248 | if ($codeCheckDirectory === 'no_directory') { |
249 | - $this->logger->error('Path ' . $this->dirPathHistoryAppointments . ' doesn\'t exists.'); |
|
249 | + $this->logger->error('Path '.$this->dirPathHistoryAppointments.' doesn\'t exists.'); |
|
250 | 250 | return; |
251 | 251 | } |
252 | 252 | if ($codeCheckDirectory === 'not_readable') { |
253 | - $this->logger->error('Path ' . $this->dirPathHistoryAppointments . ' is not readable.'); |
|
253 | + $this->logger->error('Path '.$this->dirPathHistoryAppointments.' is not readable.'); |
|
254 | 254 | return; |
255 | 255 | } |
256 | 256 | if ($codeCheckDirectory === 'not_writable') { |
257 | - $this->logger->error('Path ' . $this->dirPathHistoryAppointments . ' is not writable.'); |
|
257 | + $this->logger->error('Path '.$this->dirPathHistoryAppointments.' is not writable.'); |
|
258 | 258 | return; |
259 | 259 | } |
260 | 260 | $this->lock->acquireLock(); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | if (!$appointmentsOldHistoryFilePath) { |
269 | 269 | //No files so it's the first time we attempt to synchronize. |
270 | 270 | $appointmentsOld = []; |
271 | - } else { |
|
271 | + }else { |
|
272 | 272 | //Get the last old appointments data. |
273 | 273 | $appointmentsOldHistory = FileChangesHelper::getJsonContentFromFile($appointmentsOldHistoryFilePath); |
274 | 274 | $appointmentsOld = self::recursiveArrayObjectToFullArray($appointmentsOldHistory); |
@@ -277,11 +277,11 @@ discard block |
||
277 | 277 | $timestamp = time(); |
278 | 278 | $listChangings = $this->detectAppointmentsChangings($appointmentsOld, $appointmentsNew, $timestamp); |
279 | 279 | if (!$appointmentsOld || ((isset($listChangings['updated']) && !empty($listChangings['updated'])) |
280 | - || (isset($listChangings['deleted']) && !empty($listChangings['deleted'])) || (isset($listChangings['inserted']) && !empty($listChangings['inserted'])))) { |
|
280 | + || (isset($listChangings['deleted']) && !empty($listChangings['deleted'])) || (isset($listChangings['inserted']) && !empty($listChangings['inserted'])))) { |
|
281 | 281 | //Changes? So we save the new online appointments |
282 | - FileChangesHelper::saveAppointmentsFileByHistory($this->dirPathHistoryAppointments . '/appointments_' . $eventCode . '.json', json_encode($appointmentsNew)); |
|
282 | + FileChangesHelper::saveAppointmentsFileByHistory($this->dirPathHistoryAppointments.'/appointments_'.$eventCode.'.json', json_encode($appointmentsNew)); |
|
283 | 283 | $this->logger->info('Detect changes - Save Changes'); |
284 | - } else { |
|
284 | + }else { |
|
285 | 285 | $this->logger->info('Detect changes - No Changes'); |
286 | 286 | } |
287 | 287 | foreach ($this->listeners as $listener) { |