Completed
Pull Request — master (#3233)
by Christoph
95:52 queued 83:56
created
lib/public/IAvatar.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -35,46 +35,46 @@
 block discarded – undo
35 35
  */
36 36
 interface IAvatar {
37 37
 
38
-	/**
39
-	 * get the users avatar
40
-	 * @param int $size size in px of the avatar, avatars are square, defaults to 64, -1 can be used to not scale the image
41
-	 * @return boolean|\OCP\IImage containing the avatar or false if there's no image
42
-	 * @since 6.0.0 - size of -1 was added in 9.0.0
43
-	 */
44
-	public function get($size = 64);
38
+    /**
39
+     * get the users avatar
40
+     * @param int $size size in px of the avatar, avatars are square, defaults to 64, -1 can be used to not scale the image
41
+     * @return boolean|\OCP\IImage containing the avatar or false if there's no image
42
+     * @since 6.0.0 - size of -1 was added in 9.0.0
43
+     */
44
+    public function get($size = 64);
45 45
 
46
-	/**
47
-	 * Check if an avatar exists for the user
48
-	 *
49
-	 * @return bool
50
-	 * @since 8.1.0
51
-	 */
52
-	public function exists();
46
+    /**
47
+     * Check if an avatar exists for the user
48
+     *
49
+     * @return bool
50
+     * @since 8.1.0
51
+     */
52
+    public function exists();
53 53
 
54
-	/**
55
-	 * sets the users avatar
56
-	 * @param \OCP\IImage|resource|string $data An image object, imagedata or path to set a new avatar
57
-	 * @throws \Exception if the provided file is not a jpg or png image
58
-	 * @throws \Exception if the provided image is not valid
59
-	 * @throws \OC\NotSquareException if the image is not square
60
-	 * @return void
61
-	 * @since 6.0.0
62
-	 */
63
-	public function set($data);
54
+    /**
55
+     * sets the users avatar
56
+     * @param \OCP\IImage|resource|string $data An image object, imagedata or path to set a new avatar
57
+     * @throws \Exception if the provided file is not a jpg or png image
58
+     * @throws \Exception if the provided image is not valid
59
+     * @throws \OC\NotSquareException if the image is not square
60
+     * @return void
61
+     * @since 6.0.0
62
+     */
63
+    public function set($data);
64 64
 
65
-	/**
66
-	 * remove the users avatar
67
-	 * @return void
68
-	 * @since 6.0.0
69
-	 */
70
-	public function remove();
65
+    /**
66
+     * remove the users avatar
67
+     * @return void
68
+     * @since 6.0.0
69
+     */
70
+    public function remove();
71 71
 
72
-	/**
73
-	 * Get the file of the avatar
74
-	 * @param int $size -1 can be used to not scale the image
75
-	 * @return File
76
-	 * @throws NotFoundException
77
-	 * @since 9.0.0
78
-	 */
79
-	public function getFile($size);
72
+    /**
73
+     * Get the file of the avatar
74
+     * @param int $size -1 can be used to not scale the image
75
+     * @return File
76
+     * @throws NotFoundException
77
+     * @since 9.0.0
78
+     */
79
+    public function getFile($size);
80 80
 }
Please login to merge, or discard this patch.
lib/public/IPreview.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -43,85 +43,85 @@
 block discarded – undo
43 43
  */
44 44
 interface IPreview {
45 45
 
46
-	/**
47
-	 * @since 9.2.0
48
-	 */
49
-	const EVENT = self::class . ':' . 'PreviewRequested';
46
+    /**
47
+     * @since 9.2.0
48
+     */
49
+    const EVENT = self::class . ':' . 'PreviewRequested';
50 50
 
51
-	const MODE_FILL = 'fill';
52
-	const MODE_COVER = 'cover';
51
+    const MODE_FILL = 'fill';
52
+    const MODE_COVER = 'cover';
53 53
 
54
-	/**
55
-	 * In order to improve lazy loading a closure can be registered which will be
56
-	 * called in case preview providers are actually requested
57
-	 *
58
-	 * $callable has to return an instance of \OCP\Preview\IProvider
59
-	 *
60
-	 * @param string $mimeTypeRegex Regex with the mime types that are supported by this provider
61
-	 * @param \Closure $callable
62
-	 * @return void
63
-	 * @since 8.1.0
64
-	 */
65
-	public function registerProvider($mimeTypeRegex, \Closure $callable);
54
+    /**
55
+     * In order to improve lazy loading a closure can be registered which will be
56
+     * called in case preview providers are actually requested
57
+     *
58
+     * $callable has to return an instance of \OCP\Preview\IProvider
59
+     *
60
+     * @param string $mimeTypeRegex Regex with the mime types that are supported by this provider
61
+     * @param \Closure $callable
62
+     * @return void
63
+     * @since 8.1.0
64
+     */
65
+    public function registerProvider($mimeTypeRegex, \Closure $callable);
66 66
 
67
-	/**
68
-	 * Get all providers
69
-	 * @return array
70
-	 * @since 8.1.0
71
-	 */
72
-	public function getProviders();
67
+    /**
68
+     * Get all providers
69
+     * @return array
70
+     * @since 8.1.0
71
+     */
72
+    public function getProviders();
73 73
 
74
-	/**
75
-	 * Does the manager have any providers
76
-	 * @return bool
77
-	 * @since 8.1.0
78
-	 */
79
-	public function hasProviders();
74
+    /**
75
+     * Does the manager have any providers
76
+     * @return bool
77
+     * @since 8.1.0
78
+     */
79
+    public function hasProviders();
80 80
 
81
-	/**
82
-	 * Return a preview of a file
83
-	 * @param string $file The path to the file where you want a thumbnail from
84
-	 * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
85
-	 * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
86
-	 * @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly
87
-	 * @return \OCP\IImage
88
-	 * @since 6.0.0
89
-	 * @deprecated 11 Use getPreview
90
-	 */
91
-	public function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false);
81
+    /**
82
+     * Return a preview of a file
83
+     * @param string $file The path to the file where you want a thumbnail from
84
+     * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
85
+     * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
86
+     * @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly
87
+     * @return \OCP\IImage
88
+     * @since 6.0.0
89
+     * @deprecated 11 Use getPreview
90
+     */
91
+    public function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false);
92 92
 
