Passed
Push — master ( c00d6f...a085a8 )
by Morris
09:54 queued 11s
created
lib/private/Archive/Archive.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param string $source either a local file or string data
50 50
 	 * @return bool
51 51
 	 */
52
-	public abstract function addFile($path, $source='');
52
+	public abstract function addFile($path, $source = '');
53 53
 	/**
54 54
 	 * rename a file or folder in the archive
55 55
 	 * @param string $source
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public function addRecursive($path, $source) {
128 128
 		$dh = opendir($source);
129
-		if(is_resource($dh)) {
129
+		if (is_resource($dh)) {
130 130
 			$this->addFolder($path);
131 131
 			while (($file = readdir($dh)) !== false) {
132
-				if($file === '.' || $file === '..') {
132
+				if ($file === '.' || $file === '..') {
133 133
 					continue;
134 134
 				}
135
-				if(is_dir($source.'/'.$file)) {
135
+				if (is_dir($source.'/'.$file)) {
136 136
 					$this->addRecursive($path.'/'.$file, $source.'/'.$file);
137
-				}else{
137
+				} else {
138 138
 					$this->addFile($path.'/'.$file, $source.'/'.$file);
139 139
 				}
140 140
 			}
Please login to merge, or discard this patch.
lib/private/Security/TrustedDomainHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			return true;
82 82
 		}
83 83
 		// Reject misformed domains in any case
84
-		if (strpos($domain,'-') === 0 || strpos($domain,'..') !== false) {
84
+		if (strpos($domain, '-') === 0 || strpos($domain, '..') !== false) {
85 85
 			return false;
86 86
 		}
87 87
 		// Match, allowing for * wildcards
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			if (gettype($trusted) !== 'string') {
90 90
 				break;
91 91
 			}
92
-			$regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/';
92
+			$regex = '/^'.implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))).'$/';
93 93
 			if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) {
94 94
  				return true;
95 95
  			}
Please login to merge, or discard this patch.
lib/private/Memcache/Memcached.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function get($key) {
100
-		$result = self::$cache->get($this->getNameSpace() . $key);
100
+		$result = self::$cache->get($this->getNameSpace().$key);
101 101
 		if ($result === false and self::$cache->getResultCode() == \Memcached::RES_NOTFOUND) {
102 102
 			return null;
103 103
 		} else {
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
 
108 108
 	public function set($key, $value, $ttl = 0) {
109 109
 		if ($ttl > 0) {
110
-			$result =  self::$cache->set($this->getNameSpace() . $key, $value, $ttl);
110
+			$result = self::$cache->set($this->getNameSpace().$key, $value, $ttl);
111 111
 		} else {
112
-			$result = self::$cache->set($this->getNameSpace() . $key, $value);
112
+			$result = self::$cache->set($this->getNameSpace().$key, $value);
113 113
 		}
114 114
 		if ($result !== true) {
115 115
 			$this->verifyReturnCode();
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	public function hasKey($key) {
121
-		self::$cache->get($this->getNameSpace() . $key);
121
+		self::$cache->get($this->getNameSpace().$key);
122 122
 		return self::$cache->getResultCode() === \Memcached::RES_SUCCESS;
123 123
 	}
124 124
 
125 125
 	public function remove($key) {
126
-		$result= self::$cache->delete($this->getNameSpace() . $key);
126
+		$result = self::$cache->delete($this->getNameSpace().$key);
127 127
 		if (self::$cache->getResultCode() !== \Memcached::RES_NOTFOUND) {
128 128
 			$this->verifyReturnCode();
129 129
 		}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 
133 133
 	public function clear($prefix = '') {
134
-		$prefix = $this->getNameSpace() . $prefix;
134
+		$prefix = $this->getNameSpace().$prefix;
135 135
 		$allKeys = self::$cache->getAllKeys();
136 136
 		if ($allKeys === false) {
137 137
 			// newer Memcached doesn't like getAllKeys(), flush everything
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @throws \Exception
166 166
 	 */
