@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | * @param GLogger $logger |
| 20 | 20 | * @param string $dbstring |
| 21 | 21 | */ |
| 22 | - public function __construct($logger, $dbstring) |
|
| 23 | - { |
|
| 22 | + public function __construct($logger, $dbstring) { |
|
| 24 | 23 | $this->logger = $logger; |
| 25 | 24 | $this->logger->trace("Using db %s", $dbstring); |
| 26 | 25 | $this->db = new \PDO($dbstring); |
@@ -43,8 +42,7 @@ discard block |
||
| 43 | 42 | * |
| 44 | 43 | * @return string |
| 45 | 44 | */ |
| 46 | - public function getState($folderid, $id) |
|
| 47 | - { |
|
| 45 | + public function getState($folderid, $id) { |
|
| 48 | 46 | $query = "SELECT value FROM gdav_sync_state WHERE folderid = :folderid AND id = :id"; |
| 49 | 47 | $statement = $this->db->prepare($query); |
| 50 | 48 | $statement->bindParam(":folderid", $folderid); |
@@ -66,8 +64,7 @@ discard block |
||
| 66 | 64 | * @param string $id |
| 67 | 65 | * @param string $value |
| 68 | 66 | */ |
| 69 | - public function setState($folderid, $id, $value) |
|
| 70 | - { |
|
| 67 | + public function setState($folderid, $id, $value) { |
|
| 71 | 68 | $query = "REPLACE INTO gdav_sync_state (id, folderid, value) VALUES(:id, :folderid, :value)"; |
| 72 | 69 | $statement = $this->db->prepare($query); |
| 73 | 70 | $statement->bindParam(":folderid", $folderid); |
@@ -84,8 +81,7 @@ discard block |
||
| 84 | 81 | * @param string $sourcekey |
| 85 | 82 | * @param string $appttsref |
| 86 | 83 | */ |
| 87 | - public function rememberAppttsref($folderid, $sourcekey, $appttsref) |
|
| 88 | - { |
|
| 84 | + public function rememberAppttsref($folderid, $sourcekey, $appttsref) { |
|
| 89 | 85 | $query = "REPLACE INTO gdav_sync_appttsref (folderid, sourcekey, appttsref) VALUES(:folderid, :sourcekey, :appttsref)"; |
| 90 | 86 | $statement = $this->db->prepare($query); |
| 91 | 87 | $statement->bindParam(":folderid", $folderid); |
@@ -103,8 +99,7 @@ discard block |
||
| 103 | 99 | * |
| 104 | 100 | * @return string |
| 105 | 101 | */ |
| 106 | - public function getAppttsref($folderid, $sourcekey) |
|
| 107 | - { |
|
| 102 | + public function getAppttsref($folderid, $sourcekey) { |
|
| 108 | 103 | $query = "SELECT appttsref FROM gdav_sync_appttsref WHERE folderid = :folderid AND sourcekey = :sourcekey"; |
| 109 | 104 | $statement = $this->db->prepare($query); |
| 110 | 105 | $statement->bindParam(":folderid", $folderid); |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Constructor. |
| 31 | 31 | */ |
| 32 | - public function __construct(GrommunioDavBackend $gDavBackend, GLogger $glogger) |
|
| 33 | - { |
|
| 32 | + public function __construct(GrommunioDavBackend $gDavBackend, GLogger $glogger) { |
|
| 34 | 33 | $this->gDavBackend = $gDavBackend; |
| 35 | 34 | $this->logger = $glogger; |
| 36 | 35 | } |
@@ -44,8 +43,7 @@ discard block |
||
| 44 | 43 | * @param string $calendarId |
| 45 | 44 | * @param mapiresource $calendar |
| 46 | 45 | */ |
| 47 | - private function UpdateFB($calendarId, $calendar) |
|
| 48 | - { |
|
| 46 | + private function UpdateFB($calendarId, $calendar) { |
|
| 49 | 47 | $session = $this->gDavBackend->GetSession(); |
| 50 | 48 | $store = $this->gDavBackend->GetStoreById($calendarId); |
| 51 | 49 | $weekUnixTime = 7 * 24 * 60 * 60; |
@@ -84,8 +82,7 @@ discard block |
||
| 84 | 82 | * |
| 85 | 83 | * @return array |
| 86 | 84 | */ |
| 87 | - public function getCalendarsForUser($principalUri) |
|
| 88 | - { |
|
| 85 | + public function getCalendarsForUser($principalUri) { |
|
| 89 | 86 | $this->logger->trace("principalUri: %s", $principalUri); |
| 90 | 87 | |
| 91 | 88 | return $this->gDavBackend->GetFolders($principalUri, static::CONTAINER_CLASSES); |
@@ -102,8 +99,7 @@ discard block |
||
| 102 | 99 | * |
| 103 | 100 | * @return string |
| 104 | 101 | */ |
| 105 | - public function createCalendar($principalUri, $calendarUri, array $properties) |
|
| 106 | - { |
|
| 102 | + public function createCalendar($principalUri, $calendarUri, array $properties) { |
|
| 107 | 103 | $this->logger->trace("principalUri: %s - calendarUri: %s - properties: %s", $principalUri, $calendarUri, $properties); |
| 108 | 104 | // TODO Add displayname |
| 109 | 105 | return $this->gDavBackend->CreateFolder($principalUri, $calendarUri, static::CONTAINER_CLASS, ""); |
@@ -114,8 +110,7 @@ discard block |
||
| 114 | 110 | * |
| 115 | 111 | * @param string $calendarId |
| 116 | 112 | */ |
| 117 | - public function deleteCalendar($calendarId) |
|
| 118 | - { |
|
| 113 | + public function deleteCalendar($calendarId) { |
|
| 119 | 114 | $this->logger->trace("calendarId: %s", $calendarId); |
| 120 | 115 | $success = $this->gDavBackend->DeleteFolder($calendarId); |
| 121 | 116 | // TODO evaluate $success |
@@ -153,8 +148,7 @@ discard block |
||
| 153 | 148 | * |
| 154 | 149 | * @return array |
| 155 | 150 | */ |
| 156 | - public function getCalendarObjects($calendarId) |
|
| 157 | - { |
|
| 151 | + public function getCalendarObjects($calendarId) { |
|
| 158 | 152 | $result = $this->gDavBackend->GetObjects($calendarId, static::FILE_EXTENSION); |
| 159 | 153 | $this->logger->trace("calendarId: %s found %d objects", $calendarId, count($result)); |
| 160 | 154 | |
@@ -210,8 +204,7 @@ discard block |
||
| 210 | 204 | * |
| 211 | 205 | * @return array |
| 212 | 206 | */ |
| 213 | - public function calendarQuery($calendarId, array $filters) |
|
| 214 | - { |
|
| 207 | + public function calendarQuery($calendarId, array $filters) { |
|
| 215 | 208 | $start = $end = null; |
| 216 | 209 | $types = []; |
| 217 | 210 | foreach ($filters['comp-filters'] as $filter) { |
@@ -266,8 +259,7 @@ discard block |
||
| 266 | 259 | * |
| 267 | 260 | * @return null|array |
| 268 | 261 | */ |
| 269 | - public function getCalendarObject($calendarId, $objectUri, $mapifolder = null) |
|
| 270 | - { |
|
| 262 | + public function getCalendarObject($calendarId, $objectUri, $mapifolder = null) { |
|
| 271 | 263 | $this->logger->trace("calendarId: %s - objectUri: %s - mapifolder: %s", $calendarId, $objectUri, $mapifolder); |
| 272 | 264 | |
| 273 | 265 | if (!$mapifolder) { |
@@ -333,8 +325,7 @@ discard block |
||
| 333 | 325 | * |
| 334 | 326 | * @return null|string |
| 335 | 327 | */ |
| 336 | - public function createCalendarObject($calendarId, $objectUri, $calendarData) |
|
| 337 | - { |
|
| 328 | + public function createCalendarObject($calendarId, $objectUri, $calendarData) { |
|
| 338 | 329 | $this->logger->trace("calendarId: %s - objectUri: %s - calendarData: %s", $calendarId, $objectUri, $calendarData); |
| 339 | 330 | $objectId = $this->gDavBackend->GetObjectIdFromObjectUri($objectUri, static::FILE_EXTENSION); |
| 340 | 331 | $folder = $this->gDavBackend->GetMapiFolder($calendarId); |
@@ -366,8 +357,7 @@ discard block |
||
| 366 | 357 | * |
| 367 | 358 | * @return null|string |
| 368 | 359 | */ |
| 369 | - public function updateCalendarObject($calendarId, $objectUri, $calendarData) |
|
| 370 | - { |
|
| 360 | + public function updateCalendarObject($calendarId, $objectUri, $calendarData) { |
|
| 371 | 361 | $this->logger->trace("calendarId: %s - objectUri: %s - calendarData: %s", $calendarId, $objectUri, $calendarData); |
| 372 | 362 | |
| 373 | 363 | $folder = $this->gDavBackend->GetMapiFolder($calendarId); |
@@ -389,8 +379,7 @@ discard block |
||
| 389 | 379 | * |
| 390 | 380 | * @return null|string |
| 391 | 381 | */ |
| 392 | - private function setData($calendarId, $mapimessage, $ics) |
|
| 393 | - { |
|
| 382 | + private function setData($calendarId, $mapimessage, $ics) { |
|
| 394 | 383 | $this->logger->trace("mapimessage: %s - ics: %s", $mapimessage, $ics); |
| 395 | 384 | // this should be cached or moved to gDavBackend |
| 396 | 385 | $store = $this->gDavBackend->GetStoreById($calendarId); |
@@ -465,8 +454,7 @@ discard block |
||
| 465 | 454 | * @param string $calendarId |
| 466 | 455 | * @param string $objectUri |
| 467 | 456 | */ |
| 468 | - public function deleteCalendarObject($calendarId, $objectUri) |
|
| 469 | - { |
|
| 457 | + public function deleteCalendarObject($calendarId, $objectUri) { |
|
| 470 | 458 | $this->logger->trace("calendarId: %s - objectUri: %s", $calendarId, $objectUri); |
| 471 | 459 | |
| 472 | 460 | $mapifolder = $this->gDavBackend->GetMapiFolder($calendarId); |
@@ -488,8 +476,7 @@ discard block |
||
| 488 | 476 | * |
| 489 | 477 | * @return array |
| 490 | 478 | */ |
| 491 | - public function getSchedulingObject($principalUri, $objectUri) |
|
| 492 | - { |
|
| 479 | + public function getSchedulingObject($principalUri, $objectUri) { |
|
| 493 | 480 | $this->logger->trace("principalUri: %s - objectUri: %s", $principalUri, $objectUri); |
| 494 | 481 | |
| 495 | 482 | return []; |
@@ -504,8 +491,7 @@ discard block |
||
| 504 | 491 | * |
| 505 | 492 | * @return array |
| 506 | 493 | */ |
| 507 | - public function getSchedulingObjects($principalUri) |
|
| 508 | - { |
|
| 494 | + public function getSchedulingObjects($principalUri) { |
|
| 509 | 495 | $this->logger->trace("principalUri: %s", $principalUri); |
| 510 | 496 | |
| 511 | 497 | return []; |
@@ -519,8 +505,7 @@ discard block |
||
| 519 | 505 | * @param string $principalUri |
| 520 | 506 | * @param string $objectUri |
| 521 | 507 | */ |
| 522 | - public function deleteSchedulingObject($principalUri, $objectUri) |
|
| 523 | - { |
|
| 508 | + public function deleteSchedulingObject($principalUri, $objectUri) { |
|
| 524 | 509 | $this->logger->trace("principalUri: %s - objectUri: %s", $principalUri, $objectUri); |
| 525 | 510 | } |
| 526 | 511 | |
@@ -533,8 +518,7 @@ discard block |
||
| 533 | 518 | * @param string $objectUri |
| 534 | 519 | * @param string $objectData |
| 535 | 520 | */ |
| 536 | - public function createSchedulingObject($principalUri, $objectUri, $objectData) |
|
| 537 | - { |
|
| 521 | + public function createSchedulingObject($principalUri, $objectUri, $objectData) { |
|
| 538 | 522 | $this->logger->trace("principalUri: %s - objectUri: %s - objectData: %s", $principalUri, $objectUri, $objectData); |
| 539 | 523 | } |
| 540 | 524 | |
@@ -547,8 +531,7 @@ discard block |
||
| 547 | 531 | * |
| 548 | 532 | * @return string |
| 549 | 533 | */ |
| 550 | - public function getSchedulingInboxCtag($principalUri) |
|
| 551 | - { |
|
| 534 | + public function getSchedulingInboxCtag($principalUri) { |
|
| 552 | 535 | $this->logger->trace("principalUri: %s", $principalUri); |
| 553 | 536 | |
| 554 | 537 | return "empty"; |
@@ -611,8 +594,7 @@ discard block |
||
| 611 | 594 | * |
| 612 | 595 | * @return array |
| 613 | 596 | */ |
| 614 | - public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) |
|
| 615 | - { |
|
| 597 | + public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) { |
|
| 616 | 598 | $this->logger->trace("calendarId: %s - syncToken: %s - syncLevel: %d - limit: %d", $calendarId, $syncToken, $syncLevel, $limit); |
| 617 | 599 | |
| 618 | 600 | return $this->gDavBackend->Sync($calendarId, $syncToken, static::FILE_EXTENSION, $limit); |
@@ -31,8 +31,7 @@ discard block |
||
| 31 | 31 | * |
| 32 | 32 | * @param mixed $name |
| 33 | 33 | */ |
| 34 | - public function __construct($name) |
|
| 35 | - { |
|
| 34 | + public function __construct($name) { |
|
| 36 | 35 | $this->logger = self::$parentLogger->withName($name); |
| 37 | 36 | |
| 38 | 37 | // keep an output puffer in case we do debug logging |
@@ -53,8 +52,7 @@ discard block |
||
| 53 | 52 | * @param array|string $configuration either a path to the configuration |
| 54 | 53 | * file, or a configuration array |
| 55 | 54 | */ |
| 56 | - public static function configure($configuration = null) |
|
| 57 | - { |
|
| 55 | + public static function configure($configuration = null) { |
|
| 58 | 56 | // Load configuration from ini-file if a file path (string) is given |
| 59 | 57 | if (is_string($configuration)) { |
| 60 | 58 | $configuration = parse_ini_file($configuration); |
@@ -128,16 +126,14 @@ discard block |
||
| 128 | 126 | /** |
| 129 | 127 | * Destroy configurations for logger definitions. |
| 130 | 128 | */ |
| 131 | - public function resetConfiguration() |
|
| 132 | - { |
|
| 129 | + public function resetConfiguration() { |
|
| 133 | 130 | if (static::$parentLogger) { |
| 134 | 131 | static::$parentLogger->reset(); |
| 135 | 132 | static::$parentLogger = null; |
| 136 | 133 | } |
| 137 | 134 | } |
| 138 | 135 | |
| 139 | - public function getGPSR3Logger() |
|
| 140 | - { |
|
| 136 | + public function getGPSR3Logger() { |
|
| 141 | 137 | return $this->logger; |
| 142 | 138 | } |
| 143 | 139 | |
@@ -149,8 +145,7 @@ discard block |
||
| 149 | 145 | * |
| 150 | 146 | * @return Logger |
| 151 | 147 | */ |
| 152 | - public static function GetLogger($class) |
|
| 153 | - { |
|
| 148 | + public static function GetLogger($class) { |
|
| 154 | 149 | if (!isset(static::$listOfLoggers[$class])) { |
| 155 | 150 | static::$listOfLoggers[$class] = new GLogger(static::GetClassnameOnly($class)); |
| 156 | 151 | } |
@@ -165,8 +160,7 @@ discard block |
||
| 165 | 160 | * |
| 166 | 161 | * @return string |
| 167 | 162 | */ |
| 168 | - protected static function GetClassnameOnly($namespaceWithClass) |
|
| 169 | - { |
|
| 163 | + protected static function GetClassnameOnly($namespaceWithClass) { |
|
| 170 | 164 | if (strpos($namespaceWithClass, '\\') == false) { |
| 171 | 165 | return $namespaceWithClass; |
| 172 | 166 | } |
@@ -177,8 +171,7 @@ discard block |
||
| 177 | 171 | /** |
| 178 | 172 | * Logs the incoming data (headers + body) to debug. |
| 179 | 173 | */ |
| 180 | - public function LogIncoming(\Sabre\HTTP\RequestInterface $request) |
|
| 181 | - { |
|
| 174 | + public function LogIncoming(\Sabre\HTTP\RequestInterface $request) { |
|
| 182 | 175 | // only do any of this is we are looking for debug messages |
| 183 | 176 | if ($this->logger->isHandling(Logger::DEBUG)) { |
| 184 | 177 | $inputHeader = $request->getMethod() . ' ' . $request->getUrl() . ' HTTP/' . $request->getHTTPVersion() . "\r\n"; |
@@ -208,8 +201,7 @@ discard block |
||
| 208 | 201 | /** |
| 209 | 202 | * Logs the outgoing data (headers + body) to debug. |
| 210 | 203 | */ |
| 211 | - public function LogOutgoing(\Sabre\HTTP\ResponseInterface $response) |
|
| 212 | - { |
|
| 204 | + public function LogOutgoing(\Sabre\HTTP\ResponseInterface $response) { |
|
| 213 | 205 | // only do any of this is we are looking for debug messages |
| 214 | 206 | if ($this->logger->isHandling(Logger::DEBUG)) { |
| 215 | 207 | $output = 'HTTP/' . $response->getHttpVersion() . ' ' . $response->getStatus() . ' ' . $response->getStatusText() . "\n"; |
@@ -238,8 +230,7 @@ discard block |
||
| 238 | 230 | * @param array $args |
| 239 | 231 | * @param string $suffix an optional suffix that is appended to the message |
| 240 | 232 | */ |
| 241 | - protected function writeLog($level, $args, $suffix = '') |
|
| 242 | - { |
|
| 233 | + protected function writeLog($level, $args, $suffix = '') { |
|
| 243 | 234 | $outArgs = []; |
| 244 | 235 | foreach ($args as $arg) { |
| 245 | 236 | if (is_array($arg)) { |
@@ -262,8 +253,7 @@ discard block |
||
| 262 | 253 | * |
| 263 | 254 | * @return bool |
| 264 | 255 | */ |
| 265 | - protected function verifyLogSyntax($arguments) |
|
| 266 | - { |
|
| 256 | + protected function verifyLogSyntax($arguments) { |
|
| 267 | 257 | $count = count($arguments); |
| 268 | 258 | $quoted_procent = substr_count($arguments[0], "%%"); |
| 269 | 259 | $t = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); |
@@ -292,8 +282,7 @@ discard block |
||
| 292 | 282 | * |
| 293 | 283 | * @return string |
| 294 | 284 | */ |
| 295 | - protected function getCaller($level = 1, $fileline = false) |
|
| 296 | - { |
|
| 285 | + protected function getCaller($level = 1, $fileline = false) { |
|
| 297 | 286 | $wlevel = $level + 1; |
| 298 | 287 | $t = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $wlevel + 1); |
| 299 | 288 | if (isset($t[$wlevel]['function'])) { |
@@ -315,8 +304,7 @@ discard block |
||
| 315 | 304 | * |
| 316 | 305 | * @return string |
| 317 | 306 | */ |
| 318 | - public function FormatBytes($bytes, $precision = 2) |
|
| 319 | - { |
|
| 307 | + public function FormatBytes($bytes, $precision = 2) { |
|
| 320 | 308 | if ($bytes <= 0) { |
| 321 | 309 | return '0 B'; |
| 322 | 310 | } |
@@ -338,8 +326,7 @@ discard block |
||
| 338 | 326 | * @param int $errline |
| 339 | 327 | * @param mixed $errcontext |
| 340 | 328 | */ |
| 341 | - public static function ErrorHandler($errno, $errstr, $errfile, $errline, $errcontext = []) |
|
| 342 | - { |
|
| 329 | + public static function ErrorHandler($errno, $errstr, $errfile, $errline, $errcontext = []) { |
|
| 343 | 330 | if (defined('LOG_ERROR_MASK')) { |
| 344 | 331 | $errno &= LOG_ERROR_MASK; |
| 345 | 332 | } |
@@ -389,8 +376,7 @@ discard block |
||
| 389 | 376 | * @param mixed $message message |
| 390 | 377 | * @param mixed ...params |
| 391 | 378 | */ |
| 392 | - public function trace() |
|
| 393 | - { |
|
| 379 | + public function trace() { |
|
| 394 | 380 | if (DEVELOPER_MODE) { |
| 395 | 381 | if (!$this->verifyLogSyntax(func_get_args())) { |
| 396 | 382 | return; |
@@ -409,8 +395,7 @@ discard block |
||
| 409 | 395 | * @param mixed $message message |
| 410 | 396 | * @param mixed ...params |
| 411 | 397 | */ |
| 412 | - public function debug() |
|
| 413 | - { |
|
| 398 | + public function debug() { |
|
| 414 | 399 | if (DEVELOPER_MODE) { |
| 415 | 400 | if (!$this->verifyLogSyntax(func_get_args())) { |
| 416 | 401 | return; |
@@ -429,8 +414,7 @@ discard block |
||
| 429 | 414 | * @param mixed $message message |
| 430 | 415 | * @param mixed ...params |
| 431 | 416 | */ |
| 432 | - public function info() |
|
| 433 | - { |
|
| 417 | + public function info() { |
|
| 434 | 418 | if (DEVELOPER_MODE) { |
| 435 | 419 | if (!$this->verifyLogSyntax(func_get_args())) { |
| 436 | 420 | return; |
@@ -449,8 +433,7 @@ discard block |
||
| 449 | 433 | * @param mixed $message message |
| 450 | 434 | * @param mixed ...params |
| 451 | 435 | */ |
| 452 | - public function warn() |
|
| 453 | - { |
|
| 436 | + public function warn() { |
|
| 454 | 437 | if (DEVELOPER_MODE) { |
| 455 | 438 | if (!$this->verifyLogSyntax(func_get_args())) { |
| 456 | 439 | return; |
@@ -469,8 +452,7 @@ discard block |
||
| 469 | 452 | * @param mixed $message message |
| 470 | 453 | * @param mixed ...params |
| 471 | 454 | */ |
| 472 | - public function error() |
|
| 473 | - { |
|
| 455 | + public function error() { |
|
| 474 | 456 | if (DEVELOPER_MODE) { |
| 475 | 457 | if (!$this->verifyLogSyntax(func_get_args())) { |
| 476 | 458 | return; |
@@ -489,8 +471,7 @@ discard block |
||
| 489 | 471 | * @param mixed $message message |
| 490 | 472 | * @param mixed ...params |
| 491 | 473 | */ |
| 492 | - public function fatal() |
|
| 493 | - { |
|
| 474 | + public function fatal() { |
|
| 494 | 475 | if (DEVELOPER_MODE) { |
| 495 | 476 | if (!$this->verifyLogSyntax(func_get_args())) { |
| 496 | 477 | return; |
@@ -22,8 +22,7 @@ |
||
| 22 | 22 | * |
| 23 | 23 | * @return array |
| 24 | 24 | */ |
| 25 | - public function getACL($node) |
|
| 26 | - { |
|
| 25 | + public function getACL($node) { |
|
| 27 | 26 | return [ |
| 28 | 27 | [ |
| 29 | 28 | 'privilege' => '{DAV:}all', |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Constructor. |
| 16 | 16 | */ |
| 17 | - public function __construct(GrommunioDavBackend $gDavBackend, GLogger $glogger) |
|
| 18 | - { |
|
| 17 | + public function __construct(GrommunioDavBackend $gDavBackend, GLogger $glogger) { |
|
| 19 | 18 | $this->gDavBackend = $gDavBackend; |
| 20 | 19 | $this->logger = $glogger; |
| 21 | 20 | } |
@@ -26,8 +25,7 @@ discard block |
||
| 26 | 25 | * Using the information in iTipMessage to send out a meeting |
| 27 | 26 | * invitation. |
| 28 | 27 | */ |
| 29 | - public function schedule(\Sabre\VObject\ITip\Message $iTipMessage) |
|
| 30 | - { |
|
| 28 | + public function schedule(\Sabre\VObject\ITip\Message $iTipMessage) { |
|
| 31 | 29 | $this->logger->trace("method: %s - recipient: %s - significantChange: %d - scheduleStatus: %s - message: %s", $iTipMessage->method, $iTipMessage->recipient, $iTipMessage->significantChange, $iTipMessage->scheduleStatus, $iTipMessage->message->serialize()); |
| 32 | 30 | |
| 33 | 31 | if (!$iTipMessage->significantChange) { |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | /** |
| 17 | 17 | * Constructor. |
| 18 | 18 | */ |
| 19 | - public function __construct(GrommunioDavBackend $gDavBackend) |
|
| 20 | - { |
|
| 19 | + public function __construct(GrommunioDavBackend $gDavBackend) { |
|
| 21 | 20 | $this->gDavBackend = $gDavBackend; |
| 22 | 21 | } |
| 23 | 22 | |
@@ -38,8 +37,7 @@ discard block |
||
| 38 | 37 | * |
| 39 | 38 | * @return array |
| 40 | 39 | */ |
| 41 | - public function getPrincipalsByPrefix($prefixPath) |
|
| 42 | - { |
|
| 40 | + public function getPrincipalsByPrefix($prefixPath) { |
|
| 43 | 41 | $principals = []; |
| 44 | 42 | if ($prefixPath === 'principals') { |
| 45 | 43 | $principals[] = $this->getPrincipalByPath($prefixPath); |
@@ -58,8 +56,7 @@ discard block |
||
| 58 | 56 | * |
| 59 | 57 | * @return array |
| 60 | 58 | */ |
| 61 | - public function getPrincipalByPath($path) |
|
| 62 | - { |
|
| 59 | + public function getPrincipalByPath($path) { |
|
| 63 | 60 | if ($path === 'principals/public') { |
| 64 | 61 | return [ |
| 65 | 62 | 'id' => 'public', |
@@ -104,8 +101,7 @@ discard block |
||
| 104 | 101 | * |
| 105 | 102 | * @param string $path |
| 106 | 103 | */ |
| 107 | - public function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) |
|
| 108 | - { |
|
| 104 | + public function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) { |
|
| 109 | 105 | } |
| 110 | 106 | |
| 111 | 107 | /** |
@@ -137,8 +133,7 @@ discard block |
||
| 137 | 133 | * |
| 138 | 134 | * @return array |
| 139 | 135 | */ |
| 140 | - public function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') |
|
| 141 | - { |
|
| 136 | + public function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { |
|
| 142 | 137 | } |
| 143 | 138 | |
| 144 | 139 | /** |
@@ -159,8 +154,7 @@ discard block |
||
| 159 | 154 | * |
| 160 | 155 | * @return string |
| 161 | 156 | */ |
| 162 | - public function findByUri($uri, $principalPrefix) |
|
| 163 | - { |
|
| 157 | + public function findByUri($uri, $principalPrefix) { |
|
| 164 | 158 | } |
| 165 | 159 | |
| 166 | 160 | /** |
@@ -170,8 +164,7 @@ discard block |
||
| 170 | 164 | * |
| 171 | 165 | * @return array |
| 172 | 166 | */ |
| 173 | - public function getGroupMemberSet($principal) |
|
| 174 | - { |
|
| 167 | + public function getGroupMemberSet($principal) { |
|
| 175 | 168 | return []; |
| 176 | 169 | } |
| 177 | 170 | |
@@ -182,8 +175,7 @@ discard block |
||
| 182 | 175 | * |
| 183 | 176 | * @return array |
| 184 | 177 | */ |
| 185 | - public function getGroupMembership($principal) |
|
| 186 | - { |
|
| 178 | + public function getGroupMembership($principal) { |
|
| 187 | 179 | return []; |
| 188 | 180 | } |
| 189 | 181 | |
@@ -194,7 +186,6 @@ discard block |
||
| 194 | 186 | * |
| 195 | 187 | * @param string $principal |
| 196 | 188 | */ |
| 197 | - public function setGroupMemberSet($principal, array $members) |
|
| 198 | - { |
|
| 189 | + public function setGroupMemberSet($principal, array $members) { |
|
| 199 | 190 | } |
| 200 | 191 | } |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | * |
| 20 | 20 | * @return array |
| 21 | 21 | */ |
| 22 | - public static function GetAppointmentProperties() |
|
| 23 | - { |
|
| 22 | + public static function GetAppointmentProperties() { |
|
| 24 | 23 | return [ |
| 25 | 24 | "sourcekey" => PR_SOURCE_KEY, |
| 26 | 25 | "representingentryid" => PR_SENT_REPRESENTING_ENTRYID, |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Constructor. |
| 16 | 16 | */ |
| 17 | - public function __construct(GrommunioDavBackend $gDavBackend, GLogger $glogger) |
|
| 18 | - { |
|
| 17 | + public function __construct(GrommunioDavBackend $gDavBackend, GLogger $glogger) { |
|
| 19 | 18 | $this->gDavBackend = $gDavBackend; |
| 20 | 19 | $this->logger = $glogger; |
| 21 | 20 | } |
@@ -30,8 +29,7 @@ discard block |
||
| 30 | 29 | * |
| 31 | 30 | * @return array |
| 32 | 31 | */ |
| 33 | - protected function getFreeBusyForEmail($email, \DateTimeInterface $start, \DateTimeInterface $end, \Sabre\VObject\Component $request) |
|
| 34 | - { |
|
| 32 | + protected function getFreeBusyForEmail($email, \DateTimeInterface $start, \DateTimeInterface $end, \Sabre\VObject\Component $request) { |
|
| 35 | 33 | $this->logger->trace("email: %s - start: %d - end: %d", $email, $start->getTimestamp(), $end->getTimestamp()); |
| 36 | 34 | |
| 37 | 35 | $addrbook = $this->gDavBackend->GetAddressBook(); |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | * @param GrommunioSyncState $syncstate |
| 30 | 30 | * @param string $folderid |
| 31 | 31 | */ |
| 32 | - public function __construct($store, $logger, $props, $fileext, $syncstate, $folderid) |
|
| 33 | - { |
|
| 32 | + public function __construct($store, $logger, $props, $fileext, $syncstate, $folderid) { |
|
| 34 | 33 | $this->store = $store; |
| 35 | 34 | $this->logger = $logger; |
| 36 | 35 | $this->props = $props; |
@@ -48,8 +47,7 @@ discard block |
||
| 48 | 47 | * |
| 49 | 48 | * @return array |
| 50 | 49 | */ |
| 51 | - public function GetAdded() |
|
| 52 | - { |
|
| 50 | + public function GetAdded() { |
|
| 53 | 51 | return $this->added; |
| 54 | 52 | } |
| 55 | 53 | |
@@ -58,8 +56,7 @@ discard block |
||
| 58 | 56 | * |
| 59 | 57 | * @return array |
| 60 | 58 | */ |
| 61 | - public function GetModified() |
|
| 62 | - { |
|
| 59 | + public function GetModified() { |
|
| 63 | 60 | return $this->modified; |
| 64 | 61 | } |
| 65 | 62 | |
@@ -68,8 +65,7 @@ discard block |
||
| 68 | 65 | * |
| 69 | 66 | * @return array |
| 70 | 67 | */ |
| 71 | - public function GetDeleted() |
|
| 72 | - { |
|
| 68 | + public function GetDeleted() { |
|
| 73 | 69 | return $this->deleted; |
| 74 | 70 | } |
| 75 | 71 | |
@@ -78,8 +74,7 @@ discard block |
||
| 78 | 74 | * |
| 79 | 75 | * @return int |
| 80 | 76 | */ |
| 81 | - public function Total() |
|
| 82 | - { |
|
| 77 | + public function Total() { |
|
| 83 | 78 | return count($this->added) + count($this->modified) + count($this->deleted); |
| 84 | 79 | } |
| 85 | 80 | |
@@ -92,8 +87,7 @@ discard block |
||
| 92 | 87 | * |
| 93 | 88 | * @return long |
| 94 | 89 | */ |
| 95 | - public function ImportMessageChange($props, $flags, $retmapimessage) |
|
| 96 | - { |
|
| 90 | + public function ImportMessageChange($props, $flags, $retmapimessage) { |
|
| 97 | 91 | // if the entryid is not available, do the fallback to the sourcekey |
| 98 | 92 | if (isset($props[PR_ENTRYID])) { |
| 99 | 93 | $entryid = $props[PR_ENTRYID]; |
@@ -134,8 +128,7 @@ discard block |
||
| 134 | 128 | * @param long $flags |
| 135 | 129 | * @param array $sourcekeys array with sourcekeys |
| 136 | 130 | */ |
| 137 | - public function ImportMessageDeletion($flags, $sourcekeys) |
|
| 138 | - { |
|
| 131 | + public function ImportMessageDeletion($flags, $sourcekeys) { |
|
| 139 | 132 | foreach ($sourcekeys as $sourcekey) { |
| 140 | 133 | $this->logger->trace("got %s", bin2hex($sourcekey)); |
| 141 | 134 | $appttsref = $this->syncstate->getAppttsref($this->folderid, bin2hex($sourcekey)); |
@@ -149,33 +142,26 @@ discard block |
||
| 149 | 142 | } |
| 150 | 143 | |
| 151 | 144 | /** Implement MAPI interface */ |
| 152 | - public function Config($stream, $flags = 0) |
|
| 153 | - { |
|
| 145 | + public function Config($stream, $flags = 0) { |
|
| 154 | 146 | } |
| 155 | 147 | |
| 156 | - public function GetLastError($hresult, $ulflags, &$lpmapierror) |
|
| 157 | - { |
|
| 148 | + public function GetLastError($hresult, $ulflags, &$lpmapierror) { |
|
| 158 | 149 | } |
| 159 | 150 | |
| 160 | - public function UpdateState($stream) |
|
| 161 | - { |
|
| 151 | + public function UpdateState($stream) { |
|
| 162 | 152 | } |
| 163 | 153 | |
| 164 | - public function ImportMessageMove($sourcekeysrcfolder, $sourcekeysrcmessage, $message, $sourcekeydestmessage, $changenumdestmessage) |
|
| 165 | - { |
|
| 154 | + public function ImportMessageMove($sourcekeysrcfolder, $sourcekeysrcmessage, $message, $sourcekeydestmessage, $changenumdestmessage) { |
|
| 166 | 155 | } |
| 167 | 156 | |
| 168 | - public function ImportPerUserReadStateChange($readstates) |
|
| 169 | - { |
|
| 157 | + public function ImportPerUserReadStateChange($readstates) { |
|
| 170 | 158 | } |
| 171 | 159 | |
| 172 | - public function ImportFolderChange($props) |
|
| 173 | - { |
|
| 160 | + public function ImportFolderChange($props) { |
|
| 174 | 161 | return 0; |
| 175 | 162 | } |
| 176 | 163 | |
| 177 | - public function ImportFolderDeletion($flags, $sourcekeys) |
|
| 178 | - { |
|
| 164 | + public function ImportFolderDeletion($flags, $sourcekeys) { |
|
| 179 | 165 | return 0; |
| 180 | 166 | } |
| 181 | 167 | } |