93
-	/**
94
-	 * Returns a preview of a file
95
-	 *
96
-	 * The cache is searched first and if nothing usable was found then a preview is
97
-	 * generated by one of the providers
98
-	 *
99
-	 * @param File $file
100
-	 * @param int $width
101
-	 * @param int $height
102
-	 * @param bool $crop
103
-	 * @param string $mode
104
-	 * @param string $mimeType To force a given mimetype for the file (files_versions needs this)
105
-	 * @return ISimpleFile
106
-	 * @throws NotFoundException
107
-	 * @since 11.0.0
108
-	 */
109
-	public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null);
93
+    /**
94
+     * Returns a preview of a file
95
+     *
96
+     * The cache is searched first and if nothing usable was found then a preview is
97
+     * generated by one of the providers
98
+     *
99
+     * @param File $file
100
+     * @param int $width
101
+     * @param int $height
102
+     * @param bool $crop
103
+     * @param string $mode
104
+     * @param string $mimeType To force a given mimetype for the file (files_versions needs this)
105
+     * @return ISimpleFile
106
+     * @throws NotFoundException
107
+     * @since 11.0.0
108
+     */
109
+    public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null);
110 110
 
111
-	/**
112
-	 * Returns true if the passed mime type is supported
113
-	 * @param string $mimeType
114
-	 * @return boolean
115
-	 * @since 6.0.0
116
-	 */
117
-	public function isMimeSupported($mimeType = '*');
111
+    /**
112
+     * Returns true if the passed mime type is supported
113
+     * @param string $mimeType
114
+     * @return boolean
115
+     * @since 6.0.0
116
+     */
117
+    public function isMimeSupported($mimeType = '*');
118 118
 
119
-	/**
120
-	 * Check if a preview can be generated for a file
121
-	 *
122
-	 * @param \OCP\Files\FileInfo $file
123
-	 * @return bool
124
-	 * @since 8.0.0
125
-	 */
126
-	public function isAvailable(\OCP\Files\FileInfo $file);
119
+    /**
120
+     * Check if a preview can be generated for a file
121
+     *
122
+     * @param \OCP\Files\FileInfo $file
123
+     * @return bool
124
+     * @since 8.0.0
125
+     */
126
+    public function isAvailable(\OCP\Files\FileInfo $file);
127 127
 }
Please login to merge, or discard this patch.
lib/public/Contacts/IManager.php 1 patch
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -34,138 +34,138 @@
 block discarded – undo
34 34
 // This means that they should be used by apps instead of the internal ownCloud classes
