Passed
Push — master ( 5e985c...318d55 )
by Christoph
17:43 queued 04:53
created
apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.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
 		$reader->parseInnerTree();
40 40
 
41 41
 		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
42
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}comp-filter requires a valid name attribute');
43 43
 		}
44 44
 
45 45
 		return $componentName;
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
 
28 28
 class CompFilter implements XmlDeserializable {
29 29
 
30
-	/**
31
-	 * @param Reader $reader
32
-	 * @throws BadRequest
33
-	 * @return string
34
-	 */
35
-	public static function xmlDeserialize(Reader $reader) {
36
-		$att = $reader->parseAttributes();
37
-		$componentName = $att['name'];
30
+    /**
31
+     * @param Reader $reader
32
+     * @throws BadRequest
33
+     * @return string
34
+     */
35
+    public static function xmlDeserialize(Reader $reader) {
36
+        $att = $reader->parseAttributes();
37
+        $componentName = $att['name'];
38 38
 
39
-		$reader->parseInnerTree();
39
+        $reader->parseInnerTree();
40 40
 
41
-		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
43
-		}
41
+        if (!is_string($componentName)) {
42
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
43
+        }
44 44
 
45
-		return $componentName;
46
-	}
45
+        return $componentName;
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.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
 		$reader->parseInnerTree();
40 40
 
41 41
 		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute');
42
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}prop-filter requires a valid name attribute');
43 43
 		}
44 44
 
45 45
 		return $componentName;
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
 
