Passed
Push — master ( b306a8...3e64be )
by Roeland
09:52 queued 10s
created
lib/private/App/AppStore/Bundles/BundleFetcher.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@
 block discarded – undo
68 68
 			$this->getBundles(),
69 69
 			$this->getDefaultInstallationBundle()
70 70
 		);
71
-		foreach($bundles as $bundle) {
72
-			if($bundle->getIdentifier() === $identifier) {
71
+		foreach ($bundles as $bundle) {
72
+			if ($bundle->getIdentifier() === $identifier) {
73 73
 				return $bundle;
74 74
 			}
75 75
 		}
Please login to merge, or discard this patch.
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -26,59 +26,59 @@
 block discarded – undo
26 26
 use OCP\IL10N;
27 27
 
28 28
 class BundleFetcher {
29
-	/** @var IL10N */
30
-	private $l10n;
29
+    /** @var IL10N */
30
+    private $l10n;
31 31
 
32
-	/**
33
-	 * @param IL10N $l10n
34
-	 */
35
-	public function __construct(IL10N $l10n) {
36
-		$this->l10n = $l10n;
37
-	}
32
+    /**
33
+     * @param IL10N $l10n
34
+     */
35
+    public function __construct(IL10N $l10n) {
36
+        $this->l10n = $l10n;
37
+    }
38 38
 
39
-	/**
40
-	 * @return Bundle[]
41
-	 */
42
-	public function getBundles() {
43
-		return [
44
-			new EnterpriseBundle($this->l10n),
45
-			new HubBundle($this->l10n),
46
-			new GroupwareBundle($this->l10n),
47
-			new SocialSharingBundle($this->l10n),
48
-			new EducationBundle($this->l10n),
49
-		];
50
-	}
39
+    /**
40
+     * @return Bundle[]
41
+     */
42
+    public function getBundles() {
43
+        return [
44
+            new EnterpriseBundle($this->l10n),
45
+            new HubBundle($this->l10n),
46
+            new GroupwareBundle($this->l10n),
47
+            new SocialSharingBundle($this->l10n),
48
+            new EducationBundle($this->l10n),
49
+        ];
50
+    }
51 51
 
52
-	/**
53
-	 * Bundles that should be installed by default after installation
54
-	 *
55
-	 * @return Bundle[]
56
-	 */
57
-	public function getDefaultInstallationBundle() {
58
-		return [
59
-			new CoreBundle($this->l10n),
60
-		];
61
-	}
52
+    /**
53
+     * Bundles that should be installed by default after installation
54
+     *
55
+     * @return Bundle[]
56
+     */
57
+    public function getDefaultInstallationBundle() {
58
+        return [
59
+            new CoreBundle($this->l10n),
60
+        ];
61
+    }
62 62
 
63
-	/**
64
-	 * Get the bundle with the specified identifier
65
-	 *
66
-	 * @param string $identifier
67
-	 * @return Bundle
68
-	 * @throws \BadMethodCallException If the bundle does not exist
69
-	 */
70
-	public function getBundleByIdentifier($identifier) {
71
-		/** @var Bundle[] $bundles */
72
-		$bundles = array_merge(
73
-			$this->getBundles(),
74
-			$this->getDefaultInstallationBundle()
75
-		);
76
-		foreach($bundles as $bundle) {
77
-			if($bundle->getIdentifier() === $identifier) {
78
-				return $bundle;
79
-			}
80
-		}
63
+    /**
64
+     * Get the bundle with the specified identifier
65
+     *
66
+     * @param string $identifier
67
+     * @return Bundle
68
+     * @throws \BadMethodCallException If the bundle does not exist
69
+     */
70
+    public function getBundleByIdentifier($identifier) {
71
+        /** @var Bundle[] $bundles */
72
+        $bundles = array_merge(
73
+            $this->getBundles(),
74
+            $this->getDefaultInstallationBundle()
75
+        );
76
+        foreach($bundles as $bundle) {
77
+            if($bundle->getIdentifier() === $identifier) {
78
+                return $bundle;
79
+            }
80
+        }
81 81
 
82
-		throw new \BadMethodCallException('Bundle with specified identifier does not exist');
83
-	}
82
+        throw new \BadMethodCallException('Bundle with specified identifier does not exist');
83
+    }
84 84
 }
Please login to merge, or discard this patch.
lib/public/BackgroundJob/IJobList.php 1 patch
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -32,100 +32,100 @@
 block discarded – undo
32 32
  * @since 7.0.0
33 33
  */
34 34
 interface IJobList {
35
-	/**
36
-	 * Add a job to the list
37
-	 *
38
-	 * @param \OCP\BackgroundJob\IJob|string $job
39
-	 * @param mixed $argument The argument to be passed to $job->run() when the job is exectured
40
-	 * @since 7.0.0
41
-	 */
42
-	public function add($job, $argument = null);
35
+    /**
36
+     * Add a job to the list
37
+     *
38
+     * @param \OCP\BackgroundJob\IJob|string $job
39
+     * @param mixed $argument The argument to be passed to $job->run() when the job is exectured
40
+     * @since 7.0.0
41
+     */
42
+    public function add($job, $argument = null);
43 43
 
44
-	/**
45
-	 * Remove a job from the list
46
-	 *
47
-	 * @param \OCP\BackgroundJob\IJob|string $job
48
-	 * @param mixed $argument
49
-	 * @since 7.0.0
50
-	 */
51
-	public function remove($job, $argument = null);
44
+    /**
45
+     * Remove a job from the list
46
+     *
47
+     * @param \OCP\BackgroundJob\IJob|string $job
48
+     * @param mixed $argument
49
+     * @since 7.0.0
50
+     */
51
+    public function remove($job, $argument = null);
52 52
 
53
-	/**
54
-	 * check if a job is in the list
55
-	 *
56
-	 * @param \OCP\BackgroundJob\IJob|string $job
57
-	 * @param mixed $argument
58
-	 * @return bool
59
-	 * @since 7.0.0
60
-	 */
61
-	public function has($job, $argument);
53
+    /**
54
+     * check if a job is in the list
55
+     *
56
+     * @param \OCP\BackgroundJob\IJob|string $job
57
+     * @param mixed $argument
58
+     * @return bool
59
+     * @since 7.0.0
60
+     */
61
+    public function has($job, $argument);
62 62
 
63
-	/**
64
-	 * get all jobs in the list
65
-	 *
66
-	 * @return \OCP\BackgroundJob\IJob[]
67
-	 * @since 7.0.0
68
-	 * @deprecated 9.0.0 - This method is dangerous since it can cause load and
69
-	 * memory problems when creating too many instances.
70
-	 */
71
-	public function getAll();
63
+    /**
64
+     * get all jobs in the list
65
+     *
66
+     * @return \OCP\BackgroundJob\IJob[]
67
+     * @since 7.0.0
68
+     * @deprecated 9.0.0 - This method is dangerous since it can cause load and
69
+     * memory problems when creating too many instances.
70
+     */
71
+    public function getAll();
72 72
 
73
-	/**
74
-	 * get the next job in the list
75
-	 *
76
-	 * @return \OCP\BackgroundJob\IJob|null
77
-	 * @since 7.0.0
78
-	 */
79
-	public function getNext();
73
+    /**
74
+     * get the next job in the list
75
+     *
76
+     * @return \OCP\BackgroundJob\IJob|null
77
+     * @since 7.0.0
78
+     */
79
+    public function getNext();
80 80
 
81
-	/**
82
-	 * @param int $id
83
-	 * @return \OCP\BackgroundJob\IJob|null
84
-	 * @since 7.0.0
85
-	 */
86
-	public function getById($id);
81
+    /**
82
+     * @param int $id
83
+     * @return \OCP\BackgroundJob\IJob|null
84
+     * @since 7.0.0
85
+     */
86
+    public function getById($id);
87 87
 
88
-	/**
89
-	 * set the job that was last ran to the current time
90
-	 *
91
-	 * @param \OCP\BackgroundJob\IJob $job
92
-	 * @since 7.0.0
93
-	 */
94
-	public function setLastJob(IJob $job);
88
+    /**
89
+     * set the job that was last ran to the current time
90
+     *
91
+     * @param \OCP\BackgroundJob\IJob $job
92
+     * @since 7.0.0
93
+     */
94
+    public function setLastJob(IJob $job);
95 95
 
96
-	/**
97
-	 * Remove the reservation for a job
98
-	 *
99
-	 * @param IJob $job
100
-	 * @since 9.1.0
101
-	 */
102
-	public function unlockJob(IJob $job);
96
+    /**
97
+     * Remove the reservation for a job
98
+     *
99
+     * @param IJob $job
100
+     * @since 9.1.0
101
+     */
102
+    public function unlockJob(IJob $job);
103 103
 
104
-	/**
105
-	 * get the id of the last ran job
106
-	 *
107
-	 * @return int
108
-	 * @since 7.0.0
109
-	 * @deprecated 9.1.0 - The functionality behind the value is deprecated, it
110
-	 *    only tells you which job finished last, but since we now allow multiple
111
-	 *    executors to run in parallel, it's not used to calculate the next job.
112
-	 */
113
-	public function getLastJob();
104
+    /**
105
+     * get the id of the last ran job
106
+     *
107
+     * @return int
108
+     * @since 7.0.0
109
+     * @deprecated 9.1.0 - The functionality behind the value is deprecated, it
110
+     *    only tells you which job finished last, but since we now allow multiple
111
+     *    executors to run in parallel, it's not used to calculate the next job.
112
+     */
113
+    public function getLastJob();
114 114
 
115
-	/**
116
-	 * set the lastRun of $job to now
117
-	 *
118
-	 * @param IJob $job
119
-	 * @since 7.0.0
120
-	 */
121
-	public function setLastRun(IJob $job);
115
+    /**
116
+     * set the lastRun of $job to now
117
+     *
118
+     * @param IJob $job
119
+     * @since 7.0.0
120
+     */
121
+    public function setLastRun(IJob $job);
122 122
 
123
-	/**
124
-	 * set the run duration of $job
125
-	 *
126
-	 * @param IJob $job
127
-	 * @param $timeTaken
128
-	 * @since 12.0.0
129
-	 */
130
-	public function setExecutionTime(IJob $job, $timeTaken);
123
+    /**
124
+     * set the run duration of $job
125
+     *
126
+     * @param IJob $job
127
+     * @param $timeTaken
128
+     * @since 12.0.0
129
+     */
130
+    public function setExecutionTime(IJob $job, $timeTaken);
131 131
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php 2 patches
Indentation   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -35,133 +35,133 @@
 block discarded – undo
35 35
  */
36 36
 class CalendarSearchReport implements XmlDeserializable {
37 37
 
38
-	/**
39
-	 * An array with requested properties.
40
-	 *
41
-	 * @var array
42
-	 */
43
-	public $properties;
44
-
45
-	/**
46
-	 * List of property/component filters.
47
-	 *
48
-	 * @var array
49
-	 */
50
-	public $filters;
51
-
52
-	/**
53
-	 * @var int
54
-	 */
55
-	public $limit;
56
-
57
-	/**
58
-	 * @var int
59
-	 */
60
-	public $offset;
61
-
62
-	/**
63
-	 * The deserialize method is called during xml parsing.
64
-	 *
65
-	 * This method is called statically, this is because in theory this method
66
-	 * may be used as a type of constructor, or factory method.
67
-	 *
68
-	 * Often you want to return an instance of the current class, but you are
69
-	 * free to return other data as well.
70
-	 *
71
-	 * You are responsible for advancing the reader to the next element. Not
72
-	 * doing anything will result in a never-ending loop.
73
-	 *
74
-	 * If you just want to skip parsing for this element altogether, you can
75
-	 * just call $reader->next();
76
-	 *
77
-	 * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
78
-	 * the next element.
79
-	 *
80
-	 * @param Reader $reader
81
-	 * @return mixed
82
-	 */
83
-	static function xmlDeserialize(Reader $reader) {
84
-		$elems = $reader->parseInnerTree([
85
-			'{http://nextcloud.com/ns}comp-filter'  => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter',
86
-			'{http://nextcloud.com/ns}prop-filter'  => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter',
87
-			'{http://nextcloud.com/ns}param-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter',
88
-			'{http://nextcloud.com/ns}search-term'  => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter',
89
-			'{http://nextcloud.com/ns}limit'        => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter',
90
-			'{http://nextcloud.com/ns}offset'       => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter',
91
-			'{DAV:}prop'                            => 'Sabre\\Xml\\Element\\KeyValue',
92
-		]);
93
-
94
-		$newProps = [
95
-			'filters'    => [],
96
-			'properties' => [],
97
-			'limit'      => null,
98
-			'offset'     => null
99
-		];
100
-
101
-		if (!is_array($elems)) {
102
-			$elems = [];
103
-		}
104
-
105
-		foreach ($elems as $elem) {
106
-			switch ($elem['name']) {
107
-				case '{DAV:}prop':
108
-					$newProps['properties'] = array_keys($elem['value']);
109
-					break;
110
-				case '{' . SearchPlugin::NS_Nextcloud . '}filter':
111
-					foreach ($elem['value'] as $subElem) {
112
-						if ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}comp-filter') {
113
-							if (!isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps'])) {
114
-								$newProps['filters']['comps'] = [];
115
-							}
116
-							$newProps['filters']['comps'][] = $subElem['value'];
117
-						} elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}prop-filter') {
118
-							if (!isset($newProps['filters']['props']) || !is_array($newProps['filters']['props'])) {
119
-								$newProps['filters']['props'] = [];
120
-							}
121
-							$newProps['filters']['props'][] = $subElem['value'];
122
-						} elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}param-filter') {
123
-							if (!isset($newProps['filters']['params']) || !is_array($newProps['filters']['params'])) {
124
-								$newProps['filters']['params'] = [];
125
-							}
126
-							$newProps['filters']['params'][] = $subElem['value'];
127
-						} elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}search-term') {
128
-							$newProps['filters']['search-term'] = $subElem['value'];
129
-						}
130
-					}
131
-					break;
132
-				case '{' . SearchPlugin::NS_Nextcloud . '}limit':
133
-					$newProps['limit'] = $elem['value'];
134
-					break;
135
-				case '{' . SearchPlugin::NS_Nextcloud . '}offset':
136
-					$newProps['offset'] = $elem['value'];
137
-					break;
138
-
139
-			}
140
-		}
141
-
142
-		if (empty($newProps['filters'])) {
143
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}filter element is required for this request');
144
-		}
145
-
146
-		$propsOrParamsDefined = (!empty($newProps['filters']['props']) || !empty($newProps['filters']['params']));
147
-		$noCompsDefined = empty($newProps['filters']['comps']);
148
-		if ($propsOrParamsDefined && $noCompsDefined) {
149
-			throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter given without any {' . SearchPlugin::NS_Nextcloud . '}comp-filter');
150
-		}
151
-
152
-		if (!isset($newProps['filters']['search-term'])) {
153
-			throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}search-term is required for this request');
154
-		}
155
-
156
-		if (empty($newProps['filters']['props']) && empty($newProps['filters']['params'])) {
157
-			throw new BadRequest('At least one{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter is required for this request');
158
-		}
159
-
160
-
161
-		$obj = new self();
162
-		foreach ($newProps as $key => $value) {
163
-			$obj->$key = $value;
164
-		}
165
-		return $obj;
166
-	}
38
+    /**
39
+     * An array with requested properties.
40
+     *
41
+     * @var array
42
+     */
43
+    public $properties;
44
+
45
+    /**
46
+     * List of property/component filters.
47
+     *
48
+     * @var array
49
+     */
50
+    public $filters;
51
+
52
+    /**
53
+     * @var int
54
+     */
55
+    public $limit;
56
+
57
+    /**
58
+     * @var int
59
+     */
60
+    public $offset;
61
+
62
+    /**
63
+     * The deserialize method is called during xml parsing.
64
+     *
65
+     * This method is called statically, this is because in theory this method
66
+     * may be used as a type of constructor, or factory method.
67
+     *
68
+     * Often you want to return an instance of the current class, but you are
69
+     * free to return other data as well.
70
+     *
71
+     * You are responsible for advancing the reader to the next element. Not
72
+     * doing anything will result in a never-ending loop.
73
+     *
74
+     * If you just want to skip parsing for this element altogether, you can
75
+     * just call $reader->next();
76
+     *
77
+     * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
78
+     * the next element.
79
+     *
80
+     * @param Reader $reader
81
+     * @return mixed
82
+     */
83
+    static function xmlDeserialize(Reader $reader) {
84
+        $elems = $reader->parseInnerTree([
85
+            '{http://nextcloud.com/ns}comp-filter'  => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter',
86
+            '{http://nextcloud.com/ns}prop-filter'  => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter',
87
+            '{http://nextcloud.com/ns}param-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter',
88
+            '{http://nextcloud.com/ns}search-term'  => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter',
89
+            '{http://nextcloud.com/ns}limit'        => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter',
90
+            '{http://nextcloud.com/ns}offset'       => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter',
91
+            '{DAV:}prop'                            => 'Sabre\\Xml\\Element\\KeyValue',
92
+        ]);
93
+
94
+        $newProps = [
95
+            'filters'    => [],
96
+            'properties' => [],
97
+            'limit'      => null,
98
+            'offset'     => null
99
+        ];
100
+
101
+        if (!is_array($elems)) {
102
+            $elems = [];
103
+        }
104
+
105
+        foreach ($elems as $elem) {
106
+            switch ($elem['name']) {
107
+                case '{DAV:}prop':
108
+                    $newProps['properties'] = array_keys($elem['value']);
109
+                    break;
110
+                case '{' . SearchPlugin::NS_Nextcloud . '}filter':
111
+                    foreach ($elem['value'] as $subElem) {
112
+                        if ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}comp-filter') {
113
+                            if (!isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps'])) {
114
+                                $newProps['filters']['comps'] = [];
115
+                            }
116
+                            $newProps['filters']['comps'][] = $subElem['value'];
117
+                        } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}prop-filter') {
118
+                            if (!isset($newProps['filters']['props']) || !is_array($newProps['filters']['props'])) {
119
+                                $newProps['filters']['props'] = [];
120
+                            }
121
+                            $newProps['filters']['props'][] = $subElem['value'];
122
+                        } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}param-filter') {
123
+                            if (!isset($newProps['filters']['params']) || !is_array($newProps['filters']['params'])) {
124
+                                $newProps['filters']['params'] = [];
125
+                            }
126
+                            $newProps['filters']['params'][] = $subElem['value'];
127
+                        } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}search-term') {
128
+                            $newProps['filters']['search-term'] = $subElem['value'];
129
+                        }
130
+                    }
131
+                    break;
132
+                case '{' . SearchPlugin::NS_Nextcloud . '}limit':
133
+                    $newProps['limit'] = $elem['value'];
134
+                    break;
135
+                case '{' . SearchPlugin::NS_Nextcloud . '}offset':
136
+                    $newProps['offset'] = $elem['value'];
137
+                    break;
138
+
139
+            }
140
+        }
141
+
142
+        if (empty($newProps['filters'])) {
143
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}filter element is required for this request');
144
+        }
145
+
146
+        $propsOrParamsDefined = (!empty($newProps['filters']['props']) || !empty($newProps['filters']['params']));
147
+        $noCompsDefined = empty($newProps['filters']['comps']);
148
+        if ($propsOrParamsDefined && $noCompsDefined) {
149
+            throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter given without any {' . SearchPlugin::NS_Nextcloud . '}comp-filter');
150
+        }
151
+
152
+        if (!isset($newProps['filters']['search-term'])) {
153
+            throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}search-term is required for this request');
154
+        }
155
+
156
+        if (empty($newProps['filters']['props']) && empty($newProps['filters']['params'])) {
157
+            throw new BadRequest('At least one{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter is required for this request');
158
+        }
159
+
160
+
161
+        $obj = new self();
162
+        foreach ($newProps as $key => $value) {
163
+            $obj->$key = $value;
164
+        }
165
+        return $obj;
166
+    }
167 167
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -107,32 +107,32 @@  discard block
 block discarded – undo
