Passed
Push — master ( 9035be...9f2495 )
by Julius
17:19 queued 12s
created
apps/dav/lib/Command/SyncSystemAddressBook.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 		$output->writeln('Syncing users ...');
55 55
 		$progress = new ProgressBar($output);
56 56
 		$progress->start();
57
-		$this->syncService->syncInstance(function () use ($progress) {
57
+		$this->syncService->syncInstance(function() use ($progress) {
58 58
 			$progress->advance();
59 59
 		});
60 60
 
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -32,37 +32,37 @@
 block discarded – undo
32 32
 
33 33
 class SyncSystemAddressBook extends Command {
34 34
 
35
-	/** @var SyncService */
36
-	private $syncService;
35
+    /** @var SyncService */
36
+    private $syncService;
37 37
 
38
-	/**
39
-	 * @param SyncService $syncService
40
-	 */
41
-	public function __construct(SyncService $syncService) {
42
-		parent::__construct();
43
-		$this->syncService = $syncService;
44
-	}
38
+    /**
39
+     * @param SyncService $syncService
40
+     */
41
+    public function __construct(SyncService $syncService) {
42
+        parent::__construct();
43
+        $this->syncService = $syncService;
44
+    }
45 45
 
46
-	protected function configure() {
47
-		$this
48
-			->setName('dav:sync-system-addressbook')
49
-			->setDescription('Synchronizes users to the system addressbook');
50
-	}
46
+    protected function configure() {
47
+        $this
48
+            ->setName('dav:sync-system-addressbook')
49
+            ->setDescription('Synchronizes users to the system addressbook');
50
+    }
51 51
 
52
-	/**
53
-	 * @param InputInterface $input
54
-	 * @param OutputInterface $output
55
-	 */
56
-	protected function execute(InputInterface $input, OutputInterface $output): int {
57
-		$output->writeln('Syncing users ...');
58
-		$progress = new ProgressBar($output);
59
-		$progress->start();
60
-		$this->syncService->syncInstance(function () use ($progress) {
61
-			$progress->advance();
62
-		});
52
+    /**
53
+     * @param InputInterface $input
54
+     * @param OutputInterface $output
55
+     */
56
+    protected function execute(InputInterface $input, OutputInterface $output): int {
57
+        $output->writeln('Syncing users ...');
58
+        $progress = new ProgressBar($output);
59
+        $progress->start();
60
+        $this->syncService->syncInstance(function () use ($progress) {
61
+            $progress->advance();
62
+        });
63 63
 
64
-		$progress->finish();
65
-		$output->writeln('');
66
-		return 0;
67
-	}
64
+        $progress->finish();
65
+        $output->writeln('');
66
+        return 0;
67
+    }
68 68
 }
Please login to merge, or discard this patch.
apps/dav/lib/Avatars/AvatarHome.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 	public function getChild($name) {
59 59
 		$elements = pathinfo($name);
60 60
 		$ext = isset($elements['extension']) ? $elements['extension'] : '';
61
-		$size = (int)(isset($elements['filename']) ? $elements['filename'] : '64');
61
+		$size = (int) (isset($elements['filename']) ? $elements['filename'] : '64');
62 62
 		if (!in_array($ext, ['jpeg', 'png'], true)) {
63 63
 			throw new MethodNotAllowed('File format not allowed');
64 64
 		}
Please login to merge, or discard this patch.
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -34,87 +34,87 @@
 block discarded – undo
34 34
 
35 35
 class AvatarHome implements ICollection {
36 36
 
37
-	/** @var array */
38
-	private $principalInfo;
39
-	/** @var IAvatarManager */
40
-	private $avatarManager;
37
+    /** @var array */
38
+    private $principalInfo;
39
+    /** @var IAvatarManager */
40
+    private $avatarManager;
41 41
 
42
-	/**
43
-	 * AvatarHome constructor.
44
-	 *
45
-	 * @param array $principalInfo
46
-	 * @param IAvatarManager $avatarManager
47
-	 */
48
-	public function __construct($principalInfo, IAvatarManager $avatarManager) {
49
-		$this->principalInfo = $principalInfo;
50
-		$this->avatarManager = $avatarManager;
51
-	}
42
+    /**
43
+     * AvatarHome constructor.
44
+     *
45
+     * @param array $principalInfo
46
+     * @param IAvatarManager $avatarManager
47
+     */
48
+    public function __construct($principalInfo, IAvatarManager $avatarManager) {
49
+        $this->principalInfo = $principalInfo;
50
+        $this->avatarManager = $avatarManager;
51
+    }
52 52
 
53
-	public function createFile($name, $data = null) {
54
-		throw new Forbidden('Permission denied to create a file');
55
-	}
53
+    public function createFile($name, $data = null) {
54
+        throw new Forbidden('Permission denied to create a file');
55
+    }
56 56
 
57
-	public function createDirectory($name) {
58
-		throw new Forbidden('Permission denied to create a folder');
59
-	}
57
+    public function createDirectory($name) {
58
+        throw new Forbidden('Permission denied to create a folder');
59
+    }
60 60
 
61
-	public function getChild($name) {
62
-		$elements = pathinfo($name);
63
-		$ext = isset($elements['extension']) ? $elements['extension'] : '';
64
-		$size = (int)(isset($elements['filename']) ? $elements['filename'] : '64');
65
-		if (!in_array($ext, ['jpeg', 'png'], true)) {
66
-			throw new MethodNotAllowed('File format not allowed');
67
-		}
68
-		if ($size <= 0 || $size > 1024) {
69
-			throw new MethodNotAllowed('Invalid image size');
70
-		}
71
-		$avatar = $this->avatarManager->getAvatar($this->getName());
72
-		if (!$avatar->exists()) {
73
-			throw new NotFound();
74
-		}
75
-		return new AvatarNode($size, $ext, $avatar);
76
-	}
61
+    public function getChild($name) {
62
+        $elements = pathinfo($name);
63
+        $ext = isset($elements['extension']) ? $elements['extension'] : '';
64
+        $size = (int)(isset($elements['filename']) ? $elements['filename'] : '64');
65
+        if (!in_array($ext, ['jpeg', 'png'], true)) {
66
+            throw new MethodNotAllowed('File format not allowed');
67
+        }
68
+        if ($size <= 0 || $size > 1024) {
69
+            throw new MethodNotAllowed('Invalid image size');
70
+        }
71
+        $avatar = $this->avatarManager->getAvatar($this->getName());
72
+        if (!$avatar->exists()) {
73
+            throw new NotFound();
74
+        }
75
+        return new AvatarNode($size, $ext, $avatar);
76
+    }
77 77
 
78
-	public function getChildren() {
79
-		try {
80
-			return [
81
-				$this->getChild('96.jpeg')
82
-			];
83
-		} catch (NotFound $exception) {
84
-			return [];
85
-		}
86
-	}
78
+    public function getChildren() {
79
+        try {
80
+            return [
81
+                $this->getChild('96.jpeg')
82
+            ];
83
+        } catch (NotFound $exception) {
84
+            return [];
85
+        }
86
+    }
87 87
 
88
-	public function childExists($name) {
89
-		try {
90
-			$ret = $this->getChild($name);
91
-			return $ret !== null;
92
-		} catch (NotFound $ex) {
93
-			return false;
94
-		} catch (MethodNotAllowed $ex) {
95
-			return false;
96
-		}
97
-	}
88
+    public function childExists($name) {
89
+        try {
90
+            $ret = $this->getChild($name);
91
+            return $ret !== null;
92
+        } catch (NotFound $ex) {
93
+            return false;
94
+        } catch (MethodNotAllowed $ex) {
95
+            return false;
96
+        }
97
+    }
98 98
 
99
-	public function delete() {
100
-		throw new Forbidden('Permission denied to delete this folder');
101
-	}
99
+    public function delete() {
100
+        throw new Forbidden('Permission denied to delete this folder');
101
+    }
102 102
 
103
-	public function getName() {
104
-		[,$name] = Uri\split($this->principalInfo['uri']);
105
-		return $name;
106
-	}
103
+    public function getName() {
104
+        [,$name] = Uri\split($this->principalInfo['uri']);
105
+        return $name;
106
+    }
107 107
 
108
-	public function setName($name) {
109
-		throw new Forbidden('Permission denied to rename this folder');
110
-	}
108
+    public function setName($name) {
109
+        throw new Forbidden('Permission denied to rename this folder');
110
+    }
111 111
 
112
-	/**
113
-	 * Returns the last modification time, as a unix timestamp
114
-	 *
115
-	 * @return int|null
116
-	 */
117
-	public function getLastModified() {
118
-		return null;
119
-	}
112
+    /**
113
+     * Returns the last modification time, as a unix timestamp
114
+     *
115
+     * @return int|null
116
+     */
117
+    public function getLastModified() {
118
+        return null;
119
+    }
120 120
 }
Please login to merge, or discard this patch.
apps/dav/lib/Avatars/AvatarNode.php 2 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -26,71 +26,71 @@
 block discarded – undo
26 26
 use Sabre\DAV\File;
27 27
 
28 28
 class AvatarNode extends File {
29
-	private $ext;
30
-	private $size;
31
-	private $avatar;
29
+    private $ext;
30
+    private $size;
31
+    private $avatar;
32 32
 
33
-	/**
34
-	 * AvatarNode constructor.
35
-	 *
36
-	 * @param integer $size
37
-	 * @param string $ext
38
-	 * @param IAvatar $avatar
39
-	 */
40
-	public function __construct($size, $ext, $avatar) {
41
-		$this->size = $size;
42
-		$this->ext = $ext;
43
-		$this->avatar = $avatar;
44
-	}
33
+    /**
34
+     * AvatarNode constructor.
35
+     *
36
+     * @param integer $size
37
+     * @param string $ext
38
+     * @param IAvatar $avatar
39
+     */
40
+    public function __construct($size, $ext, $avatar) {
41
+        $this->size = $size;
42
+        $this->ext = $ext;
43
+        $this->avatar = $avatar;
44
+    }
45 45
 
46
-	/**
47
-	 * Returns the name of the node.
48
-	 *
49
-	 * This is used to generate the url.
50
-	 *
51
-	 * @return string
52
-	 */
53
-	public function getName() {
54
-		return "$this->size.$this->ext";
55
-	}
46
+    /**
47
+     * Returns the name of the node.
48
+     *
49
+     * This is used to generate the url.
50
+     *
51
+     * @return string
52
+     */
53
+    public function getName() {
54
+        return "$this->size.$this->ext";
55
+    }
56 56
 
57
-	public function get() {
58
-		$image = $this->avatar->get($this->size);
59
-		$res = $image->resource();
57
+    public function get() {
58
+        $image = $this->avatar->get($this->size);
59
+        $res = $image->resource();
60 60
 
61
-		ob_start();
62
-		if ($this->ext === 'png') {
63
-			imagepng($res);
64
-		} else {
65
-			imagejpeg($res);
66
-		}
61
+        ob_start();
62
+        if ($this->ext === 'png') {
63
+            imagepng($res);
64
+        } else {
65
+            imagejpeg($res);
66
+        }
67 67
 
68
-		return ob_get_clean();
69
-	}
68
+        return ob_get_clean();
69
+    }
70 70
 
71
-	/**
72
-	 * Returns the mime-type for a file
73
-	 *
74
-	 * If null is returned, we'll assume application/octet-stream
75
-	 *
76
-	 * @return string|null
77
-	 */
78
-	public function getContentType() {
79
-		if ($this->ext === 'png') {
80
-			return 'image/png';
81
-		}
82
-		return 'image/jpeg';
83
-	}
71
+    /**
72
+     * Returns the mime-type for a file
73
+     *
74
+     * If null is returned, we'll assume application/octet-stream
75
+     *
76
+     * @return string|null
77
+     */
78
+    public function getContentType() {
79
+        if ($this->ext === 'png') {
80
+            return 'image/png';
81
+        }
82
+        return 'image/jpeg';
83
+    }
84 84
 
85
-	public function getETag() {
86
-		return $this->avatar->getFile($this->size)->getEtag();
87
-	}
85
+    public function getETag() {
86
+        return $this->avatar->getFile($this->size)->getEtag();
87
+    }
88 88
 
89
-	public function getLastModified() {
90
-		$timestamp = $this->avatar->getFile($this->size)->getMTime();
91
-		if (!empty($timestamp)) {
92
-			return (int)$timestamp;
93
-		}
94
-		return $timestamp;
95
-	}
89
+    public function getLastModified() {
90
+        $timestamp = $this->avatar->getFile($this->size)->getMTime();
91
+        if (!empty($timestamp)) {
92
+            return (int)$timestamp;
93
+        }
94
+        return $timestamp;
95
+    }
96 96
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 	public function getLastModified() {
90 90
 		$timestamp = $this->avatar->getFile($this->size)->getMTime();
91 91
 		if (!empty($timestamp)) {
92
-			return (int)$timestamp;
92
+			return (int) $timestamp;
93 93
 		}
94 94
 		return $timestamp;
95 95
 	}
Please login to merge, or discard this patch.
apps/dav/lib/CardDAV/Xml/Groups.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
 	public function xmlSerialize(Writer $writer) {
41 41
 		foreach ($this->groups as $group) {
42
-			$writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group);
42
+			$writer->writeElement('{'.self::NS_OWNCLOUD.'}group', $group);
43 43
 		}
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@
 block discarded – undo
27 27
 use Sabre\Xml\XmlSerializable;
28 28
 
29 29
 class Groups implements XmlSerializable {
30
-	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
30
+    public const NS_OWNCLOUD = 'http://owncloud.org/ns';
31 31
 
32
-	/** @var string[] of TYPE:CHECKSUM */
33
-	private $groups;
32
+    /** @var string[] of TYPE:CHECKSUM */
33
+    private $groups;
34 34
 
35
-	/**
36
-	 * @param string $groups
37
-	 */
38
-	public function __construct($groups) {
39
-		$this->groups = $groups;
40
-	}
35
+    /**
36
+     * @param string $groups
37
+     */
38
+    public function __construct($groups) {
39
+        $this->groups = $groups;
40
+    }
41 41
 
42
-	public function xmlSerialize(Writer $writer) {
43
-		foreach ($this->groups as $group) {
44
-			$writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group);
45
-		}
46
-	}
42
+    public function xmlSerialize(Writer $writer) {
43
+        foreach ($this->groups as $group) {
44
+            $writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group);
45
+        }
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/DAV/Sharing/Xml/Invite.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -116,42 +116,42 @@
 block discarded – undo
116 116
 	 * @return void
117 117
 	 */
118 118
 	public function xmlSerialize(Writer $writer) {
119
-		$cs = '{' . Plugin::NS_OWNCLOUD . '}';
119
+		$cs = '{'.Plugin::NS_OWNCLOUD.'}';
120 120
 
121 121
 		if (!is_null($this->organizer)) {
122
-			$writer->startElement($cs . 'organizer');
122
+			$writer->startElement($cs.'organizer');
123 123
 			$writer->writeElement('{DAV:}href', $this->organizer['href']);
124 124
 
125 125
 			if (isset($this->organizer['commonName']) && $this->organizer['commonName']) {
126
-				$writer->writeElement($cs . 'common-name', $this->organizer['commonName']);
126
+				$writer->writeElement($cs.'common-name', $this->organizer['commonName']);
127 127
 			}
128 128
 			if (isset($this->organizer['firstName']) && $this->organizer['firstName']) {
129
-				$writer->writeElement($cs . 'first-name', $this->organizer['firstName']);
129
+				$writer->writeElement($cs.'first-name', $this->organizer['firstName']);
130 130
 			}
131 131
 			if (isset($this->organizer['lastName']) && $this->organizer['lastName']) {
132
-				$writer->writeElement($cs . 'last-name', $this->organizer['lastName']);
132
+				$writer->writeElement($cs.'last-name', $this->organizer['lastName']);
133 133
 			}
134 134
 			$writer->endElement(); // organizer
135 135
 		}
136 136
 
137 137
 		foreach ($this->users as $user) {
138
-			$writer->startElement($cs . 'user');
138
+			$writer->startElement($cs.'user');
139 139
 			$writer->writeElement('{DAV:}href', $user['href']);
140 140
 			if (isset($user['commonName']) && $user['commonName']) {
141
-				$writer->writeElement($cs . 'common-name', $user['commonName']);
141
+				$writer->writeElement($cs.'common-name', $user['commonName']);
142 142
 			}
143
-			$writer->writeElement($cs . 'invite-accepted');
143
+			$writer->writeElement($cs.'invite-accepted');
144 144
 
145
-			$writer->startElement($cs . 'access');
145
+			$writer->startElement($cs.'access');
146 146
 			if ($user['readOnly']) {
147
-				$writer->writeElement($cs . 'read');
147
+				$writer->writeElement($cs.'read');
148 148
 			} else {
149
-				$writer->writeElement($cs . 'read-write');
149
+				$writer->writeElement($cs.'read-write');
150 150
 			}
151 151
 			$writer->endElement(); // access
152 152
 
153 153
 			if (isset($user['summary']) && $user['summary']) {
154
-				$writer->writeElement($cs . 'summary', $user['summary']);
154
+				$writer->writeElement($cs.'summary', $user['summary']);
155 155
 			}
156 156
 
157 157
 			$writer->endElement(); //user
Please login to merge, or discard this patch.
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -44,120 +44,120 @@
 block discarded – undo
44 44
  */
45 45
 class Invite implements XmlSerializable {
46 46
 
47
-	/**
48
-	 * The list of users a calendar has been shared to.
49
-	 *
50
-	 * @var array
51
-	 */
52
-	protected $users;
47
+    /**
48
+     * The list of users a calendar has been shared to.
49
+     *
50
+     * @var array
51
+     */
52
+    protected $users;
53 53
 
54
-	/**
55
-	 * The organizer contains information about the person who shared the
56
-	 * object.
57
-	 *
58
-	 * @var array|null
59
-	 */
60
-	protected $organizer;
54
+    /**
55
+     * The organizer contains information about the person who shared the
56
+     * object.
57
+     *
58
+     * @var array|null
59
+     */
60
+    protected $organizer;
61 61
 
62
-	/**
63
-	 * Creates the property.
64
-	 *
65
-	 * Users is an array. Each element of the array has the following
66
-	 * properties:
67
-	 *
68
-	 *   * href - Often a mailto: address
69
-	 *   * commonName - Optional, for example a first and lastname for a user.
70
-	 *   * status - One of the SharingPlugin::STATUS_* constants.
71
-	 *   * readOnly - true or false
72
-	 *   * summary - Optional, description of the share
73
-	 *
74
-	 * The organizer key is optional to specify. It's only useful when a
75
-	 * 'sharee' requests the sharing information.
76
-	 *
77
-	 * The organizer may have the following properties:
78
-	 *   * href - Often a mailto: address.
79
-	 *   * commonName - Optional human-readable name.
80
-	 *   * firstName - Optional first name.
81
-	 *   * lastName - Optional last name.
82
-	 *
83
-	 * If you wonder why these two structures are so different, I guess a
84
-	 * valid answer is that the current spec is still a draft.
85
-	 *
86
-	 * @param array $users
87
-	 */
88
-	public function __construct(array $users, array $organizer = null) {
89
-		$this->users = $users;
90
-		$this->organizer = $organizer;
91
-	}
62
+    /**
63
+     * Creates the property.
64
+     *
65
+     * Users is an array. Each element of the array has the following
66
+     * properties:
67
+     *
68
+     *   * href - Often a mailto: address
69
+     *   * commonName - Optional, for example a first and lastname for a user.
70
+     *   * status - One of the SharingPlugin::STATUS_* constants.
71
+     *   * readOnly - true or false
72
+     *   * summary - Optional, description of the share
73
+     *
74
+     * The organizer key is optional to specify. It's only useful when a
75
+     * 'sharee' requests the sharing information.
76
+     *
77
+     * The organizer may have the following properties:
78
+     *   * href - Often a mailto: address.
79
+     *   * commonName - Optional human-readable name.
80
+     *   * firstName - Optional first name.
81
+     *   * lastName - Optional last name.
82
+     *
83
+     * If you wonder why these two structures are so different, I guess a
84
+     * valid answer is that the current spec is still a draft.
85
+     *
86
+     * @param array $users
87
+     */
88
+    public function __construct(array $users, array $organizer = null) {
89
+        $this->users = $users;
90
+        $this->organizer = $organizer;
91
+    }
92 92
 
93
-	/**
94
-	 * Returns the list of users, as it was passed to the constructor.
95
-	 *
96
-	 * @return array
97
-	 */
98
-	public function getValue() {
99
-		return $this->users;
100
-	}
93
+    /**
94
+     * Returns the list of users, as it was passed to the constructor.
95
+     *
96
+     * @return array
97
+     */
98
+    public function getValue() {
99
+        return $this->users;
100
+    }
101 101
 
102
-	/**
103
-	 * The xmlSerialize method is called during xml writing.
104
-	 *
105
-	 * Use the $writer argument to write its own xml serialization.
106
-	 *
107
-	 * An important note: do _not_ create a parent element. Any element
108
-	 * implementing XmlSerializble should only ever write what's considered
109
-	 * its 'inner xml'.
110
-	 *
111
-	 * The parent of the current element is responsible for writing a
112
-	 * containing element.
113
-	 *
114
-	 * This allows serializers to be re-used for different element names.
115
-	 *
116
-	 * If you are opening new elements, you must also close them again.
117
-	 *
118
-	 * @param Writer $writer
119
-	 * @return void
120
-	 */
121
-	public function xmlSerialize(Writer $writer) {
122
-		$cs = '{' . Plugin::NS_OWNCLOUD . '}';
102
+    /**
103
+     * The xmlSerialize method is called during xml writing.
104
+     *
105
+     * Use the $writer argument to write its own xml serialization.
106
+     *
107
+     * An important note: do _not_ create a parent element. Any element
108
+     * implementing XmlSerializble should only ever write what's considered
109
+     * its 'inner xml'.
110
+     *
111
+     * The parent of the current element is responsible for writing a
112
+     * containing element.
113
+     *
114
+     * This allows serializers to be re-used for different element names.
115
+     *
116
+     * If you are opening new elements, you must also close them again.
117
+     *
118
+     * @param Writer $writer
119
+     * @return void
120
+     */
121
+    public function xmlSerialize(Writer $writer) {
122
+        $cs = '{' . Plugin::NS_OWNCLOUD . '}';
123 123
 
124
-		if (!is_null($this->organizer)) {
125
-			$writer->startElement($cs . 'organizer');
126
-			$writer->writeElement('{DAV:}href', $this->organizer['href']);
124
+        if (!is_null($this->organizer)) {
125
+            $writer->startElement($cs . 'organizer');
126
+            $writer->writeElement('{DAV:}href', $this->organizer['href']);
127 127
 
128
-			if (isset($this->organizer['commonName']) && $this->organizer['commonName']) {
129
-				$writer->writeElement($cs . 'common-name', $this->organizer['commonName']);
130
-			}
131
-			if (isset($this->organizer['firstName']) && $this->organizer['firstName']) {
132
-				$writer->writeElement($cs . 'first-name', $this->organizer['firstName']);
133
-			}
134
-			if (isset($this->organizer['lastName']) && $this->organizer['lastName']) {
135
-				$writer->writeElement($cs . 'last-name', $this->organizer['lastName']);
136
-			}
137
-			$writer->endElement(); // organizer
138
-		}
128
+            if (isset($this->organizer['commonName']) && $this->organizer['commonName']) {
129
+                $writer->writeElement($cs . 'common-name', $this->organizer['commonName']);
130
+            }
131
+            if (isset($this->organizer['firstName']) && $this->organizer['firstName']) {
132
+                $writer->writeElement($cs . 'first-name', $this->organizer['firstName']);
133
+            }
134
+            if (isset($this->organizer['lastName']) && $this->organizer['lastName']) {
135
+                $writer->writeElement($cs . 'last-name', $this->organizer['lastName']);
136
+            }
137
+            $writer->endElement(); // organizer
138
+        }
139 139
 
140
-		foreach ($this->users as $user) {
141
-			$writer->startElement($cs . 'user');
142
-			$writer->writeElement('{DAV:}href', $user['href']);
143
-			if (isset($user['commonName']) && $user['commonName']) {
144
-				$writer->writeElement($cs . 'common-name', $user['commonName']);
145
-			}
146
-			$writer->writeElement($cs . 'invite-accepted');
140
+        foreach ($this->users as $user) {
141
+            $writer->startElement($cs . 'user');
142
+            $writer->writeElement('{DAV:}href', $user['href']);
143
+            if (isset($user['commonName']) && $user['commonName']) {
144
+                $writer->writeElement($cs . 'common-name', $user['commonName']);
145
+            }
146
+            $writer->writeElement($cs . 'invite-accepted');
147 147
 
148
-			$writer->startElement($cs . 'access');
149
-			if ($user['readOnly']) {
150
-				$writer->writeElement($cs . 'read');
151
-			} else {
152
-				$writer->writeElement($cs . 'read-write');
153
-			}
154
-			$writer->endElement(); // access
148
+            $writer->startElement($cs . 'access');
149
+            if ($user['readOnly']) {
150
+                $writer->writeElement($cs . 'read');
151
+            } else {
152
+                $writer->writeElement($cs . 'read-write');
153
+            }
154
+            $writer->endElement(); // access
155 155
 
156
-			if (isset($user['summary']) && $user['summary']) {
157
-				$writer->writeElement($cs . 'summary', $user['summary']);
158
-			}
156
+            if (isset($user['summary']) && $user['summary']) {
157
+                $writer->writeElement($cs . 'summary', $user['summary']);
158
+            }
159 159
 
160
-			$writer->endElement(); //user
161
-		}
162
-	}
160
+            $writer->endElement(); //user
161
+        }
162
+    }
163 163
 }
Please login to merge, or discard this patch.
apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -26,54 +26,54 @@
 block discarded – undo
26 26
 use Sabre\Xml\XmlDeserializable;
27 27
 
28 28
 class ShareRequest implements XmlDeserializable {
29
-	public $set = [];
29
+    public $set = [];
30 30
 
31
-	public $remove = [];
31
+    public $remove = [];
32 32
 
33
-	/**
34
-	 * Constructor
35
-	 *
36
-	 * @param array $set
37
-	 * @param array $remove
38
-	 */
39
-	public function __construct(array $set, array $remove) {
40
-		$this->set = $set;
41
-		$this->remove = $remove;
42
-	}
33
+    /**
34
+     * Constructor
35
+     *
36
+     * @param array $set
37
+     * @param array $remove
38
+     */
39
+    public function __construct(array $set, array $remove) {
40
+        $this->set = $set;
41
+        $this->remove = $remove;
42
+    }
43 43
 
44
-	public static function xmlDeserialize(Reader $reader) {
45
-		$elements = $reader->parseInnerTree([
46
-			'{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
47
-			'{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
48
-		]);
44
+    public static function xmlDeserialize(Reader $reader) {
45
+        $elements = $reader->parseInnerTree([
46
+            '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
47
+            '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
48
+        ]);
49 49
 
50
-		$set = [];
51
-		$remove = [];
50
+        $set = [];
51
+        $remove = [];
52 52
 
53
-		foreach ($elements as $elem) {
54
-			switch ($elem['name']) {
53
+        foreach ($elements as $elem) {
54
+            switch ($elem['name']) {
55 55
 
56
-				case '{' . Plugin::NS_OWNCLOUD . '}set':
57
-					$sharee = $elem['value'];
56
+                case '{' . Plugin::NS_OWNCLOUD . '}set':
57
+                    $sharee = $elem['value'];
58 58
 
59
-					$sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
60
-					$commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
59
+                    $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
60
+                    $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
61 61
 
62
-					$set[] = [
63
-						'href' => $sharee['{DAV:}href'],
64
-						'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
65
-						'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
66
-						'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
67
-					];
68
-					break;
62
+                    $set[] = [
63
+                        'href' => $sharee['{DAV:}href'],
64
+                        'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
65
+                        'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
66
+                        'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
67
+                    ];
68
+                    break;
69 69
 
70
-				case '{' . Plugin::NS_OWNCLOUD . '}remove':
71
-					$remove[] = $elem['value']['{DAV:}href'];
72
-					break;
70
+                case '{' . Plugin::NS_OWNCLOUD . '}remove':
71
+                    $remove[] = $elem['value']['{DAV:}href'];
72
+                    break;
73 73
 
74
-			}
75
-		}
74
+            }
75
+        }
76 76
 
77
-		return new self($set, $remove);
78
-	}
77
+        return new self($set, $remove);
78
+    }
79 79
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 
44 44
 	public static function xmlDeserialize(Reader $reader) {
45 45
 		$elements = $reader->parseInnerTree([
46
-			'{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
47
-			'{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
46
+			'{'.Plugin::NS_OWNCLOUD.'}set' => 'Sabre\\Xml\\Element\\KeyValue',
47
+			'{'.Plugin::NS_OWNCLOUD.'}remove' => 'Sabre\\Xml\\Element\\KeyValue',
48 48
 		]);
49 49
 
50 50
 		$set = [];
@@ -53,21 +53,21 @@  discard block
 block discarded – undo
53 53
 		foreach ($elements as $elem) {
54 54
 			switch ($elem['name']) {
55 55
 
56
-				case '{' . Plugin::NS_OWNCLOUD . '}set':
56
+				case '{'.Plugin::NS_OWNCLOUD.'}set':
57 57
 					$sharee = $elem['value'];
58 58
 
59
-					$sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
60
-					$commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
59
+					$sumElem = '{'.Plugin::NS_OWNCLOUD.'}summary';
60
+					$commonName = '{'.Plugin::NS_OWNCLOUD.'}common-name';
61 61
 
62 62
 					$set[] = [
63 63
 						'href' => $sharee['{DAV:}href'],
64 64
 						'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
65 65
 						'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
66
-						'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
66
+						'readOnly' => !array_key_exists('{'.Plugin::NS_OWNCLOUD.'}read-write', $sharee),
67 67
 					];
68 68
 					break;
69 69
 
70
-				case '{' . Plugin::NS_OWNCLOUD . '}remove':
70
+				case '{'.Plugin::NS_OWNCLOUD.'}remove':
71 71
 					$remove[] = $elem['value']['{DAV:}href'];
72 72
 					break;
73 73
 
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/BearerAuth.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 	private function setupUserFs($userId) {
64 64
 		\OC_Util::setupFS($userId);
65 65
 		$this->session->close();
66
-		return $this->principalPrefix . $userId;
66
+		return $this->principalPrefix.$userId;
67 67
 	}
68 68
 
69 69
 	/**
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -31,56 +31,56 @@
 block discarded – undo
31 31
 use Sabre\HTTP\ResponseInterface;
32 32
 
33 33
 class BearerAuth extends AbstractBearer {
34
-	private IUserSession $userSession;
35
-	private ISession $session;
36
-	private IRequest $request;
37
-	private string $principalPrefix;
34
+    private IUserSession $userSession;
35
+    private ISession $session;
36
+    private IRequest $request;
37
+    private string $principalPrefix;
38 38
 
39
-	public function __construct(IUserSession $userSession,
40
-								ISession $session,
41
-								IRequest $request,
42
-								$principalPrefix = 'principals/users/') {
43
-		$this->userSession = $userSession;
44
-		$this->session = $session;
45
-		$this->request = $request;
46
-		$this->principalPrefix = $principalPrefix;
39
+    public function __construct(IUserSession $userSession,
40
+                                ISession $session,
41
+                                IRequest $request,
42
+                                $principalPrefix = 'principals/users/') {
43
+        $this->userSession = $userSession;
44
+        $this->session = $session;
45
+        $this->request = $request;
46
+        $this->principalPrefix = $principalPrefix;
47 47
 
48
-		// setup realm
49
-		$defaults = new \OCP\Defaults();
50
-		$this->realm = $defaults->getName();
51
-	}
48
+        // setup realm
49
+        $defaults = new \OCP\Defaults();
50
+        $this->realm = $defaults->getName();
51
+    }
52 52
 
53
-	private function setupUserFs($userId) {
54
-		\OC_Util::setupFS($userId);
55
-		$this->session->close();
56
-		return $this->principalPrefix . $userId;
57
-	}
53
+    private function setupUserFs($userId) {
54
+        \OC_Util::setupFS($userId);
55
+        $this->session->close();
56
+        return $this->principalPrefix . $userId;
57
+    }
58 58
 
59
-	/**
60
-	 * {@inheritdoc}
61
-	 */
62
-	public function validateBearerToken($bearerToken) {
63
-		\OC_Util::setupFS();
59
+    /**
60
+     * {@inheritdoc}
61
+     */
62
+    public function validateBearerToken($bearerToken) {
63
+        \OC_Util::setupFS();
64 64
 
65
-		if (!$this->userSession->isLoggedIn()) {
66
-			$this->userSession->tryTokenLogin($this->request);
67
-		}
68
-		if ($this->userSession->isLoggedIn()) {
69
-			return $this->setupUserFs($this->userSession->getUser()->getUID());
70
-		}
65
+        if (!$this->userSession->isLoggedIn()) {
66
+            $this->userSession->tryTokenLogin($this->request);
67
+        }
68
+        if ($this->userSession->isLoggedIn()) {
69
+            return $this->setupUserFs($this->userSession->getUser()->getUID());
70
+        }
71 71
 
72
-		return false;
73
-	}
72
+        return false;
73
+    }
74 74
 
75
-	/**
76
-	 * \Sabre\DAV\Auth\Backend\AbstractBearer::challenge sets an WWW-Authenticate
77
-	 * header which some DAV clients can't handle. Thus we override this function
78
-	 * and make it simply return a 401.
79
-	 *
80
-	 * @param RequestInterface $request
81
-	 * @param ResponseInterface $response
82
-	 */
83
-	public function challenge(RequestInterface $request, ResponseInterface $response): void {
84
-		$response->setStatus(401);
85
-	}
75
+    /**
76
+     * \Sabre\DAV\Auth\Backend\AbstractBearer::challenge sets an WWW-Authenticate
77
+     * header which some DAV clients can't handle. Thus we override this function
78
+     * and make it simply return a 401.
79
+     *
80
+     * @param RequestInterface $request
81
+     * @param ResponseInterface $response
82
+     */
83
+    public function challenge(RequestInterface $request, ResponseInterface $response): void {
84
+        $response->setStatus(401);
85
+    }
86 86
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Exception/FileLocked.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,19 +29,19 @@
 block discarded – undo
29 29
 use Exception;
30 30
 
31 31
 class FileLocked extends \Sabre\DAV\Exception {
32
-	public function __construct($message = "", $code = 0, Exception $previous = null) {
33
-		if ($previous instanceof \OCP\Files\LockNotAcquiredException) {
34
-			$message = sprintf('Target file %s is locked by another process.', $previous->path);
35
-		}
36
-		parent::__construct($message, $code, $previous);
37
-	}
32
+    public function __construct($message = "", $code = 0, Exception $previous = null) {
33
+        if ($previous instanceof \OCP\Files\LockNotAcquiredException) {
34
+            $message = sprintf('Target file %s is locked by another process.', $previous->path);
35
+        }
36
+        parent::__construct($message, $code, $previous);
37
+    }
38 38
 
39
-	/**
40
-	 * Returns the HTTP status code for this exception
41
-	 *
42
-	 * @return int
43
-	 */
44
-	public function getHTTPCode() {
45
-		return 423;
46
-	}
39
+    /**
40
+     * Returns the HTTP status code for this exception
41
+     *
42
+     * @return int
43
+     */
44
+    public function getHTTPCode() {
45
+        return 423;
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
  */
32 32
 class UnsupportedMediaType extends \Sabre\DAV\Exception {
33 33
 
34
-	/**
35
-	 * Returns the HTTP status code for this exception
36
-	 *
37
-	 * @return int
38
-	 */
39
-	public function getHTTPCode() {
40
-		return 415;
41
-	}
34
+    /**
35
+     * Returns the HTTP status code for this exception
36
+     *
37
+     * @return int
38
+     */
39
+    public function getHTTPCode() {
40
+        return 415;
41
+    }
42 42
 }
Please login to merge, or discard this patch.