35 35
 namespace OCP\Contacts {
36 36
 
37
-	/**
38
-	 * This class provides access to the contacts app. Use this class exclusively if you want to access contacts.
39
-	 *
40
-	 * Contacts in general will be expressed as an array of key-value-pairs.
41
-	 * The keys will match the property names defined in https://tools.ietf.org/html/rfc2426#section-1
42
-	 *
43
-	 * Proposed workflow for working with contacts:
44
-	 *  - search for the contacts
45
-	 *  - manipulate the results array
46
-	 *  - createOrUpdate will save the given contacts overwriting the existing data
47
-	 *
48
-	 * For updating it is mandatory to keep the id.
49
-	 * Without an id a new contact will be created.
50
-	 *
51
-	 * @since 6.0.0
52
-	 */
53
-	interface IManager {
37
+    /**
38
+     * This class provides access to the contacts app. Use this class exclusively if you want to access contacts.
39
+     *
40
+     * Contacts in general will be expressed as an array of key-value-pairs.
41
+     * The keys will match the property names defined in https://tools.ietf.org/html/rfc2426#section-1
42
+     *
43
+     * Proposed workflow for working with contacts:
44
+     *  - search for the contacts
45
+     *  - manipulate the results array
46
+     *  - createOrUpdate will save the given contacts overwriting the existing data
47
+     *
48
+     * For updating it is mandatory to keep the id.
49
+     * Without an id a new contact will be created.
50
+     *
51
+     * @since 6.0.0
52
+     */
53
+    interface IManager {
54 54
 
55
-		/**
56
-		 * This function is used to search and find contacts within the users address books.
57
-		 * In case $pattern is empty all contacts will be returned.
58
-		 *
59
-		 * Example:
60
-		 *  Following function shows how to search for contacts for the name and the email address.
61
-		 *
62
-		 *		public static function getMatchingRecipient($term) {
63
-		 *			$cm = \OC::$server->getContactsManager();
64
-		 *			// The API is not active -> nothing to do
65
-		 *			if (!$cm->isEnabled()) {
66
-		 *				return array();
67
-		 *			}
68
-		 *
69
-		 *			$result = $cm->search($term, array('FN', 'EMAIL'));
70
-		 *			$receivers = array();
71
-		 *			foreach ($result as $r) {
72
-		 *				$id = $r['id'];
73
-		 *				$fn = $r['FN'];
74
-		 *				$email = $r['EMAIL'];
75
-		 *				if (!is_array($email)) {
76
-		 *					$email = array($email);
77
-		 *				}
78
-		 *
79
-		 *				// loop through all email addresses of this contact
80
-		 *				foreach ($email as $e) {
81
-		 *				$displayName = $fn . " <$e>";
82
-		 *				$receivers[] = array(
83
-		 *					'id'    => $id,
84
-		 *					'label' => $displayName,
85
-		 *					'value' => $displayName);
86
-		 *				}
87
-		 *			}
88
-		 *
89
-		 *			return $receivers;
90
-		 *		}
91
-		 *
92
-		 *
93
-		 * @param string $pattern which should match within the $searchProperties
94
-		 * @param array $searchProperties defines the properties within the query pattern should match
95
-		 * @param array $options - for future use. One should always have options!
96
-		 * @return array an array of contacts which are arrays of key-value-pairs
97
-		 * @since 6.0.0
98
-		 */
99
-		function search($pattern, $searchProperties = array(), $options = array());
55
+        /**
56
+         * This function is used to search and find contacts within the users address books.
57
+         * In case $pattern is empty all contacts will be returned.
58
+         *
59
+         * Example:
60
+         *  Following function shows how to search for contacts for the name and the email address.
61
+         *
62
+         *		public static function getMatchingRecipient($term) {
63
+         *			$cm = \OC::$server->getContactsManager();
64
+         *			// The API is not active -> nothing to do
65
+         *			if (!$cm->isEnabled()) {
66
+         *				return array();
67
+         *			}
68
+         *
69
+         *			$result = $cm->search($term, array('FN', 'EMAIL'));
70
+         *			$receivers = array();
71
+         *			foreach ($result as $r) {
72
+         *				$id = $r['id'];
73
+         *				$fn = $r['FN'];
74
+         *				$email = $r['EMAIL'];
75
+         *				if (!is_array($email)) {
76
+         *					$email = array($email);
77
+         *				}
78
+         *
79
+         *				// loop through all email addresses of this contact
80
+         *				foreach ($email as $e) {
81
+         *				$displayName = $fn . " <$e>";
82
+         *				$receivers[] = array(
83
+         *					'id'    => $id,
84
+         *					'label' => $displayName,
85
+         *					'value' => $displayName);
86
+         *				}
87
+         *			}
88
+         *
89
+         *			return $receivers;
90
+         *		}
91
+         *
92
+         *
93
+         * @param string $pattern which should match within the $searchProperties
94
+         * @param array $searchProperties defines the properties within the query pattern should match
95
+         * @param array $options - for future use. One should always have options!
96
+         * @return array an array of contacts which are arrays of key-value-pairs
97
+         * @since 6.0.0
98
+         */
99
+        function search($pattern, $searchProperties = array(), $options = array());
100 100
 
101
-		/**
102
-		 * This function can be used to delete the contact identified by the given id
103
-		 *
104
-		 * @param object $id the unique identifier to a contact
105
-		 * @param string $address_book_key identifier of the address book in which the contact shall be deleted
106
-		 * @return bool successful or not
107
-		 * @since 6.0.0
108
-		 */
109
-		function delete($id, $address_book_key);
101
+        /**
102
+         * This function can be used to delete the contact identified by the given id
103
+         *
104
+         * @param object $id the unique identifier to a contact
105
+         * @param string $address_book_key identifier of the address book in which the contact shall be deleted
106
+         * @return bool successful or not
107
+         * @since 6.0.0
108
+         */
109
+        function delete($id, $address_book_key);
110 110
 
111
-		/**
112
-		 * This function is used to create a new contact if 'id' is not given or not present.
113
-		 * Otherwise the contact will be updated by replacing the entire data set.
114
-		 *
115
-		 * @param array $properties this array if key-value-pairs defines a contact
116
-		 * @param string $address_book_key identifier of the address book in which the contact shall be created or updated
117
-		 * @return array an array representing the contact just created or updated
118
-		 * @since 6.0.0
119
-		 */
120
-		function createOrUpdate($properties, $address_book_key);
111
+        /**
112
+         * This function is used to create a new contact if 'id' is not given or not present.
113
+         * Otherwise the contact will be updated by replacing the entire data set.
114
+         *
115
+         * @param array $properties this array if key-value-pairs defines a contact
116
+         * @param string $address_book_key identifier of the address book in which the contact shall be created or updated
117
+         * @return array an array representing the contact just created or updated
118
+         * @since 6.0.0
119
+         */
120
+        function createOrUpdate($properties, $address_book_key);
121 121
 
122
-		/**
123
-		 * Check if contacts are available (e.g. contacts app enabled)
124
-		 *
125
-		 * @return bool true if enabled, false if not
126
-		 * @since 6.0.0
127
-		 */
128
-		function isEnabled();
122
+        /**
123
+         * Check if contacts are available (e.g. contacts app enabled)
124
+         *
125
+         * @return bool true if enabled, false if not
126
+         * @since 6.0.0
127
+         */
128
+        function isEnabled();
129 129
 
130
-		/**
131
-		 * Registers an address book
132
-		 *
133
-		 * @param \OCP\IAddressBook $address_book
134
-		 * @return void
135
-		 * @since 6.0.0
136
-		 */
137
-		function registerAddressBook(\OCP\IAddressBook $address_book);
130
+        /**
131
+         * Registers an address book
132
+         *
133
+         * @param \OCP\IAddressBook $address_book
134
+         * @return void
135
+         * @since 6.0.0
136
+         */
137
+        function registerAddressBook(\OCP\IAddressBook $address_book);
138 138
 
139
-		/**
140
-		 * Unregisters an address book
141
-		 *
142
-		 * @param \OCP\IAddressBook $address_book
143
-		 * @return void
144
-		 * @since 6.0.0
145
-		 */
146
-		function unregisterAddressBook(\OCP\IAddressBook $address_book);
139
+        /**
140
+         * Unregisters an address book
141
+         *
142
+         * @param \OCP\IAddressBook $address_book
143
+         * @return void
144
+         * @since 6.0.0
145
+         */
146
+        function unregisterAddressBook(\OCP\IAddressBook $address_book);
147 147
 
148
-		/**
149
-		 * In order to improve lazy loading a closure can be registered which will be called in case
150
-		 * address books are actually requested
151
-		 *
152
-		 * @param \Closure $callable
153
-		 * @return void
154
-		 * @since 6.0.0
155
-		 */
156
-		function register(\Closure $callable);
148
+        /**
149
+         * In order to improve lazy loading a closure can be registered which will be called in case
150
+         * address books are actually requested
151
+         *
152
+         * @param \Closure $callable
153
+         * @return void
154
+         * @since 6.0.0
155
+         */
156
+        function register(\Closure $callable);
157 157
 
158
-		/**
159
-		 * @return array
160
-		 * @since 6.0.0
161
-		 */
162
-		function getAddressBooks();
158
+        /**
159
+         * @return array
160
+         * @since 6.0.0
161
+         */
162
+        function getAddressBooks();
163 163
 
164
-		/**
165
-		 * removes all registered address book instances
166
-		 * @return void
167
-		 * @since 6.0.0
168
-		 */
169
-		function clear();
170
-	}
164
+        /**
165
+         * removes all registered address book instances
166
+         * @return void
167
+         * @since 6.0.0
168
+         */
169
+        function clear();
170
+    }
171 171
 }