107 107
 				case '{DAV:}prop':
108 108
 					$newProps['properties'] = array_keys($elem['value']);
109 109
 					break;
110
-				case '{' . SearchPlugin::NS_Nextcloud . '}filter':
110
+				case '{'.SearchPlugin::NS_Nextcloud.'}filter':
111 111
 					foreach ($elem['value'] as $subElem) {
112
-						if ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}comp-filter') {
112
+						if ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}comp-filter') {
113 113
 							if (!isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps'])) {
114 114
 								$newProps['filters']['comps'] = [];
115 115
 							}
116 116
 							$newProps['filters']['comps'][] = $subElem['value'];
117
-						} elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}prop-filter') {
117
+						} elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}prop-filter') {
118 118
 							if (!isset($newProps['filters']['props']) || !is_array($newProps['filters']['props'])) {
119 119
 								$newProps['filters']['props'] = [];
120 120
 							}
121 121
 							$newProps['filters']['props'][] = $subElem['value'];
122
-						} elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}param-filter') {
122
+						} elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}param-filter') {
123 123
 							if (!isset($newProps['filters']['params']) || !is_array($newProps['filters']['params'])) {
124 124
 								$newProps['filters']['params'] = [];
125 125
 							}
126 126
 							$newProps['filters']['params'][] = $subElem['value'];