28 28
 class PropFilter implements XmlDeserializable {
29 29
 
30
-	/**
31
-	 * @param Reader $reader
32
-	 * @throws BadRequest
33
-	 * @return string
34
-	 */
35
-	public static function xmlDeserialize(Reader $reader) {
36
-		$att = $reader->parseAttributes();
37
-		$componentName = $att['name'];
30
+    /**
31
+     * @param Reader $reader
32
+     * @throws BadRequest
33
+     * @return string
34
+     */
35
+    public static function xmlDeserialize(Reader $reader) {
36
+        $att = $reader->parseAttributes();
37
+        $componentName = $att['name'];
38 38
 
39
-		$reader->parseInnerTree();
39
+        $reader->parseInnerTree();
40 40
 
41
-		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute');
43
-		}
41
+        if (!is_string($componentName)) {
42
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute');
43
+        }
44 44
 
45
-		return $componentName;
46
-	}
45
+        return $componentName;
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
 		$reader->parseInnerTree();
41 41
 
42 42
 		if (!is_string($property)) {
43
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute');
43
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid property attribute');
44 44
 
45 45
 		}
46 46
 		if (!is_string($parameter)) {
47
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute');
47
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid parameter attribute');
48 48
 		}
49 49
 
50 50
 		return [
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -27,28 +27,28 @@
 block discarded – undo
27 27
 
28 28
 class ParamFilter implements XmlDeserializable {
29 29
 
30
-	/**
31
-	 * @param Reader $reader
32
-	 * @throws BadRequest
33
-	 * @return string
34
-	 */
35
-	public static function xmlDeserialize(Reader $reader) {
36
-		$att = $reader->parseAttributes();
37
-		$property = $att['property'];
38
-		$parameter = $att['name'];
30
+    /**
31
+     * @param Reader $reader
32
+     * @throws BadRequest
33
+     * @return string
34
+     */
35
+    public static function xmlDeserialize(Reader $reader) {
36
+        $att = $reader->parseAttributes();
37
+        $property = $att['property'];
38
+        $parameter = $att['name'];
39 39
 
40
-		$reader->parseInnerTree();
40
+        $reader->parseInnerTree();
41 41
 
42
-		if (!is_string($property)) {
43
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute');
44
-		}
45
-		if (!is_string($parameter)) {
46
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute');
47
-		}
42
+        if (!is_string($property)) {
43
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute');
44
+        }
45
+        if (!is_string($parameter)) {
46
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute');
47
+        }
48 48
 
49
-		return [
50
-			'property' => $property,
51
-			'parameter' => $parameter,
52
-		];
53
-	}
49
+        return [
50
+            'property' => $property,
51
+            'parameter' => $parameter,
52
+        ];
53
+    }
54 54
 }
Please login to merge, or discard this patch.
apps/encryption/templates/mail.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	<tr><td>
28 28
 			<table cellspacing="0" cellpadding="0" border="0" width="600px">
29 29
 				<tr>
30
-					<td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>">
30
+					<td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>">
31 31
 						<img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/>
32 32
 					</td>
33 33
 				</tr>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 					<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br>
53 53
 						<?php p($theme->getName()); ?> -
54 54
 						<?php p($theme->getSlogan()); ?>
55
-						<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a>
55
+						<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a>
56 56
 					</td>
57 57
 				</tr>
58 58
 				<tr>
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 					<td width="20px">&nbsp;</td>
16 16
 					<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
17 17
 						<?php
18
-						print_unescaped($l->t('Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section "basic encryption module" of your personal settings and update your encryption password by entering this password into the "old log-in password" field and your current login-password.<br><br>', [$_['password']]));
19
-						// TRANSLATORS term at the end of a mail
20
-						p($l->t('Cheers!'));
21
-						?>
18
+                        print_unescaped($l->t('Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section "basic encryption module" of your personal settings and update your encryption password by entering this password into the "old log-in password" field and your current login-password.<br><br>', [$_['password']]));
19
+                        // TRANSLATORS term at the end of a mail
20
+                        p($l->t('Cheers!'));
21
+                        ?>
22 22
 					</td>
23 23
 				</tr>
24 24
 				<tr><td colspan="2">&nbsp;</td></tr>
Please login to merge, or discard this patch.
lib/private/Repair/CleanTags.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -171,14 +171,14 @@
 block discarded – undo
171 171
 	protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
172 172
 		$qb = $this->connection->getQueryBuilder();
173 173
 
174
-		$qb->select('d.' . $deleteId)
174
+		$qb->select('d.'.$deleteId)
175 175
 			->from($deleteTable, 'd')
176
-			->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.' . $deleteId, 's.' . $sourceId))
176
+			->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.'.$deleteId, 's.'.$sourceId))
177 177
 			->where(
178 178
 				$qb->expr()->eq('d.type', $qb->expr()->literal('files'))
179 179
 			)
180 180
 			->andWhere(
181
-				$qb->expr()->isNull('s.' . $sourceNullColumn)
181
+				$qb->expr()->isNull('s.'.$sourceNullColumn)
182 182
 			);
183 183
 		$result = $qb->execute();
184 184
 
Please login to merge, or discard this patch.
Indentation   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -40,172 +40,172 @@
 block discarded – undo
40 40
  */
41 41
 class CleanTags implements IRepairStep {
42 42
 
43
-	/** @var IDBConnection */
44
-	protected $connection;
45
-
46
-	/** @var IUserManager */
47
-	protected $userManager;
48
-
49
-	protected $deletedTags = 0;
50
-
51
-	/**
52
-	 * @param IDBConnection $connection
53
-	 * @param IUserManager $userManager
54
-	 */
55
-	public function __construct(IDBConnection $connection, IUserManager $userManager) {
56
-		$this->connection = $connection;
57
-		$this->userManager = $userManager;
58
-	}
59
-
60
-	/**
61
-	 * @return string
62
-	 */
63
-	public function getName() {
64
-		return 'Clean tags and favorites';
65
-	}
66
-
67
-	/**
68
-	 * Updates the configuration after running an update
69
-	 */
70
-	public function run(IOutput $output) {
71
-		$this->deleteOrphanTags($output);
72
-		$this->deleteOrphanFileEntries($output);
73
-		$this->deleteOrphanTagEntries($output);
74
-		$this->deleteOrphanCategoryEntries($output);
75
-	}
76
-
77
-	/**
78
-	 * Delete tags for deleted users
79
-	 */
80
-	protected function deleteOrphanTags(IOutput $output) {
81
-		$offset = 0;
82
-		while ($this->checkTags($offset)) {
83
-			$offset += 50;
84
-		}
85
-
86
-		$output->info(sprintf('%d tags of deleted users have been removed.', $this->deletedTags));
87
-	}
88
-
89
-	protected function checkTags($offset) {
90
-		$query = $this->connection->getQueryBuilder();
91
-		$query->select('uid')
92
-			->from('vcategory')
93
-			->groupBy('uid')
94
-			->orderBy('uid')
95
-			->setMaxResults(50)
96
-			->setFirstResult($offset);
97
-		$result = $query->execute();
98
-
99
-		$users = [];
100
-		$hadResults = false;
101
-		while ($row = $result->fetch()) {
102
-			$hadResults = true;
103
-			if (!$this->userManager->userExists($row['uid'])) {
104
-				$users[] = $row['uid'];
105
-			}
106
-		}
107
-		$result->closeCursor();
108
-
109
-		if (!$hadResults) {
110
-			// No more tags, stop looping
111
-			return false;
112
-		}
113
-
114
-		if (!empty($users)) {
115
-			$query = $this->connection->getQueryBuilder();
116
-			$query->delete('vcategory')
117
-				->where($query->expr()->in('uid', $query->createNamedParameter($users, IQueryBuilder::PARAM_STR_ARRAY)));
118
-			$this->deletedTags += $query->execute();
119
-		}
120
-		return true;
121
-	}
122
-
123
-	/**
124
-	 * Delete tag entries for deleted files
125
-	 */
126
-	protected function deleteOrphanFileEntries(IOutput $output) {
127
-		$this->deleteOrphanEntries(
128
-			$output,
129
-			'%d tags for delete files have been removed.',
130
-			'vcategory_to_object', 'objid',
131
-			'filecache', 'fileid', 'path_hash'
132
-		);
133
-	}
134
-
135
-	/**
136
-	 * Delete tag entries for deleted tags
137
-	 */
138
-	protected function deleteOrphanTagEntries(IOutput $output) {
139
-		$this->deleteOrphanEntries(
140
-			$output,
141
-			'%d tag entries for deleted tags have been removed.',
142
-			'vcategory_to_object', 'categoryid',
143
-			'vcategory', 'id', 'uid'
144
-		);
145
-	}
146
-
147
-	/**
148
-	 * Delete tags that have no entries
149
-	 */
150
-	protected function deleteOrphanCategoryEntries(IOutput $output) {
151
-		$this->deleteOrphanEntries(
152
-			$output,
153
-			'%d tags with no entries have been removed.',
154
-			'vcategory', 'id',
155
-			'vcategory_to_object', 'categoryid', 'type'
156
-		);
157
-	}
158
-
159
-	/**
160
-	 * Deletes all entries from $deleteTable that do not have a matching entry in $sourceTable
161
-	 *
162
-	 * A query joins $deleteTable.$deleteId = $sourceTable.$sourceId and checks
163
-	 * whether $sourceNullColumn is null. If it is null, the entry in $deleteTable
164
-	 * is being deleted.
165
-	 *
166
-	 * @param string $repairInfo
167
-	 * @param string $deleteTable
168
-	 * @param string $deleteId
169
-	 * @param string $sourceTable
170
-	 * @param string $sourceId
171
-	 * @param string $sourceNullColumn	If this column is null in the source table,
172
-	 * 								the entry is deleted in the $deleteTable
173
-	 * @suppress SqlInjectionChecker
174
-	 */
175
-	protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
176
-		$qb = $this->connection->getQueryBuilder();
177
-
178
-		$qb->select('d.' . $deleteId)
179
-			->from($deleteTable, 'd')
180
-			->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.' . $deleteId, 's.' . $sourceId))
181
-			->where(
182
-				$qb->expr()->eq('d.type', $qb->expr()->literal('files'))
183
-			)
184
-			->andWhere(
185
-				$qb->expr()->isNull('s.' . $sourceNullColumn)
186
-			);
187
-		$result = $qb->execute();
188
-
189
-		$orphanItems = [];
190
-		while ($row = $result->fetch()) {
191
-			$orphanItems[] = (int) $row[$deleteId];
192
-		}
193
-
194
-		if (!empty($orphanItems)) {
195
-			$orphanItemsBatch = array_chunk($orphanItems, 200);
196
-			foreach ($orphanItemsBatch as $items) {
197
-				$qb->delete($deleteTable)
198
-					->where(
199
-						$qb->expr()->eq('type', $qb->expr()->literal('files'))
200
-					)
201
-					->andWhere($qb->expr()->in($deleteId, $qb->createParameter('ids')));
202
-				$qb->setParameter('ids', $items, IQueryBuilder::PARAM_INT_ARRAY);
203
-				$qb->execute();
204
-			}
205
-		}
206
-
207
-		if ($repairInfo) {
208
-			$output->info(sprintf($repairInfo, count($orphanItems)));
209
-		}
210
-	}
43
+    /** @var IDBConnection */
44
+    protected $connection;
45
+
46
+    /** @var IUserManager */
47
+    protected $userManager;
48
+
49
+    protected $deletedTags = 0;
50
+
51
+    /**
52
+     * @param IDBConnection $connection
53
+     * @param IUserManager $userManager
54
+     */
55
+    public function __construct(IDBConnection $connection, IUserManager $userManager) {
56
+        $this->connection = $connection;
57
+        $this->userManager = $userManager;
58
+    }
59
+
60
+    /**
61
+     * @return string
62
+     */
63
+    public function getName() {
64
+        return 'Clean tags and favorites';
65
+    }
66
+
67
+    /**
68
+     * Updates the configuration after running an update
69
+     */
70
+    public function run(IOutput $output) {
71
+        $this->deleteOrphanTags($output);
72
+        $this->deleteOrphanFileEntries($output);
73
+        $this->deleteOrphanTagEntries($output);
74
+        $this->deleteOrphanCategoryEntries($output);
75
+    }
76
+
77
+    /**
78
+     * Delete tags for deleted users
79
+     */
80
+    protected function deleteOrphanTags(IOutput $output) {
81
+        $offset = 0;
82
+        while ($this->checkTags($offset)) {
83
+            $offset += 50;
84
+        }
85
+
86
+        $output->info(sprintf('%d tags of deleted users have been removed.', $this->deletedTags));
87
+    }
88
+
89
+    protected function checkTags($offset) {
90
+        $query = $this->connection->getQueryBuilder();
91
+        $query->select('uid')
92
+            ->from('vcategory')
93
+            ->groupBy('uid')
94
+            ->orderBy('uid')
95
+            ->setMaxResults(50)
96
+            ->setFirstResult($offset);
97
+        $result = $query->execute();
98
+
99
+        $users = [];
100
+        $hadResults = false;
101
+        while ($row = $result->fetch()) {
102
+            $hadResults = true;
103
+            if (!$this->userManager->userExists($row['uid'])) {
104
+                $users[] = $row['uid'];
105
+            }
106
+        }
107
+        $result->closeCursor();
108
+
109
+        if (!$hadResults) {
110
+            // No more tags, stop looping
111
+            return false;
112
+        }
113
+
114
+        if (!empty($users)) {
115
+            $query = $this->connection->getQueryBuilder();
116
+            $query->delete('vcategory')
117
+                ->where($query->expr()->in('uid', $query->createNamedParameter($users, IQueryBuilder::PARAM_STR_ARRAY)));
118
+            $this->deletedTags += $query->execute();
119
+        }
120
+        return true;
121
+    }
122
+
123
+    /**
124
+     * Delete tag entries for deleted files
125
+     */
126
+    protected function deleteOrphanFileEntries(IOutput $output) {
127
+        $this->deleteOrphanEntries(
128
+            $output,
129
+            '%d tags for delete files have been removed.',
130
+            'vcategory_to_object', 'objid',
131
+            'filecache', 'fileid', 'path_hash'
132
+        );
133
+    }
134
+
135
+    /**
136
+     * Delete tag entries for deleted tags
137
+     */
138
+    protected function deleteOrphanTagEntries(IOutput $output) {
139
+        $this->deleteOrphanEntries(
140
+            $output,
141
+            '%d tag entries for deleted tags have been removed.',
142
+            'vcategory_to_object', 'categoryid',
143
+            'vcategory', 'id', 'uid'
144
+        );
145
+    }
146
+
147
+    /**
148
+     * Delete tags that have no entries
149
+     */
150
+    protected function deleteOrphanCategoryEntries(IOutput $output) {
151
+        $this->deleteOrphanEntries(
152
+            $output,
153
+            '%d tags with no entries have been removed.',
154
+            'vcategory', 'id',
155
+            'vcategory_to_object', 'categoryid', 'type'
156
+        );
157
+    }
158
+
159
+    /**
160
+     * Deletes all entries from $deleteTable that do not have a matching entry in $sourceTable
161
+     *
162
+     * A query joins $deleteTable.$deleteId = $sourceTable.$sourceId and checks
163
+     * whether $sourceNullColumn is null. If it is null, the entry in $deleteTable
164
+     * is being deleted.
165
+     *
166
+     * @param string $repairInfo
167
+     * @param string $deleteTable
168
+     * @param string $deleteId
169
+     * @param string $sourceTable
170
+     * @param string $sourceId
171
+     * @param string $sourceNullColumn	If this column is null in the source table,
172
+     * 								the entry is deleted in the $deleteTable
173
+     * @suppress SqlInjectionChecker
174
+     */
175
+    protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
176
+        $qb = $this->connection->getQueryBuilder();
177
+
178
+        $qb->select('d.' . $deleteId)
179
+            ->from($deleteTable, 'd')
180
+            ->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.' . $deleteId, 's.' . $sourceId))
181
+            ->where(
182
+                $qb->expr()->eq('d.type', $qb->expr()->literal('files'))
183
+            )
184
+            ->andWhere(
185
+                $qb->expr()->isNull('s.' . $sourceNullColumn)
186
+            );
187
+        $result = $qb->execute();
188
+
189
+        $orphanItems = [];
190
+        while ($row = $result->fetch()) {
191
+            $orphanItems[] = (int) $row[$deleteId];
192
+        }
193
+
194
+        if (!empty($orphanItems)) {
195
+            $orphanItemsBatch = array_chunk($orphanItems, 200);
196
+            foreach ($orphanItemsBatch as $items) {
197
+                $qb->delete($deleteTable)
198
+                    ->where(
199
+                        $qb->expr()->eq('type', $qb->expr()->literal('files'))
200
+                    )
201
+                    ->andWhere($qb->expr()->in($deleteId, $qb->createParameter('ids')));
202
+                $qb->setParameter('ids', $items, IQueryBuilder::PARAM_INT_ARRAY);
203
+                $qb->execute();
204
+            }
205
+        }
206
+
207
+        if ($repairInfo) {
208
+            $output->info(sprintf($repairInfo, count($orphanItems)));
209
+        }
210
+    }
211 211
 }