Please login to merge, or discard this patch.
lib/public/ISearch.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -33,46 +33,46 @@
 block discarded – undo
33 33
  */
34 34
 interface ISearch {
35 35
 
36
-	/**
37
-	 * Search all providers for $query
38
-	 * @param string $query
39
-	 * @param string[] $inApps optionally limit results to the given apps
40
-	 * @return array An array of OCP\Search\Result's
41
-	 * @deprecated 8.0.0 use searchPaged() with page and size
42
-	 * @since 7.0.0 - parameter $inApps was added in 8.0.0
43
-	 */
44
-	public function search($query, array $inApps = array());
36
+    /**
37
+     * Search all providers for $query
38
+     * @param string $query
39
+     * @param string[] $inApps optionally limit results to the given apps
40
+     * @return array An array of OCP\Search\Result's
41
+     * @deprecated 8.0.0 use searchPaged() with page and size
42
+     * @since 7.0.0 - parameter $inApps was added in 8.0.0
43
+     */
44
+    public function search($query, array $inApps = array());
45 45
 
46
-	/**
47
-	 * Search all providers for $query
48
-	 * @param string $query
49
-	 * @param string[] $inApps optionally limit results to the given apps
50
-	 * @param int $page pages start at page 1
51
-	 * @param int $size
52
-	 * @return array An array of OCP\Search\Result's
53
-	 * @since 8.0.0
54
-	 */
55
-	public function searchPaged($query, array $inApps = array(), $page = 1, $size = 30);
46
+    /**
47
+     * Search all providers for $query
48
+     * @param string $query
49
+     * @param string[] $inApps optionally limit results to the given apps
50
+     * @param int $page pages start at page 1
51
+     * @param int $size
52
+     * @return array An array of OCP\Search\Result's
53
+     * @since 8.0.0
54
+     */
55
+    public function searchPaged($query, array $inApps = array(), $page = 1, $size = 30);
56 56
 
57
-	/**
58
-	 * Register a new search provider to search with
59
-	 * @param string $class class name of a OCP\Search\Provider
60
-	 * @param array $options optional
61
-	 * @since 7.0.0
62
-	 */
63
-	public function registerProvider($class, array $options = array());
57
+    /**
58
+     * Register a new search provider to search with
59
+     * @param string $class class name of a OCP\Search\Provider
60
+     * @param array $options optional
61
+     * @since 7.0.0
62
+     */
63
+    public function registerProvider($class, array $options = array());
64 64
 
65
-	/**
66
-	 * Remove one existing search provider
67
-	 * @param string $provider class name of a OCP\Search\Provider
68
-	 * @since 7.0.0
69
-	 */
70
-	public function removeProvider($provider);
65
+    /**
66
+     * Remove one existing search provider
67
+     * @param string $provider class name of a OCP\Search\Provider
68
+     * @since 7.0.0
69
+     */
70
+    public function removeProvider($provider);
71 71
 
72
-	/**
73
-	 * Remove all registered search providers
74
-	 * @since 7.0.0
75
-	 */
76
-	public function clearProviders();
72
+    /**
73
+     * Remove all registered search providers
74
+     * @since 7.0.0
75
+     */
76
+    public function clearProviders();
77 77
 
78 78
 }
Please login to merge, or discard this patch.
lib/public/IRequest.php 1 patch
Indentation   +186 added lines, -186 removed lines patch added patch discarded remove patch
@@ -63,217 +63,217 @@
 block discarded – undo
63 63
  * @since 6.0.0
64 64
  */