127
-						} elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}search-term') {
127
+						} elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}search-term') {
128 128
 							$newProps['filters']['search-term'] = $subElem['value'];
129 129
 						}
130 130
 					}
131 131
 					break;
132
-				case '{' . SearchPlugin::NS_Nextcloud . '}limit':
132
+				case '{'.SearchPlugin::NS_Nextcloud.'}limit':
133 133
 					$newProps['limit'] = $elem['value'];
134 134
 					break;
135
-				case '{' . SearchPlugin::NS_Nextcloud . '}offset':
135
+				case '{'.SearchPlugin::NS_Nextcloud.'}offset':
136 136
 					$newProps['offset'] = $elem['value'];
137 137
 					break;
138 138
 
@@ -140,21 +140,21 @@  discard block
 block discarded – undo
140 140
 		}
141 141
 
142 142
 		if (empty($newProps['filters'])) {
143
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}filter element is required for this request');
143
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}filter element is required for this request');
144 144
 		}
145 145
 
146 146
 		$propsOrParamsDefined = (!empty($newProps['filters']['props']) || !empty($newProps['filters']['params']));
147 147
 		$noCompsDefined = empty($newProps['filters']['comps']);
148 148
 		if ($propsOrParamsDefined && $noCompsDefined) {
149
-			throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter given without any {' . SearchPlugin::NS_Nextcloud . '}comp-filter');
149
+			throw new BadRequest('{'.SearchPlugin::NS_Nextcloud.'}prop-filter or {'.SearchPlugin::NS_Nextcloud.'}param-filter given without any {'.SearchPlugin::NS_Nextcloud.'}comp-filter');
150 150
 		}