Please login to merge, or discard this patch.
lib/private/Lockdown/LockdownManager.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -24,56 +24,56 @@
 block discarded – undo
24 24
 use OCP\Lockdown\ILockdownManager;
25 25
 
26 26
 class LockdownManager implements ILockdownManager {
27
-	/** @var ISession */
28
-	private $sessionCallback;
27
+    /** @var ISession */
28
+    private $sessionCallback;
29 29
 
30
-	private $enabled = false;
30
+    private $enabled = false;
31 31
 
32
-	/** @var array|null */
33
-	private $scope;
32
+    /** @var array|null */
33
+    private $scope;
34 34
 
35
-	/**
36
-	 * LockdownManager constructor.
37
-	 *
38
-	 * @param callable $sessionCallback we need to inject the session lazily to avoid dependency loops
39
-	 */
40
-	public function __construct(callable $sessionCallback) {
41
-		$this->sessionCallback = $sessionCallback;
42
-	}
35
+    /**
36
+     * LockdownManager constructor.
37
+     *
38
+     * @param callable $sessionCallback we need to inject the session lazily to avoid dependency loops
39
+     */
40
+    public function __construct(callable $sessionCallback) {
41
+        $this->sessionCallback = $sessionCallback;
42
+    }
43 43
 
44 44
 
45
-	public function enable() {
46
-		$this->enabled = true;
47
-	}
45
+    public function enable() {
46
+        $this->enabled = true;
47
+    }
48 48
 
49
-	/**
50
-	 * @return ISession
51
-	 */
52
-	private function getSession() {
53
-		$callback = $this->sessionCallback;
54
-		return $callback();
55
-	}
49
+    /**
50
+     * @return ISession
51
+     */
52
+    private function getSession() {
53
+        $callback = $this->sessionCallback;
54
+        return $callback();
55
+    }
56 56
 
57
-	private function getScopeAsArray() {
58
-		if (!$this->scope) {
59
-			$session = $this->getSession();
60
-			$sessionScope = $session->get('token_scope');
61
-			if ($sessionScope) {
62
-				$this->scope = $sessionScope;
63
-			}
64
-		}
65
-		return $this->scope;
66
-	}
57
+    private function getScopeAsArray() {
58
+        if (!$this->scope) {
59
+            $session = $this->getSession();
60
+            $sessionScope = $session->get('token_scope');
61
+            if ($sessionScope) {
62
+                $this->scope = $sessionScope;
63
+            }
64
+        }
65
+        return $this->scope;
66
+    }
67 67
 
68
-	public function setToken(IToken $token) {
69
-		$this->scope = $token->getScopeAsArray();
70
-		$session = $this->getSession();
71
-		$session->set('token_scope', $this->scope);
72
-		$this->enable();
73
-	}
68
+    public function setToken(IToken $token) {
69
+        $this->scope = $token->getScopeAsArray();
70
+        $session = $this->getSession();
71
+        $session->set('token_scope', $this->scope);
72
+        $this->enable();
73
+    }
74 74
 
75
-	public function canAccessFilesystem() {
76
-		$scope = $this->getScopeAsArray();
77
-		return !$scope || $scope['filesystem'];
78
-	}
75
+    public function canAccessFilesystem() {
76
+        $scope = $this->getScopeAsArray();
77
+        return !$scope || $scope['filesystem'];
78
+    }
79 79
 }