65 65
 interface IRequest {
66
-	/**
67
-	 * @since 9.1.0
68
-	 */
69
-	const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
66
+    /**
67
+     * @since 9.1.0
68
+     */
69
+    const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
70 70
 
71
-	/**
72
-	 * @since 9.1.0
73
-	 */
74
-	const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
71
+    /**
72
+     * @since 9.1.0
73
+     */
74
+    const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
75 75
 
76
-	/**
77
-	 * @since 9.1.0
78
-	 */
79
-	const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
76
+    /**
77
+     * @since 9.1.0
78
+     */
79
+    const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
80 80
 
81
-	/**
82
-	 * @param string $name
83
-	 *
84
-	 * @return string
85
-	 * @since 6.0.0
86
-	 */
87
-	public function getHeader($name);
81
+    /**
82
+     * @param string $name
83
+     *
84
+     * @return string
85
+     * @since 6.0.0
86
+     */
87
+    public function getHeader($name);
88 88
 
89
-	/**
90
-	 * Lets you access post and get parameters by the index
91
-	 * In case of json requests the encoded json body is accessed
92
-	 *
93
-	 * @param string $key the key which you want to access in the URL Parameter
94
-	 *                     placeholder, $_POST or $_GET array.
95
-	 *                     The priority how they're returned is the following:
96
-	 *                     1. URL parameters
97
-	 *                     2. POST parameters
98
-	 *                     3. GET parameters
99
-	 * @param mixed $default If the key is not found, this value will be returned
100
-	 * @return mixed the content of the array
101
-	 * @since 6.0.0
102
-	 */
103
-	public function getParam($key, $default = null);
89
+    /**
90
+     * Lets you access post and get parameters by the index
91
+     * In case of json requests the encoded json body is accessed
92
+     *
93
+     * @param string $key the key which you want to access in the URL Parameter
94
+     *                     placeholder, $_POST or $_GET array.
95
+     *                     The priority how they're returned is the following:
96
+     *                     1. URL parameters
97
+     *                     2. POST parameters
98
+     *                     3. GET parameters
99
+     * @param mixed $default If the key is not found, this value will be returned
100
+     * @return mixed the content of the array
101
+     * @since 6.0.0
102
+     */
103
+    public function getParam($key, $default = null);
104 104
 
105 105
 
106
-	/**
107
-	 * Returns all params that were received, be it from the request
108
-	 *
109
-	 * (as GET or POST) or through the URL by the route
110
-	 *
111
-	 * @return array the array with all parameters
112
-	 * @since 6.0.0
113
-	 */
114
-	public function getParams();
106
+    /**
107
+     * Returns all params that were received, be it from the request
108
+     *
109
+     * (as GET or POST) or through the URL by the route
110
+     *
111
+     * @return array the array with all parameters
112
+     * @since 6.0.0
113
+     */
114
+    public function getParams();
115 115
 
116
-	/**
117
-	 * Returns the method of the request
118
-	 *
119
-	 * @return string the method of the request (POST, GET, etc)
120
-	 * @since 6.0.0
121
-	 */
122
-	public function getMethod();
116
+    /**
117
+     * Returns the method of the request
118
+     *
119
+     * @return string the method of the request (POST, GET, etc)
120
+     * @since 6.0.0
121
+     */
122
+    public function getMethod();
123 123
 
124
-	/**
125
-	 * Shortcut for accessing an uploaded file through the $_FILES array
126
-	 *
127
-	 * @param string $key the key that will be taken from the $_FILES array
128
-	 * @return array the file in the $_FILES element
129
-	 * @since 6.0.0
130
-	 */
131
-	public function getUploadedFile($key);
124
+    /**
125
+     * Shortcut for accessing an uploaded file through the $_FILES array
126
+     *
127
+     * @param string $key the key that will be taken from the $_FILES array
128
+     * @return array the file in the $_FILES element
129
+     * @since 6.0.0
130
+     */
131
+    public function getUploadedFile($key);
132 132
 
133 133
 
134
-	/**
135
-	 * Shortcut for getting env variables
136
-	 *
137
-	 * @param string $key the key that will be taken from the $_ENV array
138
-	 * @return array the value in the $_ENV element
139
-	 * @since 6.0.0
140
-	 */
141
-	public function getEnv($key);
134
+    /**
135
+     * Shortcut for getting env variables
136
+     *
137
+     * @param string $key the key that will be taken from the $_ENV array
138
+     * @return array the value in the $_ENV element
139
+     * @since 6.0.0
140
+     */
141
+    public function getEnv($key);
142 142
 
143 143
 
144
-	/**
145
-	 * Shortcut for getting cookie variables
146
-	 *
147
-	 * @param string $key the key that will be taken from the $_COOKIE array
148
-	 * @return string|null the value in the $_COOKIE element
149
-	 * @since 6.0.0
150
-	 */
151
-	public function getCookie($key);
144
+    /**
145
+     * Shortcut for getting cookie variables
146
+     *
147
+     * @param string $key the key that will be taken from the $_COOKIE array
148
+     * @return string|null the value in the $_COOKIE element
149
+     * @since 6.0.0
150
+     */
151
+    public function getCookie($key);
152 152
 
153 153
 
154
-	/**
155
-	 * Checks if the CSRF check was correct
156
-	 *
157
-	 * @return bool true if CSRF check passed
158
-	 * @since 6.0.0
159
-	 */
160
-	public function passesCSRFCheck();
154
+    /**
155
+     * Checks if the CSRF check was correct
156
+     *
157
+     * @return bool true if CSRF check passed
158
+     * @since 6.0.0
159
+     */
160
+    public function passesCSRFCheck();
161 161
 
162
-	/**
163
-	 * Checks if the strict cookie has been sent with the request if the request
164
-	 * is including any cookies.
165
-	 *
166
-	 * @return bool
167
-	 * @since 9.0.0
168
-	 */
169
-	public function passesStrictCookieCheck();
162
+    /**
163
+     * Checks if the strict cookie has been sent with the request if the request
164
+     * is including any cookies.
165
+     *
166
+     * @return bool
167
+     * @since 9.0.0
168
+     */
169
+    public function passesStrictCookieCheck();
170 170
 
171
-	/**
172
-	 * Checks if the lax cookie has been sent with the request if the request
173
-	 * is including any cookies.
174
-	 *
175
-	 * @return bool
176
-	 * @since 9.0.0
177
-	 */
178
-	public function passesLaxCookieCheck();
171
+    /**
172
+     * Checks if the lax cookie has been sent with the request if the request
173
+     * is including any cookies.
174
+     *
175
+     * @return bool
176
+     * @since 9.0.0
177
+     */
178
+    public function passesLaxCookieCheck();
179 179
 
180
-	/**
181
-	 * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging
182
-	 * If `mod_unique_id` is installed this value will be taken.
183
-	 *
184
-	 * @return string
185
-	 * @since 8.1.0
186
-	 */
187
-	public function getId();
180
+    /**
181
+     * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging
182
+     * If `mod_unique_id` is installed this value will be taken.
183
+     *
184
+     * @return string
185
+     * @since 8.1.0
186
+     */
187
+    public function getId();
188 188
 
189
-	/**
190
-	 * Returns the remote address, if the connection came from a trusted proxy
191
-	 * and `forwarded_for_headers` has been configured then the IP address
192
-	 * specified in this header will be returned instead.
193
-	 * Do always use this instead of $_SERVER['REMOTE_ADDR']
194
-	 *
195
-	 * @return string IP address
196
-	 * @since 8.1.0
197
-	 */
198
-	public function getRemoteAddress();
189
+    /**
190
+     * Returns the remote address, if the connection came from a trusted proxy
191
+     * and `forwarded_for_headers` has been configured then the IP address
192
+     * specified in this header will be returned instead.
193
+     * Do always use this instead of $_SERVER['REMOTE_ADDR']
194
+     *
195
+     * @return string IP address
196
+     * @since 8.1.0
197
+     */
198
+    public function getRemoteAddress();
199 199
 
200
-	/**
201
-	 * Returns the server protocol. It respects reverse proxy servers and load
202
-	 * balancers.
203
-	 *
204
-	 * @return string Server protocol (http or https)
205
-	 * @since 8.1.0
206
-	 */
207
-	public function getServerProtocol();
200
+    /**
201
+     * Returns the server protocol. It respects reverse proxy servers and load
202
+     * balancers.
203
+     *
204
+     * @return string Server protocol (http or https)
205
+     * @since 8.1.0
206
+     */
207
+    public function getServerProtocol();
208 208
 
209
-	/**
210
-	 * Returns the used HTTP protocol.
211
-	 *
212
-	 * @return string HTTP protocol. HTTP/2, HTTP/1.1 or HTTP/1.0.
213
-	 * @since 8.2.0
214
-	 */
215
-	public function getHttpProtocol();
209
+    /**
210
+     * Returns the used HTTP protocol.
211
+     *
212
+     * @return string HTTP protocol. HTTP/2, HTTP/1.1 or HTTP/1.0.
213
+     * @since 8.2.0
214
+     */
215
+    public function getHttpProtocol();
216 216
 
217
-	/**
218
-	 * Returns the request uri, even if the website uses one or more
219
-	 * reverse proxies
220
-	 *
221
-	 * @return string
222
-	 * @since 8.1.0
223
-	 */
224
-	public function getRequestUri();
217
+    /**
218
+     * Returns the request uri, even if the website uses one or more
219
+     * reverse proxies
220
+     *
221
+     * @return string
222
+     * @since 8.1.0
223
+     */
224
+    public function getRequestUri();
225 225
 
226
-	/**
227
-	 * Get raw PathInfo from request (not urldecoded)
228
-	 *
229
-	 * @throws \Exception
230
-	 * @return string Path info
231
-	 * @since 8.1.0
232
-	 */
233
-	public function getRawPathInfo();
226
+    /**
227
+     * Get raw PathInfo from request (not urldecoded)
228
+     *
229
+     * @throws \Exception
230
+     * @return string Path info
231
+     * @since 8.1.0
232
+     */
233
+    public function getRawPathInfo();
234 234
 
235
-	/**
236
-	 * Get PathInfo from request
237
-	 *
238
-	 * @throws \Exception
239
-	 * @return string|false Path info or false when not found
240
-	 * @since 8.1.0
241
-	 */
242
-	public function getPathInfo();
235
+    /**
236
+     * Get PathInfo from request
237
+     *
238
+     * @throws \Exception
239
+     * @return string|false Path info or false when not found
240
+     * @since 8.1.0
241
+     */
242
+    public function getPathInfo();
243 243
 
244
-	/**
245
-	 * Returns the script name, even if the website uses one or more
246
-	 * reverse proxies
247
-	 *
248
-	 * @return string the script name
249
-	 * @since 8.1.0
250
-	 */
251
-	public function getScriptName();
244
+    /**
245
+     * Returns the script name, even if the website uses one or more
246
+     * reverse proxies
247
+     *
248
+     * @return string the script name
249
+     * @since 8.1.0
250
+     */
251
+    public function getScriptName();
252 252
 
253
-	/**
254
-	 * Checks whether the user agent matches a given regex
255
-	 *
256
-	 * @param array $agent array of agent names
257
-	 * @return bool true if at least one of the given agent matches, false otherwise
258
-	 * @since 8.1.0
259
-	 */
260
-	public function isUserAgent(array $agent);
253
+    /**
254
+     * Checks whether the user agent matches a given regex
255
+     *
256
+     * @param array $agent array of agent names
257
+     * @return bool true if at least one of the given agent matches, false otherwise
258
+     * @since 8.1.0
259
+     */
260
+    public function isUserAgent(array $agent);
261 261
 
262
-	/**
263
-	 * Returns the unverified server host from the headers without checking
264
-	 * whether it is a trusted domain
265
-	 *
266
-	 * @return string Server host
267
-	 * @since 8.1.0
268
-	 */
269
-	public function getInsecureServerHost();
262
+    /**
263
+     * Returns the unverified server host from the headers without checking
264
+     * whether it is a trusted domain
265
+     *
266
+     * @return string Server host
267
+     * @since 8.1.0
268
+     */
269
+    public function getInsecureServerHost();
270 270
 
271
-	/**
272
-	 * Returns the server host from the headers, or the first configured
273
-	 * trusted domain if the host isn't in the trusted list
274
-	 *
275
-	 * @return string Server host
276
-	 * @since 8.1.0
277
-	 */
278
-	public function getServerHost();
271
+    /**
272
+     * Returns the server host from the headers, or the first configured
273
+     * trusted domain if the host isn't in the trusted list
274
+     *
275
+     * @return string Server host
276
+     * @since 8.1.0
277
+     */
278
+    public function getServerHost();
279 279
 }