151 151
 
152 152
 		if (!isset($newProps['filters']['search-term'])) {
153
-			throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}search-term is required for this request');
153
+			throw new BadRequest('{'.SearchPlugin::NS_Nextcloud.'}search-term is required for this request');
154 154
 		}
155 155
 
156 156
 		if (empty($newProps['filters']['props']) && empty($newProps['filters']['params'])) {
157
-			throw new BadRequest('At least one{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter is required for this request');
157
+			throw new BadRequest('At least one{'.SearchPlugin::NS_Nextcloud.'}prop-filter or {'.SearchPlugin::NS_Nextcloud.'}param-filter is required for this request');
158 158
 		}
159 159
 
160 160
 
Please login to merge, or discard this patch.
lib/private/App/AppStore/Bundles/CoreBundle.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,20 +23,20 @@
 block discarded – undo
23 23
 
24 24
 class CoreBundle extends Bundle {
25 25
 
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getName() {
30
-		return 'Core bundle';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getName() {
30
+        return 'Core bundle';
31
+    }
32 32
 
33
-	/**
34
-	 * {@inheritDoc}
35
-	 */
36
-	public function getAppIdentifiers() {
37
-		return [
38
-			'bruteforcesettings',
39
-		];
40
-	}
33
+    /**
34
+     * {@inheritDoc}
35
+     */
36
+    public function getAppIdentifiers() {
37
+        return [
38
+            'bruteforcesettings',
39
+        ];
40
+    }
41 41
 
42 42
 }
Please login to merge, or discard this patch.
lib/private/App/AppStore/Bundles/GroupwareBundle.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 	 * {@inheritDoc}
28 28
 	 */
29 29
 	public function getName() {
30
-		return (string)$this->l10n->t('Groupware bundle');
30
+		return (string) $this->l10n->t('Groupware bundle');
31 31
 	}
32 32
 
33 33
 	/**
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -25,23 +25,23 @@
 block discarded – undo
25 25
 
26 26
 class GroupwareBundle extends Bundle {
27 27
 
28
-	/**
29
-	 * {@inheritDoc}
30
-	 */
31
-	public function getName() {
32
-		return (string)$this->l10n->t('Groupware bundle');
33
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     */
31
+    public function getName() {
32
+        return (string)$this->l10n->t('Groupware bundle');
33
+    }
34 34
 
35
-	/**
36
-	 * {@inheritDoc}
37
-	 */
38
-	public function getAppIdentifiers() {
39
-		return [
40
-			'calendar',
41
-			'contacts',
42
-			'deck',
43
-			'mail'
44
-		];
45
-	}
35
+    /**
36
+     * {@inheritDoc}
37
+     */
38
+    public function getAppIdentifiers() {
39
+        return [
40
+            'calendar',
41
+            'contacts',
42
+            'deck',
43
+            'mail'
44
+        ];
45
+    }
46 46
 
47 47
 }
Please login to merge, or discard this patch.
lib/private/App/AppStore/Bundles/Bundle.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -24,36 +24,36 @@
 block discarded – undo
24 24
 use OCP\IL10N;
25 25
 
26 26
 abstract class Bundle {
27
-	/** @var IL10N */
28
-	protected $l10n;
27
+    /** @var IL10N */
28
+    protected $l10n;
29 29
 
30
-	/**
31
-	 * @param IL10N $l10n
32
-	 */
33
-	public function __construct(IL10N $l10n) {
34
-		$this->l10n = $l10n;
35
-	}
30
+    /**
31
+     * @param IL10N $l10n
32
+     */
33
+    public function __construct(IL10N $l10n) {
34
+        $this->l10n = $l10n;
35
+    }
36 36
 
37
-	/**
38
-	 * Get the identifier of the bundle
39
-	 *
40
-	 * @return string
41
-	 */
42
-	public final function getIdentifier() {
43
-		return substr(strrchr(get_class($this), '\\'), 1);
44
-	}
37
+    /**
38
+     * Get the identifier of the bundle
39
+     *
40
+     * @return string
41
+     */
42
+    public final function getIdentifier() {
43
+        return substr(strrchr(get_class($this), '\\'), 1);
44
+    }
45 45
 
46
-	/**
47
-	 * Get the name of the bundle
48
-	 *
49
-	 * @return string
50
-	 */
51
-	public abstract function getName();
46
+    /**
47
+     * Get the name of the bundle
48
+     *
49
+     * @return string
50
+     */
51
+    public abstract function getName();
52 52
 
53
-	/**
54
-	 * Get the list of app identifiers in the bundle
55
-	 *
56
-	 * @return array
57
-	 */
58
-	public abstract function getAppIdentifiers();
53
+    /**
54
+     * Get the list of app identifiers in the bundle
55
+     *
56
+     * @return array
57
+     */
58
+    public abstract function getAppIdentifiers();
59 59
 }
Please login to merge, or discard this patch.
core/Command/Db/ConvertMysqlToMB4.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -34,59 +34,59 @@
 block discarded – undo
34 34
 use Symfony\Component\Console\Output\OutputInterface;
35 35
 
36 36
 class ConvertMysqlToMB4 extends Command {
37
-	/** @var IConfig */
38
-	private $config;
37
+    /** @var IConfig */
38
+    private $config;
39 39
 
40
-	/** @var IDBConnection */
41
-	private $connection;
40
+    /** @var IDBConnection */
41
+    private $connection;
42 42
 
43
-	/** @var IURLGenerator */
44
-	private $urlGenerator;
43
+    /** @var IURLGenerator */
44
+    private $urlGenerator;
45 45
 
46
-	/** @var ILogger */
47
-	private $logger;
46
+    /** @var ILogger */
47
+    private $logger;
48 48
 
49
-	/**
50
-	 * @param IConfig $config
51
-	 * @param IDBConnection $connection
52
-	 * @param IURLGenerator $urlGenerator
53
-	 * @param ILogger $logger
54
-	 */
55
-	public function __construct(IConfig $config, IDBConnection $connection, IURLGenerator $urlGenerator, ILogger $logger) {
56
-		$this->config = $config;
57
-		$this->connection = $connection;
58
-		$this->urlGenerator = $urlGenerator;
59
-		$this->logger = $logger;
60
-		parent::__construct();
61
-	}
49
+    /**
50
+     * @param IConfig $config
51
+     * @param IDBConnection $connection
52
+     * @param IURLGenerator $urlGenerator
53
+     * @param ILogger $logger
54
+     */
55
+    public function __construct(IConfig $config, IDBConnection $connection, IURLGenerator $urlGenerator, ILogger $logger) {
56
+        $this->config = $config;
57
+        $this->connection = $connection;
58
+        $this->urlGenerator = $urlGenerator;
59
+        $this->logger = $logger;
60
+        parent::__construct();
61
+    }
62 62
 
63
-	protected function configure() {
64
-		$this
65
-			->setName('db:convert-mysql-charset')
66
-			->setDescription('Convert charset of MySQL/MariaDB to use utf8mb4');
67
-	}
63
+    protected function configure() {
64
+        $this
65
+            ->setName('db:convert-mysql-charset')
66
+            ->setDescription('Convert charset of MySQL/MariaDB to use utf8mb4');
67
+    }
68 68
 
69
-	protected function execute(InputInterface $input, OutputInterface $output) {
70
-		if (!$this->connection->getDatabasePlatform() instanceof MySqlPlatform) {
71
-			$output->writeln("This command is only valid for MySQL/MariaDB databases.");
72
-			return 1;
73
-		}
69
+    protected function execute(InputInterface $input, OutputInterface $output) {
70
+        if (!$this->connection->getDatabasePlatform() instanceof MySqlPlatform) {
71
+            $output->writeln("This command is only valid for MySQL/MariaDB databases.");
72
+            return 1;
73
+        }
74 74
 
75
-		$tools = new MySqlTools();
76
-		if (!$tools->supports4ByteCharset($this->connection)) {
77
-			$url = $this->urlGenerator->linkToDocs('admin-mysql-utf8mb4');
78
-			$output->writeln("The database is not properly setup to use the charset utf8mb4.");
79
-			$output->writeln("For more information please read the documentation at $url");
80
-			return 1;
81
-		}
75
+        $tools = new MySqlTools();
76
+        if (!$tools->supports4ByteCharset($this->connection)) {
77
+            $url = $this->urlGenerator->linkToDocs('admin-mysql-utf8mb4');
78
+            $output->writeln("The database is not properly setup to use the charset utf8mb4.");
79
+            $output->writeln("For more information please read the documentation at $url");
80
+            return 1;
81
+        }
82 82
 
83
-		// enable charset
84
-		$this->config->setSystemValue('mysql.utf8mb4', true);
83
+        // enable charset
84
+        $this->config->setSystemValue('mysql.utf8mb4', true);
85 85
 
86
-		// run conversion
87
-		$coll = new Collation($this->config, $this->logger, $this->connection, false);
88
-		$coll->run(new ConsoleOutput($output));
86
+        // run conversion
87
+        $coll = new Collation($this->config, $this->logger, $this->connection, false);
88
+        $coll->run(new ConsoleOutput($output));
89 89
 
90
-		return 0;
91
-	}
90
+        return 0;
91
+    }
92 92
 }
Please login to merge, or discard this patch.
lib/public/Diagnostics/IEventLogger.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -35,55 +35,55 @@
 block discarded – undo
35 35
  * @since 8.0.0
36 36
  */
37 37
 interface IEventLogger {
38
-	/**
39
-	 * Mark the start of an event setting its ID $id and providing event description $description.
40
-	 *
41
-	 * @param string $id
42
-	 * @param string $description
43
-	 * @since 8.0.0
44
-	 */
45
-	public function start($id, $description);
38
+    /**
39
+     * Mark the start of an event setting its ID $id and providing event description $description.
40
+     *
41
+     * @param string $id
42
+     * @param string $description
43
+     * @since 8.0.0
44
+     */
45
+    public function start($id, $description);
46 46
 
47
-	/**
48
-	 * Mark the end of an event with specific ID $id, marked by start() method.
49
-	 * Ending event should store \OCP\Diagnostics\IEvent to
50
-	 * be returned with getEvents() method.
51
-	 *
52
-	 * @param string $id
53
-	 * @since 8.0.0
54
-	 */
55
-	public function end($id);
47
+    /**
48
+     * Mark the end of an event with specific ID $id, marked by start() method.
49
+     * Ending event should store \OCP\Diagnostics\IEvent to
50
+     * be returned with getEvents() method.
51
+     *
52
+     * @param string $id
53
+     * @since 8.0.0
54
+     */
55
+    public function end($id);
56 56
 
57
-	/**
58
-	 * Mark the start and the end of an event with specific ID $id and description $description,
59
-	 * explicitly marking start and end of the event, represented by $start and $end timestamps.
60
-	 * Logging event should store \OCP\Diagnostics\IEvent to
61
-	 * be returned with getEvents() method.
62
-	 *
63
-	 * @param string $id
64
-	 * @param string $description
65
-	 * @param float $start
66
-	 * @param float $end
67
-	 * @since 8.0.0
68
-	 */
69
-	public function log($id, $description, $start, $end);
57
+    /**
58
+     * Mark the start and the end of an event with specific ID $id and description $description,
59
+     * explicitly marking start and end of the event, represented by $start and $end timestamps.
60
+     * Logging event should store \OCP\Diagnostics\IEvent to
61
+     * be returned with getEvents() method.
62
+     *
63
+     * @param string $id
64
+     * @param string $description
65
+     * @param float $start
66
+     * @param float $end
67
+     * @since 8.0.0
68
+     */
69
+    public function log($id, $description, $start, $end);
70 70
 
71
-	/**
72
-	 * This method should return all \OCP\Diagnostics\IEvent objects stored using
73
-	 * start()/end() or log() methods
74
-	 *
75
-	 * @return \OCP\Diagnostics\IEvent[]
76
-	 * @since 8.0.0
77
-	 */
78
-	public function getEvents();
71
+    /**
72
+     * This method should return all \OCP\Diagnostics\IEvent objects stored using
73
+     * start()/end() or log() methods
74
+     *
75
+     * @return \OCP\Diagnostics\IEvent[]
76
+     * @since 8.0.0
77
+     */
78
+    public function getEvents();
79 79
 
80
-	/**
81
-	 * Activate the module for the duration of the request. Deactivated module
82
-	 * does not create and store \OCP\Diagnostics\IEvent objects.
83
-	 * Only activated module should create and store objects to be
84
-	 * returned with getEvents() call.
85
-	 *
86
-	 * @since 12.0.0
87
-	 */
88
-	public function activate();
80
+    /**
81
+     * Activate the module for the duration of the request. Deactivated module
82
+     * does not create and store \OCP\Diagnostics\IEvent objects.
83
+     * Only activated module should create and store objects to be
84
+     * returned with getEvents() call.
85
+     *
86
+     * @since 12.0.0
87
+     */
88
+    public function activate();
89 89
 }
Please login to merge, or discard this patch.
lib/public/Diagnostics/IQuery.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -30,38 +30,38 @@
 block discarded – undo
30 30
  * @since 8.0.0
31 31
  */
32 32
 interface IQuery {
33
-	/**
34
-	 * @return string
35
-	 * @since 8.0.0
36
-	 */
37
-	public function getSql();
33
+    /**
34
+     * @return string
35
+     * @since 8.0.0
36
+     */
37
+    public function getSql();
38 38
 
39
-	/**
40
-	 * @return array
41
-	 * @since 8.0.0
42
-	 */
43
-	public function getParams();
39
+    /**
40
+     * @return array
41
+     * @since 8.0.0
42
+     */
43
+    public function getParams();
44 44
 
45
-	/**
46
-	 * @return float
47
-	 * @since 8.0.0
48
-	 */
49
-	public function getDuration();
45
+    /**
46
+     * @return float
47
+     * @since 8.0.0
48
+     */
49
+    public function getDuration();
50 50
 
51
-	/**
52
-	 * @return float
53
-	 * @since 11.0.0
54
-	 */
55
-	public function getStartTime();
51
+    /**
52
+     * @return float
53
+     * @since 11.0.0
54
+     */
55
+    public function getStartTime();
56 56
 
57
-	/**
58
-	 * @return array
59
-	 * @since 11.0.0
60
-	 */
61
-	public function getStacktrace();
62
-	/**
63
-	 * @return array
64
-	 * @since 12.0.0
65
-	 */
66
-	public function getStart();
57
+    /**
58
+     * @return array
59
+     * @since 11.0.0
60
+     */
61
+    public function getStacktrace();
62
+    /**
63
+     * @return array
64
+     * @since 12.0.0
65
+     */
66
+    public function getStart();
67 67
 }
Please login to merge, or discard this patch.