Please login to merge, or discard this patch.
lib/public/Contacts/ContactsMenu/IProvider.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
  */
30 30
 interface IProvider {
31 31
 
32
-	/**
33
-	 * @since 12.0
34
-	 * @param IEntry $entry
35
-	 * @return void
36
-	 */
37
-	public function process(IEntry $entry);
32
+    /**
33
+     * @since 12.0
34
+     * @param IEntry $entry
35
+     * @return void
36
+     */
37
+    public function process(IEntry $entry);
38 38
 }
Please login to merge, or discard this patch.
lib/public/Share/IShareHelper.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
  */
33 33
 interface IShareHelper {
34 34
 
35
-	/**
36
-	 * @param Node $node
37
-	 * @return array [ users => [Mapping $uid => $pathForUser], remotes => [Mapping $cloudId => $pathToMountRoot]]
38
-	 * @since 12
39
-	 */
40
-	public function getPathsForAccessList(Node $node);
35
+    /**
36
+     * @param Node $node
37
+     * @return array [ users => [Mapping $uid => $pathForUser], remotes => [Mapping $cloudId => $pathToMountRoot]]
38
+     * @since 12
39
+     */
40
+    public function getPathsForAccessList(Node $node);
41 41
 }
Please login to merge, or discard this patch.
apps/sharebymail/lib/Capabilities.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -27,24 +27,24 @@
 block discarded – undo