Please login to merge, or discard this patch.
lib/public/IURLGenerator.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -38,57 +38,57 @@
 block discarded – undo
38 38
  * @since 6.0.0
39 39
  */
40 40
 interface IURLGenerator {
41
-	/**
42
-	 * Returns the URL for a route
43
-	 * @param string $routeName the name of the route
44
-	 * @param array $arguments an array with arguments which will be filled into the url
45
-	 * @return string the url
46
-	 * @since 6.0.0
47
-	 */
48
-	public function linkToRoute($routeName, $arguments = array());
41
+    /**
42
+     * Returns the URL for a route
43
+     * @param string $routeName the name of the route
44
+     * @param array $arguments an array with arguments which will be filled into the url
45
+     * @return string the url
46
+     * @since 6.0.0
47
+     */
48
+    public function linkToRoute($routeName, $arguments = array());
49 49
 
50
-	/**
51
-	 * Returns the absolute URL for a route
52
-	 * @param string $routeName the name of the route
53
-	 * @param array $arguments an array with arguments which will be filled into the url
54
-	 * @return string the absolute url
55
-	 * @since 8.0.0
56
-	 */
57
-	public function linkToRouteAbsolute($routeName, $arguments = array());
50
+    /**
51
+     * Returns the absolute URL for a route
52
+     * @param string $routeName the name of the route
53
+     * @param array $arguments an array with arguments which will be filled into the url
54
+     * @return string the absolute url
55
+     * @since 8.0.0
56
+     */
57
+    public function linkToRouteAbsolute($routeName, $arguments = array());
58 58
 
59
-	/**
60
-	 * Returns an URL for an image or file
61
-	 * @param string $appName the name of the app
62
-	 * @param string $file the name of the file
63
-	 * @param array $args array with param=>value, will be appended to the returned url
64
-	 *    The value of $args will be urlencoded
65
-	 * @return string the url
66
-	 * @since 6.0.0
67
-	 */
68
-	public function linkTo($appName, $file, $args = array());
59
+    /**
60
+     * Returns an URL for an image or file
61
+     * @param string $appName the name of the app
62
+     * @param string $file the name of the file
63
+     * @param array $args array with param=>value, will be appended to the returned url
64
+     *    The value of $args will be urlencoded
65
+     * @return string the url
66
+     * @since 6.0.0
67
+     */
68
+    public function linkTo($appName, $file, $args = array());
69 69
 
70
-	/**
71
-	 * Returns the link to an image, like linkTo but only with prepending img/
72
-	 * @param string $appName the name of the app
73
-	 * @param string $file the name of the file
74
-	 * @return string the url
75
-	 * @since 6.0.0
76
-	 */
77
-	public function imagePath($appName, $file);
70
+    /**
71
+     * Returns the link to an image, like linkTo but only with prepending img/
72
+     * @param string $appName the name of the app
73
+     * @param string $file the name of the file
74
+     * @return string the url
75
+     * @since 6.0.0
76
+     */
77
+    public function imagePath($appName, $file);
78 78
 
79 79
 
80
-	/**
81
-	 * Makes an URL absolute
82
-	 * @param string $url the url in the ownCloud host
83
-	 * @return string the absolute version of the url
84
-	 * @since 6.0.0
85
-	 */
86
-	public function getAbsoluteURL($url);
80
+    /**
81
+     * Makes an URL absolute
82
+     * @param string $url the url in the ownCloud host
83
+     * @return string the absolute version of the url
84
+     * @since 6.0.0
85
+     */
86
+    public function getAbsoluteURL($url);
87 87
 
88
-	/**
89
-	 * @param string $key
90
-	 * @return string url to the online documentation
91
-	 * @since 8.0.0
92
-	 */
93
-	public function linkToDocs($key);
88
+    /**
89
+     * @param string $key
90
+     * @return string url to the online documentation
91
+     * @since 8.0.0
92
+     */
93
+    public function linkToDocs($key);
94 94
 }
