Test Failed
Push — master ( 8afcbf...5178cf )
by
unknown
02:09
created
lib/GrommunioDavBackend.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -653,7 +653,7 @@
 block discarded – undo
653 653
 					],
654 654
 				], // EXISTS OR
655 655
 			],
656
-		];        // global OR
656
+		]; // global OR
657 657
 	}
658 658
 
659 659
 	/**
Please login to merge, or discard this patch.
Braces   +21 added lines, -42 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 	/**
22 22
 	 * Constructor.
23 23
 	 */
24
-	public function __construct(GLogger $glogger)
25
-	{
24
+	public function __construct(GLogger $glogger) {
26 25
 		$this->logger = $glogger;
27 26
 		$this->syncstate = new GrommunioSyncState($glogger, SYNC_DB);
28 27
 	}
@@ -35,8 +34,7 @@  discard block
 block discarded – undo
35 34
 	 *
36 35
 	 * @return bool
37 36
 	 */
38
-	public function Logon($user, $pass)
39
-	{
37
+	public function Logon($user, $pass) {
40 38
 		$this->logger->trace('%s / password', $user);
41 39
 
42 40
 		$gDavVersion = 'grommunio-dav' . @constant('GDAV_VERSION');
@@ -59,8 +57,7 @@  discard block
 block discarded – undo
59 57
 	 *
60 58
 	 * @return string
61 59
 	 */
62
-	public function GetUser()
63
-	{
60
+	public function GetUser() {
64 61
 		$this->logger->trace($this->user);
65 62
 
66 63
 		return $this->user;
@@ -76,8 +73,7 @@  discard block
 block discarded – undo
76 73
 	 *
77 74
 	 * @return string
78 75
 	 */
79
-	public function CreateFolder($principalUri, $url, $class, $displayname)
80
-	{
76
+	public function CreateFolder($principalUri, $url, $class, $displayname) {
81 77
 		$props = mapi_getprops($this->GetStore($principalUri), [PR_IPM_SUBTREE_ENTRYID]);
82 78
 		$folder = mapi_msgstore_openentry($this->GetStore($principalUri), $props[PR_IPM_SUBTREE_ENTRYID]);
83 79
 		$newfolder = mapi_folder_createfolder($folder, $url, $displayname);
@@ -93,8 +89,7 @@  discard block
 block discarded – undo
93 89
 	 *
94 90
 	 * @return bool
95 91
 	 */
96
-	public function DeleteFolder($id)
97
-	{
92
+	public function DeleteFolder($id) {
98 93
 		$folder = $this->GetMapiFolder($id);
99 94
 		if (!$folder) {
100 95
 			return false;
@@ -116,8 +111,7 @@  discard block
 block discarded – undo
116 111
 	 *
117 112
 	 * @return array
118 113
 	 */
119
-	public function GetFolders($principalUri, $classes)
120
-	{
114
+	public function GetFolders($principalUri, $classes) {
121 115
 		$this->logger->trace("principal '%s', classes '%s'", $principalUri, $classes);
122 116
 		$folders = [];
123 117
 
@@ -179,8 +173,7 @@  discard block
 block discarded – undo
179 173
 	 *
180 174
 	 * @return array
181 175
 	 */
182
-	public function GetObjects($id, $fileExtension, $filters = [])
183
-	{
176
+	public function GetObjects($id, $fileExtension, $filters = []) {
184 177
 		$folder = $this->GetMapiFolder($id);
185 178
 		$properties = $this->GetCustomProperties($id);
186 179
 		$table = mapi_folder_getcontentstable($folder, MAPI_DEFERRED_ERRORS);
@@ -251,8 +244,7 @@  discard block
 block discarded – undo
251 244
 	 *
252 245
 	 * @return mapiresource
253 246
 	 */
254
-	public function CreateObject($folderId, $folder, $objectId)
255
-	{
247
+	public function CreateObject($folderId, $folder, $objectId) {
256 248
 		$mapimessage = mapi_folder_createmessage($folder);
257 249
 		// we save the objectId in PROP_APPTTSREF so we find it by this id
258 250
 		$properties = $this->GetCustomProperties($folderId);
@@ -270,8 +262,7 @@  discard block
 block discarded – undo
270 262
 	 *
271 263
 	 * @return mapiresource
272 264
 	 */
273
-	public function GetMapiFolder($folderid)
274
-	{
265
+	public function GetMapiFolder($folderid) {
275 266
 		$this->logger->trace('Id: %s', $folderid);
276 267
 		$arr = explode(':', $folderid);
277 268
 		$entryid = mapi_msgstore_entryidfromsourcekey($this->GetStore($arr[0]), hex2bin($arr[1]));
@@ -284,8 +275,7 @@  discard block
 block discarded – undo
284 275
 	 *
285 276
 	 * @return MAPIAddressbook
286 277
 	 */
287
-	public function GetAddressBook()
288
-	{
278
+	public function GetAddressBook() {
289 279
 		// TODO should be a singleton
290 280
 		return mapi_openaddressbook($this->session);
291 281
 	}
@@ -297,8 +287,7 @@  discard block
 block discarded – undo
297 287
 	 *
298 288
 	 * @return false|MAPIStore if store not available
299 289
 	 */
300
-	public function OpenMapiStore($username = null)
301
-	{
290
+	public function OpenMapiStore($username = null) {
302 291
 		$msgstorestable = mapi_getmsgstorestable($this->session);
303 292
 		$msgstores = mapi_table_queryallrows($msgstorestable, [PR_DEFAULT_STORE, PR_ENTRYID, PR_MDB_PROVIDER]);
304 293
 
@@ -338,8 +327,7 @@  discard block
 block discarded – undo
338 327
 	 *
339 328
 	 * @return false|MAPIStore if the store is not available
340 329
 	 */
341
-	public function GetStore($storename)
342
-	{
330
+	public function GetStore($storename) {
343 331
 		if ($storename == null) {
344 332
 			$storename = $this->GetUser();
345 333
 		}
@@ -370,8 +358,7 @@  discard block
 block discarded – undo
370 358
 	 *
371 359
 	 * @return false|\grommunio\DAV\MAPIStore on error
372 360
 	 */
373
-	public function GetStoreById($id)
374
-	{
361
+	public function GetStoreById($id) {
375 362
 		$arr = explode(':', $id);
376 363
 
377 364
 		return $this->GetStore($arr[0]);
@@ -382,8 +369,7 @@  discard block
 block discarded – undo
382 369
 	 *
383 370
 	 * @return MAPISession
384 371
 	 */
385
-	public function GetSession()
386
-	{
372
+	public function GetSession() {
387 373
 		return $this->session;
388 374
 	}
389 375
 
@@ -398,8 +384,7 @@  discard block
 block discarded – undo
398 384
 	 *
399 385
 	 * @return string
400 386
 	 */
401
-	public function GetIdOfMapiMessage($folderId, $mapimessage)
402
-	{
387
+	public function GetIdOfMapiMessage($folderId, $mapimessage) {
403 388
 		$this->logger->trace("Finding ID of %s", $mapimessage);
404 389
 		$properties = $this->GetCustomProperties($folderId);
405 390
 
@@ -433,8 +418,7 @@  discard block
 block discarded – undo
433 418
 	 *
434 419
 	 * @return null|mapiresource
435 420
 	 */
436
-	public function GetMapiMessageForId($folderId, $objectUri, $mapifolder = null, $extension = null)
437
-	{
421
+	public function GetMapiMessageForId($folderId, $objectUri, $mapifolder = null, $extension = null) {
438 422
 		$this->logger->trace("Searching for '%s' in '%s' (%s) (%s)", $objectUri, $folderId, $mapifolder, $extension);
439 423
 
440 424
 		if (!$mapifolder) {
@@ -530,8 +514,7 @@  discard block
 block discarded – undo
530 514
 	 *
531 515
 	 * @return string
532 516
 	 */
533
-	public function GetObjectIdFromObjectUri($objectUri, $extension)
534
-	{
517
+	public function GetObjectIdFromObjectUri($objectUri, $extension) {
535 518
 		if (!$extension) {
536 519
 			return $objectUri;
537 520
 		}
@@ -550,8 +533,7 @@  discard block
 block discarded – undo
550 533
 	 *
551 534
 	 * @return bool installed version is superior to the checked string
552 535
 	 */
553
-	protected function checkMapiExtVersion($version = "")
554
-	{
536
+	protected function checkMapiExtVersion($version = "") {
555 537
 		if (!extension_loaded("mapi")) {
556 538
 			return false;
557 539
 		}
@@ -575,8 +557,7 @@  discard block
 block discarded – undo
575 557
 	 *
576 558
 	 * @return mixed
577 559
 	 */
578
-	protected function GetCustomProperties($id)
579
-	{
560
+	protected function GetCustomProperties($id) {
580 561
 		if (!isset($this->customprops[$id])) {
581 562
 			$this->logger->trace("Fetching properties id:%s", $id);
582 563
 			$store = $this->GetStoreById($id);
@@ -599,8 +580,7 @@  discard block
 block discarded – undo
599 580
 	 * @return array
600 581
 	 */
601 582
 	// TODO getting named properties
602
-	public function GetCalendarRestriction($store, $start, $end)
603
-	{
583
+	public function GetCalendarRestriction($store, $start, $end) {
604 584
 		$props = MapiProps::GetAppointmentProperties();
605 585
 		$props = getPropIdsFromStrings($store, $props);
606 586
 
@@ -692,8 +672,7 @@  discard block
 block discarded – undo
692 672
 	 *
693 673
 	 * @return array
694 674
 	 */
695
-	public function Sync($folderId, $syncToken, $fileExtension, $limit = null)
696
-	{
675
+	public function Sync($folderId, $syncToken, $fileExtension, $limit = null) {
697 676
 		$arr = explode(':', $folderId);
698 677
 		$phpwrapper = new PHPWrapper($this->GetStoreById($folderId), $this->logger, $this->GetCustomProperties($folderId), $fileExtension, $this->syncstate, $arr[1]);
699 678
 		$mapiimporter = mapi_wrap_importcontentschanges($phpwrapper);
Please login to merge, or discard this patch.
lib/GrommunioSyncState.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/GrommunioCalDavBackend.php 1 patch
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/GLogger.php 1 patch
Braces   +19 added lines, -38 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/DAVACL.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
lib/GrommunioIMipPlugin.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
lib/PrincipalsBackend.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/MapiProps.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
lib/GrommunioSchedulePlugin.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.