27 27
 
28 28
 class Capabilities implements ICapability {
29 29
 
30
-	/**
31
-	 * Function an app uses to return the capabilities
32
-	 *
33
-	 * @return array Array containing the apps capabilities
34
-	 * @since 8.2.0
35
-	 */
36
-	public function getCapabilities() {
37
-		return [
38
-			'files_sharing' =>
39
-				[
40
-					'sharebymail' =>
41
-						[
42
-							'enabled' => true,
43
-							'upload_files_drop' => ['enabled' => true],
44
-							'password' => ['enabled' => true],
45
-							'expire_date' => ['enabled' => true]
46
-						]
47
-				]
48
-		];
49
-	}
30
+    /**
31
+     * Function an app uses to return the capabilities
32
+     *
33
+     * @return array Array containing the apps capabilities
34
+     * @since 8.2.0
35
+     */
36
+    public function getCapabilities() {
37
+        return [
38
+            'files_sharing' =>
39
+                [
40
+                    'sharebymail' =>
41
+                        [
42
+                            'enabled' => true,
43
+                            'upload_files_drop' => ['enabled' => true],
44
+                            'password' => ['enabled' => true],
45
+                            'expire_date' => ['enabled' => true]
46
+                        ]
47
+                ]
48
+        ];
49
+    }
50 50
 }
Please login to merge, or discard this patch.