Please login to merge, or discard this patch.
lib/public/SystemTag/ISystemTag.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -29,41 +29,41 @@
 block discarded – undo
29 29
  */
30 30
 interface ISystemTag {
31 31
 
32
-	/**
33
-	 * Returns the tag id
34
-	 *
35
-	 * @return string id
36
-	 *
37
-	 * @since 9.0.0
38
-	 */
39
-	public function getId();
32
+    /**
33
+     * Returns the tag id
34
+     *
35
+     * @return string id
36
+     *
37
+     * @since 9.0.0
38
+     */
39
+    public function getId();
40 40
 
41
-	/**
42
-	 * Returns the tag display name
43
-	 *
44
-	 * @return string tag display name
45
-	 *
46
-	 * @since 9.0.0
47
-	 */
48
-	public function getName();
41
+    /**
42
+     * Returns the tag display name
43
+     *
44
+     * @return string tag display name
45
+     *
46
+     * @since 9.0.0
47
+     */
48
+    public function getName();
49 49
 
50
-	/**
51
-	 * Returns whether the tag is visible for regular users
52
-	 *
53
-	 * @return bool true if visible, false otherwise
54
-	 *
55
-	 * @since 9.0.0
56
-	 */
57
-	public function isUserVisible();
50
+    /**
51
+     * Returns whether the tag is visible for regular users
52
+     *
53
+     * @return bool true if visible, false otherwise
54
+     *
55
+     * @since 9.0.0
56
+     */
57
+    public function isUserVisible();
58 58
 
59
-	/**
60
-	 * Returns whether the tag can be assigned to objects by regular users
61
-	 *
62
-	 * @return bool true if assignable, false otherwise
63
-	 *
64
-	 * @since 9.0.0
65
-	 */
66
-	public function isUserAssignable();
59
+    /**
60
+     * Returns whether the tag can be assigned to objects by regular users
61
+     *
62
+     * @return bool true if assignable, false otherwise
63
+     *
64
+     * @since 9.0.0
65
+     */
66
+    public function isUserAssignable();
67 67
 
68 68
 }