167 167
 	public function add($key, $value, $ttl = 0) {
168
-		$result = self::$cache->add($this->getPrefix() . $key, $value, $ttl);
168
+		$result = self::$cache->add($this->getPrefix().$key, $value, $ttl);
169 169
 		if (self::$cache->getResultCode() !== \Memcached::RES_NOTSTORED) {
170 170
 			$this->verifyReturnCode();
171 171
 		}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function inc($key, $step = 1) {
183 183
 		$this->add($key, 0);
184
-		$result = self::$cache->increment($this->getPrefix() . $key, $step);
184
+		$result = self::$cache->increment($this->getPrefix().$key, $step);
185 185
 
186 186
 		if (self::$cache->getResultCode() !== \Memcached::RES_SUCCESS) {
187 187
 			return false;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 * @return int | bool
199 199
 	 */
200 200
 	public function dec($key, $step = 1) {
201
-		$result = self::$cache->decrement($this->getPrefix() . $key, $step);
201
+		$result = self::$cache->decrement($this->getPrefix().$key, $step);
202 202
 
203 203
 		if (self::$cache->getResultCode() !== \Memcached::RES_SUCCESS) {
204 204
 			return false;
Please login to merge, or discard this patch.
apps/files_sharing/lib/Command/CleanupRemoteStorages.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 
61 61
 		$remoteStorages = $this->getRemoteStorages();
62 62
 
63
-		$output->writeln(count($remoteStorages) . ' remote storage(s) need(s) to be checked');
63
+		$output->writeln(count($remoteStorages).' remote storage(s) need(s) to be checked');
64 64
 
65 65
 		$remoteShareIds = $this->getRemoteShareIds();
66 66
 
67
-		$output->writeln(count($remoteShareIds) . ' remote share(s) exist');
67
+		$output->writeln(count($remoteShareIds).' remote share(s) exist');
68 68
 
69 69
 		foreach ($remoteShareIds as $id => $remoteShareId) {
70 70
 			if (isset($remoteStorages[$remoteShareId])) {
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
 			->where($queryBuilder->expr()->like(
143 143
 				'id',
144 144
 				// match all 'shared::' + 32 characters storages
145
-				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::') . str_repeat('_', 32)),
145
+				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::').str_repeat('_', 32)),
146 146
 				IQueryBuilder::PARAM_STR)
147 147
 			)
148 148
 			->andWhere($queryBuilder->expr()->notLike(
149 149
 				'id',
150 150
 				// but not the ones starting with a '/', they are for normal shares
151
-				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::/') . '%'),
151
+				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::/').'%'),
152 152
 				IQueryBuilder::PARAM_STR)
153 153
 			)->orderBy('numeric_id');
154 154
 		$query = $queryBuilder->execute();
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		$remoteShareIds = [];
173 173
 
174 174
 		while ($row = $query->fetch()) {
175
-			$remoteShareIds[$row['id']] = 'shared::' . md5($row['share_token'] . '@' . $row['remote']);
175
+			$remoteShareIds[$row['id']] = 'shared::'.md5($row['share_token'].'@'.$row['remote']);
176 176
 		}
177 177
 
178 178
 		return $remoteShareIds;
Please login to merge, or discard this patch.
lib/private/legacy/db/statementwrapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * pass all other function directly to the \Doctrine\DBAL\Driver\Statement
56 56
 	 */
57
-	public function __call($name,$arguments) {
58
-		return call_user_func_array(array($this->statement,$name), $arguments);
57
+	public function __call($name, $arguments) {
58
+		return call_user_func_array(array($this->statement, $name), $arguments);
59 59
 	}
60 60
 
61 61
 	/**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @param array $input
65 65
 	 * @return \OC_DB_StatementWrapper|int|bool
66 66
 	 */
67
-	public function execute($input= []) {
67
+	public function execute($input = []) {
68 68
 		$this->lastArguments = $input;
69 69
 		if (count($input) > 0) {
70 70
 			$result = $this->statement->execute($input);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	 * @param integer|null $length max length when using an OUT bind
114 114
 	 * @return boolean
115 115
 	 */
116
-	public function bindParam($column, &$variable, $type = null, $length = null){
116
+	public function bindParam($column, &$variable, $type = null, $length = null) {
117 117
 		return $this->statement->bindParam($column, $variable, $type, $length);
118 118
 	}
119 119
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/ApiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function __construct($appName,
61 61
                                 IRequest $request,
62
-                                $corsMethods='PUT, POST, GET, DELETE, PATCH',
63
-                                $corsAllowedHeaders='Authorization, Content-Type, Accept',
64
-                                $corsMaxAge=1728000){
62
+                                $corsMethods = 'PUT, POST, GET, DELETE, PATCH',
63
+                                $corsAllowedHeaders = 'Authorization, Content-Type, Accept',
64
+                                $corsMaxAge = 1728000) {
65 65
         parent::__construct($appName, $request);
66 66
         $this->corsMethods = $corsMethods;
67 67
         $this->corsAllowedHeaders = $corsAllowedHeaders;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @since 7.0.0
80 80
      */
81 81
     public function preflightedCors() {
82
-        if(isset($this->request->server['HTTP_ORIGIN'])) {
82
+        if (isset($this->request->server['HTTP_ORIGIN'])) {
83 83
             $origin = $this->request->server['HTTP_ORIGIN'];
84 84
         } else {
85 85
             $origin = '*';
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $response = new Response();
89 89
         $response->addHeader('Access-Control-Allow-Origin', $origin);
90 90
         $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods);
91
-        $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge);
91
+        $response->addHeader('Access-Control-Max-Age', (string) $this->corsMaxAge);
92 92
         $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders);
93 93
         $response->addHeader('Access-Control-Allow-Credentials', 'false');
94 94
         return $response;
Please login to merge, or discard this patch.
lib/public/Files/IAppData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
  * @package OCP\Files
31 31
  * @since 11.0.0
32 32
  */
33
-interface IAppData extends ISimpleRoot  {
33
+interface IAppData extends ISimpleRoot {
34 34
 	
35 35
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Command/Create.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -128,32 +128,32 @@  discard block
 block discarded – undo
128 128
 		$authBackend = $this->backendService->getAuthMechanism($authIdentifier);
129 129
 
130 130
 		if (!Filesystem::isValidPath($mountPoint)) {
131
-			$output->writeln('<error>Invalid mountpoint "' . $mountPoint . '"</error>');
131
+			$output->writeln('<error>Invalid mountpoint "'.$mountPoint.'"</error>');
132 132
 			return 1;
133 133
 		}
134 134
 		if (is_null($storageBackend)) {
135
-			$output->writeln('<error>Storage backend with identifier "' . $storageIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>');
135
+			$output->writeln('<error>Storage backend with identifier "'.$storageIdentifier.'" not found (see `occ files_external:backends` for possible values)</error>');
136 136
 			return 404;
137 137
 		}
138 138
 		if (is_null($authBackend)) {
139
-			$output->writeln('<error>Authentication backend with identifier "' . $authIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>');
139
+			$output->writeln('<error>Authentication backend with identifier "'.$authIdentifier.'" not found (see `occ files_external:backends` for possible values)</error>');
140 140
 			return 404;
141 141
 		}
142 142
 		$supportedSchemes = array_keys($storageBackend->getAuthSchemes());
143 143
 		if (!in_array($authBackend->getScheme(), $supportedSchemes)) {
144
-			$output->writeln('<error>Authentication backend "' . $authIdentifier . '" not valid for storage backend "' . $storageIdentifier . '" (see `occ files_external:backends storage ' . $storageIdentifier . '` for possible values)</error>');
144
+			$output->writeln('<error>Authentication backend "'.$authIdentifier.'" not valid for storage backend "'.$storageIdentifier.'" (see `occ files_external:backends storage '.$storageIdentifier.'` for possible values)</error>');
145 145
 			return 1;
146 146
 		}
147 147
 
148 148
 		$config = [];
149 149
 		foreach ($configInput as $configOption) {
150 150
 			if (!strpos($configOption, '=')) {
151
-				$output->writeln('<error>Invalid mount configuration option "' . $configOption . '"</error>');
151
+				$output->writeln('<error>Invalid mount configuration option "'.$configOption.'"</error>');
152 152
 				return 1;
153 153
 			}
154 154
 			list($key, $value) = explode('=', $configOption, 2);
155 155
 			if (!$this->validateParam($key, $value, $storageBackend, $authBackend)) {
156
-				$output->writeln('<error>Unknown configuration for backends "' . $key . '"</error>');
156
+				$output->writeln('<error>Unknown configuration for backends "'.$key.'"</error>');
157 157
 				return 1;
158 158
 			}
159 159
 			$config[$key] = $value;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 		if ($user) {
169 169
 			if (!$this->userManager->userExists($user)) {
170
-				$output->writeln('<error>User "' . $user . '" not found</error>');
170
+				$output->writeln('<error>User "'.$user.'" not found</error>');
171 171
 				return 1;
172 172
 			}
173 173
 			$mount->setApplicableUsers([$user]);
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 		} else {
179 179
 			$this->getStorageService($user)->addStorage($mount);
180 180
 			if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) {
181
-				$output->writeln('<info>Storage created with id ' . $mount->getId() . '</info>');
181
+				$output->writeln('<info>Storage created with id '.$mount->getId().'</info>');
182 182
 			} else {
183
-				$output->writeln((string)$mount->getId());
183
+				$output->writeln((string) $mount->getId());
184 184
 			}
185 185
 		}
186 186
 		return 0;
Please login to merge, or discard this patch.
lib/private/Files/Storage/Home.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	public function __construct($arguments) {
51 51
 		$this->user = $arguments['user'];
52 52
 		$datadir = $this->user->getHome();
53
-		$this->id = 'home::' . $this->user->getUID();
53
+		$this->id = 'home::'.$this->user->getUID();
54 54
 
55 55
 		parent::__construct(['datadir' => $datadir]);
56 56
 	}
Please login to merge, or discard this patch.