69 69
 
Please login to merge, or discard this patch.
lib/public/SystemTag/TagNotFoundException.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
  */
31 31
 class TagNotFoundException extends \RuntimeException {
32 32
 
33
-	/** @var string[] */
34
-	protected $tags;
33
+    /** @var string[] */
34
+    protected $tags;
35 35
 
36
-	/**
37
-	 * TagNotFoundException constructor.
38
-	 *
39
-	 * @param string $message
40
-	 * @param int $code
41
-	 * @param \Exception $previous
42
-	 * @param string[] $tags
43
-	 * @since 9.0.0
44
-	 */
45
-	public function __construct($message = '', $code = 0, \Exception $previous = null, array $tags = []) {
46
-		parent::__construct($message, $code, $previous);
47
-		$this->tags = $tags;
48
-	}
36
+    /**
37
+     * TagNotFoundException constructor.
38
+     *
39
+     * @param string $message
40
+     * @param int $code
41
+     * @param \Exception $previous
42
+     * @param string[] $tags
43
+     * @since 9.0.0
44
+     */
45
+    public function __construct($message = '', $code = 0, \Exception $previous = null, array $tags = []) {
46
+        parent::__construct($message, $code, $previous);
47
+        $this->tags = $tags;
48
+    }
49 49
 
50
-	/**
51
-	 * @return string[]
52
-	 * @since 9.0.0
53
-	 */
54
-	public function getMissingTags() {
55
-		return $this->tags;
56
-	}
50
+    /**
51
+     * @return string[]
52
+     * @since 9.0.0
53
+     */
54
+    public function getMissingTags() {
55
+        return $this->tags;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
lib/public/SystemTag/MapperEvent.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -32,63 +32,63 @@
 block discarded – undo
32 32
  */
33 33
 class MapperEvent extends Event {
34 34
 
35
-	const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags';
36
-	const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags';
35
+    const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags';
36
+    const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags';
37 37
 
38
-	/** @var string */
39
-	protected $event;
40
-	/** @var string */
41
-	protected $objectType;
42
-	/** @var string */
43
-	protected $objectId;
44
-	/** @var int[] */
45
-	protected $tags;
38
+    /** @var string */
39
+    protected $event;
40
+    /** @var string */
41
+    protected $objectType;
42
+    /** @var string */
43
+    protected $objectId;
44
+    /** @var int[] */
45
+    protected $tags;
46 46
 
47
-	/**
48
-	 * DispatcherEvent constructor.
49
-	 *
50
-	 * @param string $event
51
-	 * @param string $objectType
52
-	 * @param string $objectId
53
-	 * @param int[] $tags
54
-	 * @since 9.0.0
55
-	 */
56
-	public function __construct($event, $objectType, $objectId, array $tags) {
57
-		$this->event = $event;
58
-		$this->objectType = $objectType;
59
-		$this->objectId = $objectId;
60
-		$this->tags = $tags;
61
-	}
47
+    /**
48
+     * DispatcherEvent constructor.
49
+     *
50
+     * @param string $event
51
+     * @param string $objectType
52
+     * @param string $objectId
53
+     * @param int[] $tags
54
+     * @since 9.0.0
55
+     */
56
+    public function __construct($event, $objectType, $objectId, array $tags) {
57
+        $this->event = $event;
58
+        $this->objectType = $objectType;
59
+        $this->objectId = $objectId;
60
+        $this->tags = $tags;
61
+    }
62 62
 
63
-	/**
64
-	 * @return string
65
-	 * @since 9.0.0
66
-	 */
67
-	public function getEvent() {
68
-		return $this->event;
69
-	}
63
+    /**
64
+     * @return string
65
+     * @since 9.0.0
66
+     */
67
+    public function getEvent() {
68
+        return $this->event;
69
+    }
70 70
 
71
-	/**
72
-	 * @return string
73
-	 * @since 9.0.0
74
-	 */
75
-	public function getObjectType() {
76
-		return $this->objectType;
77
-	}
71
+    /**
72
+     * @return string
73
+     * @since 9.0.0
74
+     */
75
+    public function getObjectType() {
76
+        return $this->objectType;
77
+    }
78 78
 
79
-	/**
80
-	 * @return string
81
-	 * @since 9.0.0
82
-	 */
83
-	public function getObjectId() {
84
-		return $this->objectId;
85
-	}
79
+    /**
80
+     * @return string
81
+     * @since 9.0.0
82
+     */
83
+    public function getObjectId() {
84
+        return $this->objectId;
85
+    }
86 86
 
87
-	/**
88
-	 * @return int[]
89
-	 * @since 9.0.0
90
-	 */
91
-	public function getTags() {
92
-		return $this->tags;
93
-	}
87
+    /**
88
+     * @return int[]
89
+     * @since 9.0.0
90
+     */
91
+    public function getTags() {
92
+        return $this->tags;
93
+    }
94 94
 }
Please login to merge, or discard this patch.