Completed
Pull Request — master (#9735)
by Morris
23:37
created
core/Application.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -42,36 +42,36 @@
 block discarded – undo
42 42
  */
43 43
 class Application extends App {
44 44
 
45
-	public function __construct() {
46
-		parent::__construct('core');
45
+    public function __construct() {
46
+        parent::__construct('core');
47 47
 
48
-		$container = $this->getContainer();
48
+        $container = $this->getContainer();
49 49
 
50
-		$container->registerService('defaultMailAddress', function () {
51
-			return Util::getDefaultEmailAddress('lostpassword-noreply');
52
-		});
50
+        $container->registerService('defaultMailAddress', function () {
51
+            return Util::getDefaultEmailAddress('lostpassword-noreply');
52
+        });
53 53
 
54
-		$server = $container->getServer();
55
-		$eventDispatcher = $server->getEventDispatcher();
54
+        $server = $container->getServer();
55
+        $eventDispatcher = $server->getEventDispatcher();
56 56
 
57
-		$eventDispatcher->addListener(IDBConnection::CHECK_MISSING_INDEXES_EVENT,
58
-			function(GenericEvent $event) use ($container) {
59
-				/** @var MissingIndexInformation $subject */
60
-				$subject = $event->getSubject();
57
+        $eventDispatcher->addListener(IDBConnection::CHECK_MISSING_INDEXES_EVENT,
58
+            function(GenericEvent $event) use ($container) {
59
+                /** @var MissingIndexInformation $subject */
60
+                $subject = $event->getSubject();
61 61
 
62
-				$schema = new SchemaWrapper($container->query(IDBConnection::class));
62
+                $schema = new SchemaWrapper($container->query(IDBConnection::class));
63 63
 
64
-				if ($schema->hasTable('share')) {
65
-					$table = $schema->getTable('share');
64
+                if ($schema->hasTable('share')) {
65
+                    $table = $schema->getTable('share');
66 66
 
67
-					if (!$table->hasIndex('share_with_index')) {
68
-						$subject->addHintForMissingSubject($table->getName(), 'share_with_index');
69
-					}
70
-					if (!$table->hasIndex('parent_index')) {
71
-						$subject->addHintForMissingSubject($table->getName(), 'parent_index');
72
-					}
73
-				}
74
-			}
75
-		);
76
-	}
67
+                    if (!$table->hasIndex('share_with_index')) {
68
+                        $subject->addHintForMissingSubject($table->getName(), 'share_with_index');
69
+                    }
70
+                    if (!$table->hasIndex('parent_index')) {
71
+                        $subject->addHintForMissingSubject($table->getName(), 'parent_index');
72
+                    }
73
+                }
74
+            }
75
+        );
76
+    }
77 77
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
 		$container = $this->getContainer();
49 49
 
50
-		$container->registerService('defaultMailAddress', function () {
50
+		$container->registerService('defaultMailAddress', function() {
51 51
 			return Util::getDefaultEmailAddress('lostpassword-noreply');
52 52
 		});
53 53
 
Please login to merge, or discard this patch.
settings/Controller/CheckSetupController.php 1 patch
Indentation   +390 added lines, -390 removed lines patch added patch discarded remove patch
@@ -53,277 +53,277 @@  discard block
 block discarded – undo
53 53
  * @package OC\Settings\Controller
54 54
  */
55 55
 class CheckSetupController extends Controller {
56
-	/** @var IConfig */
57
-	private $config;
58
-	/** @var IClientService */
59
-	private $clientService;
60
-	/** @var \OC_Util */
61
-	private $util;
62
-	/** @var IURLGenerator */
63
-	private $urlGenerator;
64
-	/** @var IL10N */
65
-	private $l10n;
66
-	/** @var Checker */
67
-	private $checker;
68
-	/** @var ILogger */
69
-	private $logger;
70
-	/** @var EventDispatcherInterface */
71
-	private $dispatcher;
72
-
73
-	public function __construct($AppName,
74
-								IRequest $request,
75
-								IConfig $config,
76
-								IClientService $clientService,
77
-								IURLGenerator $urlGenerator,
78
-								\OC_Util $util,
79
-								IL10N $l10n,
80
-								Checker $checker,
81
-								ILogger $logger,
82
-								EventDispatcherInterface $dispatcher) {
83
-		parent::__construct($AppName, $request);
84
-		$this->config = $config;
85
-		$this->clientService = $clientService;
86
-		$this->util = $util;
87
-		$this->urlGenerator = $urlGenerator;
88
-		$this->l10n = $l10n;
89
-		$this->checker = $checker;
90
-		$this->logger = $logger;
91
-		$this->dispatcher = $dispatcher;
92
-	}
93
-
94
-	/**
95
-	 * Checks if the server can connect to the internet using HTTPS and HTTP
96
-	 * @return bool
97
-	 */
98
-	private function isInternetConnectionWorking() {
99
-		if ($this->config->getSystemValue('has_internet_connection', true) === false) {
100
-			return false;
101
-		}
102
-
103
-		$siteArray = ['www.nextcloud.com',
104
-						'www.startpage.com',
105
-						'www.eff.org',
106
-						'www.edri.org',
107
-			];
108
-
109
-		foreach($siteArray as $site) {
110
-			if ($this->isSiteReachable($site)) {
111
-				return true;
112
-			}
113
-		}
114
-		return false;
115
-	}
116
-
117
-	/**
118
-	* Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP
119
-	* @return bool
120
-	*/
121
-	private function isSiteReachable($sitename) {
122
-		$httpSiteName = 'http://' . $sitename . '/';
123
-		$httpsSiteName = 'https://' . $sitename . '/';
124
-
125
-		try {
126
-			$client = $this->clientService->newClient();
127
-			$client->get($httpSiteName);
128
-			$client->get($httpsSiteName);
129
-		} catch (\Exception $e) {
130
-			$this->logger->logException($e, ['app' => 'internet_connection_check']);
131
-			return false;
132
-		}
133
-		return true;
134
-	}
135
-
136
-	/**
137
-	 * Checks whether a local memcache is installed or not
138
-	 * @return bool
139
-	 */
140
-	private function isMemcacheConfigured() {
141
-		return $this->config->getSystemValue('memcache.local', null) !== null;
142
-	}
143
-
144
-	/**
145
-	 * Whether /dev/urandom is available to the PHP controller
146
-	 *
147
-	 * @return bool
148
-	 */
149
-	private function isUrandomAvailable() {
150
-		if(@file_exists('/dev/urandom')) {
151
-			$file = fopen('/dev/urandom', 'rb');
152
-			if($file) {
153
-				fclose($file);
154
-				return true;
155
-			}
156
-		}
157
-
158
-		return false;
159
-	}
160
-
161
-	/**
162
-	 * Public for the sake of unit-testing
163
-	 *
164
-	 * @return array
165
-	 */
166
-	protected function getCurlVersion() {
167
-		return curl_version();
168
-	}
169
-
170
-	/**
171
-	 * Check if the used  SSL lib is outdated. Older OpenSSL and NSS versions do
172
-	 * have multiple bugs which likely lead to problems in combination with
173
-	 * functionality required by ownCloud such as SNI.
174
-	 *
175
-	 * @link https://github.com/owncloud/core/issues/17446#issuecomment-122877546
176
-	 * @link https://bugzilla.redhat.com/show_bug.cgi?id=1241172
177
-	 * @return string
178
-	 */
179
-	private function isUsedTlsLibOutdated() {
180
-		// Don't run check when:
181
-		// 1. Server has `has_internet_connection` set to false
182
-		// 2. AppStore AND S2S is disabled
183
-		if(!$this->config->getSystemValue('has_internet_connection', true)) {
184
-			return '';
185
-		}
186
-		if(!$this->config->getSystemValue('appstoreenabled', true)
187
-			&& $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no'
188
-			&& $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') {
189
-			return '';
190
-		}
191
-
192
-		$versionString = $this->getCurlVersion();
193
-		if(isset($versionString['ssl_version'])) {
194
-			$versionString = $versionString['ssl_version'];
195
-		} else {
196
-			return '';
197
-		}
198
-
199
-		$features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
200
-		if(!$this->config->getSystemValue('appstoreenabled', true)) {
201
-			$features = (string)$this->l10n->t('Federated Cloud Sharing');
202
-		}
203
-
204
-		// Check if at least OpenSSL after 1.01d or 1.0.2b
205
-		if(strpos($versionString, 'OpenSSL/') === 0) {
206
-			$majorVersion = substr($versionString, 8, 5);
207
-			$patchRelease = substr($versionString, 13, 6);
208
-
209
-			if(($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) ||
210
-				($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) {
211
-				return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['OpenSSL', $versionString, $features]);
212
-			}
213
-		}
214
-
215
-		// Check if NSS and perform heuristic check
216
-		if(strpos($versionString, 'NSS/') === 0) {
217
-			try {
218
-				$firstClient = $this->clientService->newClient();
219
-				$firstClient->get('https://nextcloud.com/');
220
-
221
-				$secondClient = $this->clientService->newClient();
222
-				$secondClient->get('https://nextcloud.com/');
223
-			} catch (ClientException $e) {
224
-				if($e->getResponse()->getStatusCode() === 400) {
225
-					return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['NSS', $versionString, $features]);
226
-				}
227
-			}
228
-		}
229
-
230
-		return '';
231
-	}
232
-
233
-	/**
234
-	 * Whether the version is outdated
235
-	 *
236
-	 * @return bool
237
-	 */
238
-	protected function isPhpOutdated() {
239
-		if (version_compare(PHP_VERSION, '7.0.0', '<')) {
240
-			return true;
241
-		}
242
-
243
-		return false;
244
-	}
245
-
246
-	/**
247
-	 * Whether the php version is still supported (at time of release)
248
-	 * according to: https://secure.php.net/supported-versions.php
249
-	 *
250
-	 * @return array
251
-	 */
252
-	private function isPhpSupported() {
253
-		return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION];
254
-	}
255
-
256
-	/**
257
-	 * Check if the reverse proxy configuration is working as expected
258
-	 *
259
-	 * @return bool
260
-	 */
261
-	private function forwardedForHeadersWorking() {
262
-		$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
263
-		$remoteAddress = $this->request->getRemoteAddress();
264
-
265
-		if (is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
266
-			return false;
267
-		}
268
-
269
-		// either not enabled or working correctly
270
-		return true;
271
-	}
272
-
273
-	/**
274
-	 * Checks if the correct memcache module for PHP is installed. Only
275
-	 * fails if memcached is configured and the working module is not installed.
276
-	 *
277
-	 * @return bool
278
-	 */
279
-	private function isCorrectMemcachedPHPModuleInstalled() {
280
-		if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') {
281
-			return true;
282
-		}
283
-
284
-		// there are two different memcached modules for PHP
285
-		// we only support memcached and not memcache
286
-		// https://code.google.com/p/memcached/wiki/PHPClientComparison
287
-		return !(!extension_loaded('memcached') && extension_loaded('memcache'));
288
-	}
289
-
290
-	/**
291
-	 * Checks if set_time_limit is not disabled.
292
-	 *
293
-	 * @return bool
294
-	 */
295
-	private function isSettimelimitAvailable() {
296
-		if (function_exists('set_time_limit')
297
-			&& strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
298
-			return true;
299
-		}
300
-
301
-		return false;
302
-	}
303
-
304
-	/**
305
-	 * @return RedirectResponse
306
-	 */
307
-	public function rescanFailedIntegrityCheck() {
308
-		$this->checker->runInstanceVerification();
309
-		return new RedirectResponse(
310
-			$this->urlGenerator->linkToRoute('settings.AdminSettings.index')
311
-		);
312
-	}
313
-
314
-	/**
315
-	 * @NoCSRFRequired
316
-	 * @return DataResponse
317
-	 */
318
-	public function getFailedIntegrityCheckFiles() {
319
-		if(!$this->checker->isCodeCheckEnforced()) {
320
-			return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
321
-		}
322
-
323
-		$completeResults = $this->checker->getResults();
324
-
325
-		if(!empty($completeResults)) {
326
-			$formattedTextResponse = 'Technical information
56
+    /** @var IConfig */
57
+    private $config;
58
+    /** @var IClientService */
59
+    private $clientService;
60
+    /** @var \OC_Util */
61
+    private $util;
62
+    /** @var IURLGenerator */
63
+    private $urlGenerator;
64
+    /** @var IL10N */
65
+    private $l10n;
66
+    /** @var Checker */
67
+    private $checker;
68
+    /** @var ILogger */
69
+    private $logger;
70
+    /** @var EventDispatcherInterface */
71
+    private $dispatcher;
72
+
73
+    public function __construct($AppName,
74
+                                IRequest $request,
75
+                                IConfig $config,
76
+                                IClientService $clientService,
77
+                                IURLGenerator $urlGenerator,
78
+                                \OC_Util $util,
79
+                                IL10N $l10n,
80
+                                Checker $checker,
81
+                                ILogger $logger,
82
+                                EventDispatcherInterface $dispatcher) {
83
+        parent::__construct($AppName, $request);
84
+        $this->config = $config;
85
+        $this->clientService = $clientService;
86
+        $this->util = $util;
87
+        $this->urlGenerator = $urlGenerator;
88
+        $this->l10n = $l10n;
89
+        $this->checker = $checker;
90
+        $this->logger = $logger;
91
+        $this->dispatcher = $dispatcher;
92
+    }
93
+
94
+    /**
95
+     * Checks if the server can connect to the internet using HTTPS and HTTP
96
+     * @return bool
97
+     */
98
+    private function isInternetConnectionWorking() {
99
+        if ($this->config->getSystemValue('has_internet_connection', true) === false) {
100
+            return false;
101
+        }
102
+
103
+        $siteArray = ['www.nextcloud.com',
104
+                        'www.startpage.com',
105
+                        'www.eff.org',
106
+                        'www.edri.org',
107
+            ];
108
+
109
+        foreach($siteArray as $site) {
110
+            if ($this->isSiteReachable($site)) {
111
+                return true;
112
+            }
113
+        }
114
+        return false;
115
+    }
116
+
117
+    /**
118
+     * Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP
119
+     * @return bool
120
+     */
121
+    private function isSiteReachable($sitename) {
122
+        $httpSiteName = 'http://' . $sitename . '/';
123
+        $httpsSiteName = 'https://' . $sitename . '/';
124
+
125
+        try {
126
+            $client = $this->clientService->newClient();
127
+            $client->get($httpSiteName);
128
+            $client->get($httpsSiteName);
129
+        } catch (\Exception $e) {
130
+            $this->logger->logException($e, ['app' => 'internet_connection_check']);
131
+            return false;
132
+        }
133
+        return true;
134
+    }
135
+
136
+    /**
137
+     * Checks whether a local memcache is installed or not
138
+     * @return bool
139
+     */
140
+    private function isMemcacheConfigured() {
141
+        return $this->config->getSystemValue('memcache.local', null) !== null;
142
+    }
143
+
144
+    /**
145
+     * Whether /dev/urandom is available to the PHP controller
146
+     *
147
+     * @return bool
148
+     */
149
+    private function isUrandomAvailable() {
150
+        if(@file_exists('/dev/urandom')) {
151
+            $file = fopen('/dev/urandom', 'rb');
152
+            if($file) {
153
+                fclose($file);
154
+                return true;
155
+            }
156
+        }
157
+
158
+        return false;
159
+    }
160
+
161
+    /**
162
+     * Public for the sake of unit-testing
163
+     *
164
+     * @return array
165
+     */
166
+    protected function getCurlVersion() {
167
+        return curl_version();
168
+    }
169
+
170
+    /**
171
+     * Check if the used  SSL lib is outdated. Older OpenSSL and NSS versions do
172
+     * have multiple bugs which likely lead to problems in combination with
173
+     * functionality required by ownCloud such as SNI.
174
+     *
175
+     * @link https://github.com/owncloud/core/issues/17446#issuecomment-122877546
176
+     * @link https://bugzilla.redhat.com/show_bug.cgi?id=1241172
177
+     * @return string
178
+     */
179
+    private function isUsedTlsLibOutdated() {
180
+        // Don't run check when:
181
+        // 1. Server has `has_internet_connection` set to false
182
+        // 2. AppStore AND S2S is disabled
183
+        if(!$this->config->getSystemValue('has_internet_connection', true)) {
184
+            return '';
185
+        }
186
+        if(!$this->config->getSystemValue('appstoreenabled', true)
187
+            && $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no'
188
+            && $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') {
189
+            return '';
190
+        }
191
+
192
+        $versionString = $this->getCurlVersion();
193
+        if(isset($versionString['ssl_version'])) {
194
+            $versionString = $versionString['ssl_version'];
195
+        } else {
196
+            return '';
197
+        }
198
+
199
+        $features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
200
+        if(!$this->config->getSystemValue('appstoreenabled', true)) {
201
+            $features = (string)$this->l10n->t('Federated Cloud Sharing');
202
+        }
203
+
204
+        // Check if at least OpenSSL after 1.01d or 1.0.2b
205
+        if(strpos($versionString, 'OpenSSL/') === 0) {
206
+            $majorVersion = substr($versionString, 8, 5);
207
+            $patchRelease = substr($versionString, 13, 6);
208
+
209
+            if(($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) ||
210
+                ($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) {
211
+                return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['OpenSSL', $versionString, $features]);
212
+            }
213
+        }
214
+
215
+        // Check if NSS and perform heuristic check
216
+        if(strpos($versionString, 'NSS/') === 0) {
217
+            try {
218
+                $firstClient = $this->clientService->newClient();
219
+                $firstClient->get('https://nextcloud.com/');
220
+
221
+                $secondClient = $this->clientService->newClient();
222
+                $secondClient->get('https://nextcloud.com/');
223
+            } catch (ClientException $e) {
224
+                if($e->getResponse()->getStatusCode() === 400) {
225
+                    return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['NSS', $versionString, $features]);
226
+                }
227
+            }
228
+        }
229
+
230
+        return '';
231
+    }
232
+
233
+    /**
234
+     * Whether the version is outdated
235
+     *
236
+     * @return bool
237
+     */
238
+    protected function isPhpOutdated() {
239
+        if (version_compare(PHP_VERSION, '7.0.0', '<')) {
240
+            return true;
241
+        }
242
+
243
+        return false;
244
+    }
245
+
246
+    /**
247
+     * Whether the php version is still supported (at time of release)
248
+     * according to: https://secure.php.net/supported-versions.php
249
+     *
250
+     * @return array
251
+     */
252
+    private function isPhpSupported() {
253
+        return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION];
254
+    }
255
+
256
+    /**
257
+     * Check if the reverse proxy configuration is working as expected
258
+     *
259
+     * @return bool
260
+     */
261
+    private function forwardedForHeadersWorking() {
262
+        $trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
263
+        $remoteAddress = $this->request->getRemoteAddress();
264
+
265
+        if (is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
266
+            return false;
267
+        }
268
+
269
+        // either not enabled or working correctly
270
+        return true;
271
+    }
272
+
273
+    /**
274
+     * Checks if the correct memcache module for PHP is installed. Only
275
+     * fails if memcached is configured and the working module is not installed.
276
+     *
277
+     * @return bool
278
+     */
279
+    private function isCorrectMemcachedPHPModuleInstalled() {
280
+        if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') {
281
+            return true;
282
+        }
283
+
284
+        // there are two different memcached modules for PHP
285
+        // we only support memcached and not memcache
286
+        // https://code.google.com/p/memcached/wiki/PHPClientComparison
287
+        return !(!extension_loaded('memcached') && extension_loaded('memcache'));
288
+    }
289
+
290
+    /**
291
+     * Checks if set_time_limit is not disabled.
292
+     *
293
+     * @return bool
294
+     */
295
+    private function isSettimelimitAvailable() {
296
+        if (function_exists('set_time_limit')
297
+            && strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
298
+            return true;
299
+        }
300
+
301
+        return false;
302
+    }
303
+
304
+    /**
305
+     * @return RedirectResponse
306
+     */
307
+    public function rescanFailedIntegrityCheck() {
308
+        $this->checker->runInstanceVerification();
309
+        return new RedirectResponse(
310
+            $this->urlGenerator->linkToRoute('settings.AdminSettings.index')
311
+        );
312
+    }
313
+
314
+    /**
315
+     * @NoCSRFRequired
316
+     * @return DataResponse
317
+     */
318
+    public function getFailedIntegrityCheckFiles() {
319
+        if(!$this->checker->isCodeCheckEnforced()) {
320
+            return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
321
+        }
322
+
323
+        $completeResults = $this->checker->getResults();
324
+
325
+        if(!empty($completeResults)) {
326
+            $formattedTextResponse = 'Technical information
327 327
 =====================
328 328
 The following list covers which files have failed the integrity check. Please read
329 329
 the previous linked documentation to learn more about the errors and how to fix
@@ -332,126 +332,126 @@  discard block
 block discarded – undo
332 332
 Results
333 333
 =======
334 334
 ';
335
-			foreach($completeResults as $context => $contextResult) {
336
-				$formattedTextResponse .= "- $context\n";
337
-
338
-				foreach($contextResult as $category => $result) {
339
-					$formattedTextResponse .= "\t- $category\n";
340
-					if($category !== 'EXCEPTION') {
341
-						foreach ($result as $key => $results) {
342
-							$formattedTextResponse .= "\t\t- $key\n";
343
-						}
344
-					} else {
345
-						foreach ($result as $key => $results) {
346
-							$formattedTextResponse .= "\t\t- $results\n";
347
-						}
348
-					}
349
-
350
-				}
351
-			}
352
-
353
-			$formattedTextResponse .= '
335
+            foreach($completeResults as $context => $contextResult) {
336
+                $formattedTextResponse .= "- $context\n";
337
+
338
+                foreach($contextResult as $category => $result) {
339
+                    $formattedTextResponse .= "\t- $category\n";
340
+                    if($category !== 'EXCEPTION') {
341
+                        foreach ($result as $key => $results) {
342
+                            $formattedTextResponse .= "\t\t- $key\n";
343
+                        }
344
+                    } else {
345
+                        foreach ($result as $key => $results) {
346
+                            $formattedTextResponse .= "\t\t- $results\n";
347
+                        }
348
+                    }
349
+
350
+                }
351
+            }
352
+
353
+            $formattedTextResponse .= '
354 354
 Raw output
355 355
 ==========
356 356
 ';
357
-			$formattedTextResponse .= print_r($completeResults, true);
358
-		} else {
359
-			$formattedTextResponse = 'No errors have been found.';
360
-		}
361
-
362
-
363
-		$response = new DataDisplayResponse(
364
-			$formattedTextResponse,
365
-			Http::STATUS_OK,
366
-			[
367
-				'Content-Type' => 'text/plain',
368
-			]
369
-		);
370
-
371
-		return $response;
372
-	}
373
-
374
-	/**
375
-	 * Checks whether a PHP opcache is properly set up
376
-	 * @return bool
377
-	 */
378
-	protected function isOpcacheProperlySetup() {
379
-		$iniWrapper = new IniGetWrapper();
380
-
381
-		$isOpcacheProperlySetUp = true;
382
-
383
-		if(!$iniWrapper->getBool('opcache.enable')) {
384
-			$isOpcacheProperlySetUp = false;
385
-		}
386
-
387
-		if(!$iniWrapper->getBool('opcache.save_comments')) {
388
-			$isOpcacheProperlySetUp = false;
389
-		}
390
-
391
-		if(!$iniWrapper->getBool('opcache.enable_cli')) {
392
-			$isOpcacheProperlySetUp = false;
393
-		}
394
-
395
-		if($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) {
396
-			$isOpcacheProperlySetUp = false;
397
-		}
398
-
399
-		if($iniWrapper->getNumeric('opcache.memory_consumption') < 128) {
400
-			$isOpcacheProperlySetUp = false;
401
-		}
402
-
403
-		if($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) {
404
-			$isOpcacheProperlySetUp = false;
405
-		}
406
-
407
-		return $isOpcacheProperlySetUp;
408
-	}
409
-
410
-	/**
411
-	 * Check if the required FreeType functions are present
412
-	 * @return bool
413
-	 */
414
-	protected function hasFreeTypeSupport() {
415
-		return function_exists('imagettfbbox') && function_exists('imagettftext');
416
-	}
417
-
418
-	/**
419
-	 * Check if the required FreeType functions are present
420
-	 * @return bool
421
-	 */
422
-	protected function hasMissingIndexes() {
423
-		$indexInfo = new MissingIndexInformation();
424
-		// Dispatch event so apps can also hint for pending index updates if needed
425
-		$event = new GenericEvent($indexInfo);
426
-		$this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_INDEXES_EVENT, $event);
427
-
428
-		return $indexInfo->getListOfMissingIndexes();
429
-	}
430
-
431
-	/**
432
-	 * @return DataResponse
433
-	 */
434
-	public function check() {
435
-		return new DataResponse(
436
-			[
437
-				'serverHasInternetConnection' => $this->isInternetConnectionWorking(),
438
-				'isMemcacheConfigured' => $this->isMemcacheConfigured(),
439
-				'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'),
440
-				'isUrandomAvailable' => $this->isUrandomAvailable(),
441
-				'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'),
442
-				'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(),
443
-				'phpSupported' => $this->isPhpSupported(),
444
-				'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(),
445
-				'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'),
446
-				'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(),
447
-				'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(),
448
-				'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
449
-				'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
450
-				'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
451
-				'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
452
-				'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),
453
-				'hasMissingIndexes' => $this->hasMissingIndexes(),
454
-			]
455
-		);
456
-	}
357
+            $formattedTextResponse .= print_r($completeResults, true);
358
+        } else {
359
+            $formattedTextResponse = 'No errors have been found.';
360
+        }
361
+
362
+
363
+        $response = new DataDisplayResponse(
364
+            $formattedTextResponse,
365
+            Http::STATUS_OK,
366
+            [
367
+                'Content-Type' => 'text/plain',
368
+            ]
369
+        );
370
+
371
+        return $response;
372
+    }
373
+
374
+    /**
375
+     * Checks whether a PHP opcache is properly set up
376
+     * @return bool
377
+     */
378
+    protected function isOpcacheProperlySetup() {
379
+        $iniWrapper = new IniGetWrapper();
380
+
381
+        $isOpcacheProperlySetUp = true;
382
+
383
+        if(!$iniWrapper->getBool('opcache.enable')) {
384
+            $isOpcacheProperlySetUp = false;
385
+        }
386
+
387
+        if(!$iniWrapper->getBool('opcache.save_comments')) {
388
+            $isOpcacheProperlySetUp = false;
389
+        }
390
+
391
+        if(!$iniWrapper->getBool('opcache.enable_cli')) {
392
+            $isOpcacheProperlySetUp = false;
393
+        }
394
+
395
+        if($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) {
396
+            $isOpcacheProperlySetUp = false;
397
+        }
398
+
399
+        if($iniWrapper->getNumeric('opcache.memory_consumption') < 128) {
400
+            $isOpcacheProperlySetUp = false;
401
+        }
402
+
403
+        if($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) {
404
+            $isOpcacheProperlySetUp = false;
405
+        }
406
+
407
+        return $isOpcacheProperlySetUp;
408
+    }
409
+
410
+    /**
411
+     * Check if the required FreeType functions are present
412
+     * @return bool
413
+     */
414
+    protected function hasFreeTypeSupport() {
415
+        return function_exists('imagettfbbox') && function_exists('imagettftext');
416
+    }
417
+
418
+    /**
419
+     * Check if the required FreeType functions are present
420
+     * @return bool
421
+     */
422
+    protected function hasMissingIndexes() {
423
+        $indexInfo = new MissingIndexInformation();
424
+        // Dispatch event so apps can also hint for pending index updates if needed
425
+        $event = new GenericEvent($indexInfo);
426
+        $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_INDEXES_EVENT, $event);
427
+
428
+        return $indexInfo->getListOfMissingIndexes();
429
+    }
430
+
431
+    /**
432
+     * @return DataResponse
433
+     */
434
+    public function check() {
435
+        return new DataResponse(
436
+            [
437
+                'serverHasInternetConnection' => $this->isInternetConnectionWorking(),
438
+                'isMemcacheConfigured' => $this->isMemcacheConfigured(),
439
+                'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'),
440
+                'isUrandomAvailable' => $this->isUrandomAvailable(),
441
+                'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'),
442
+                'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(),
443
+                'phpSupported' => $this->isPhpSupported(),
444
+                'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(),
445
+                'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'),
446
+                'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(),
447
+                'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(),
448
+                'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
449
+                'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
450
+                'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
451
+                'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
452
+                'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),
453
+                'hasMissingIndexes' => $this->hasMissingIndexes(),
454
+            ]
455
+        );
456
+    }
457 457
 }
Please login to merge, or discard this patch.
lib/private/DB/MissingIndexInformation.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@
 block discarded – undo
24 24
 
25 25
 class MissingIndexInformation {
26 26
 
27
-	private $listOfMissingIndexes = [];
27
+    private $listOfMissingIndexes = [];
28 28
 
29
-	public function addHintForMissingSubject($tableName, $indexName) {
30
-		$this->listOfMissingIndexes[] = [
31
-			'tableName' => $tableName,
32
-			'indexName' => $indexName
33
-		];
34
-	}
29
+    public function addHintForMissingSubject($tableName, $indexName) {
30
+        $this->listOfMissingIndexes[] = [
31
+            'tableName' => $tableName,
32
+            'indexName' => $indexName
33
+        ];
34
+    }
35 35
 
36
-	public function getListOfMissingIndexes() {
37
-		return $this->listOfMissingIndexes;
38
-	}
36
+    public function getListOfMissingIndexes() {
37
+        return $this->listOfMissingIndexes;
38
+    }
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
lib/public/IDBConnection.php 2 patches
Indentation   +209 added lines, -209 removed lines patch added patch discarded remove patch
@@ -46,239 +46,239 @@
 block discarded – undo
46 46
  */
47 47
 interface IDBConnection {
48 48
 
49
-	const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
50
-	const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
49
+    const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
50
+    const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
51 51
 
52
-	/**
53
-	 * Gets the QueryBuilder for the connection.
54
-	 *
55
-	 * @return \OCP\DB\QueryBuilder\IQueryBuilder
56
-	 * @since 8.2.0
57
-	 */
58
-	public function getQueryBuilder();
52
+    /**
53
+     * Gets the QueryBuilder for the connection.
54
+     *
55
+     * @return \OCP\DB\QueryBuilder\IQueryBuilder
56
+     * @since 8.2.0
57
+     */
58
+    public function getQueryBuilder();
59 59
 
60
-	/**
61
-	 * Used to abstract the ownCloud database access away
62
-	 * @param string $sql the sql query with ? placeholder for params
63
-	 * @param int $limit the maximum number of rows
64
-	 * @param int $offset from which row we want to start
65
-	 * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
66
-	 * @since 6.0.0
67
-	 */
68
-	public function prepare($sql, $limit=null, $offset=null);
60
+    /**
61
+     * Used to abstract the ownCloud database access away
62
+     * @param string $sql the sql query with ? placeholder for params
63
+     * @param int $limit the maximum number of rows
64
+     * @param int $offset from which row we want to start
65
+     * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
66
+     * @since 6.0.0
67
+     */
68
+    public function prepare($sql, $limit=null, $offset=null);
69 69
 
70
-	/**
71
-	 * Executes an, optionally parameterized, SQL query.
72
-	 *
73
-	 * If the query is parameterized, a prepared statement is used.
74
-	 * If an SQLLogger is configured, the execution is logged.
75
-	 *
76
-	 * @param string $query The SQL query to execute.
77
-	 * @param string[] $params The parameters to bind to the query, if any.
78
-	 * @param array $types The types the previous parameters are in.
79
-	 * @return \Doctrine\DBAL\Driver\Statement The executed statement.
80
-	 * @since 8.0.0
81
-	 */
82
-	public function executeQuery($query, array $params = array(), $types = array());
70
+    /**
71
+     * Executes an, optionally parameterized, SQL query.
72
+     *
73
+     * If the query is parameterized, a prepared statement is used.
74
+     * If an SQLLogger is configured, the execution is logged.
75
+     *
76
+     * @param string $query The SQL query to execute.
77
+     * @param string[] $params The parameters to bind to the query, if any.
78
+     * @param array $types The types the previous parameters are in.
79
+     * @return \Doctrine\DBAL\Driver\Statement The executed statement.
80
+     * @since 8.0.0
81
+     */
82
+    public function executeQuery($query, array $params = array(), $types = array());
83 83
 
84
-	/**
85
-	 * Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
86
-	 * and returns the number of affected rows.
87
-	 *
88
-	 * This method supports PDO binding types as well as DBAL mapping types.
89
-	 *
90
-	 * @param string $query The SQL query.
91
-	 * @param array $params The query parameters.
92
-	 * @param array $types The parameter types.
93
-	 * @return integer The number of affected rows.
94
-	 * @since 8.0.0
95
-	 */
96
-	public function executeUpdate($query, array $params = array(), array $types = array());
84
+    /**
85
+     * Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
86
+     * and returns the number of affected rows.
87
+     *
88
+     * This method supports PDO binding types as well as DBAL mapping types.
89
+     *
90
+     * @param string $query The SQL query.
91
+     * @param array $params The query parameters.
92
+     * @param array $types The parameter types.
93
+     * @return integer The number of affected rows.
94
+     * @since 8.0.0
95
+     */
96
+    public function executeUpdate($query, array $params = array(), array $types = array());
97 97
 
98
-	/**
99
-	 * Used to get the id of the just inserted element
100
-	 * @param string $table the name of the table where we inserted the item
101
-	 * @return int the id of the inserted element
102
-	 * @since 6.0.0
103
-	 */
104
-	public function lastInsertId($table = null);
98
+    /**
99
+     * Used to get the id of the just inserted element
100
+     * @param string $table the name of the table where we inserted the item
101
+     * @return int the id of the inserted element
102
+     * @since 6.0.0
103
+     */
104
+    public function lastInsertId($table = null);
105 105
 
106
-	/**
107
-	 * Insert a row if the matching row does not exists.
108
-	 *
109
-	 * @param string $table The table name (will replace *PREFIX* with the actual prefix)
110
-	 * @param array $input data that should be inserted into the table  (column name => value)
111
-	 * @param array|null $compare List of values that should be checked for "if not exists"
112
-	 *				If this is null or an empty array, all keys of $input will be compared
113
-	 *				Please note: text fields (clob) must not be used in the compare array
114
-	 * @return int number of inserted rows
115
-	 * @throws \Doctrine\DBAL\DBALException
116
-	 * @since 6.0.0 - parameter $compare was added in 8.1.0, return type changed from boolean in 8.1.0
117
-	 */
118
-	public function insertIfNotExist($table, $input, array $compare = null);
106
+    /**
107
+     * Insert a row if the matching row does not exists.
108
+     *
109
+     * @param string $table The table name (will replace *PREFIX* with the actual prefix)
110
+     * @param array $input data that should be inserted into the table  (column name => value)
111
+     * @param array|null $compare List of values that should be checked for "if not exists"
112
+     *				If this is null or an empty array, all keys of $input will be compared
113
+     *				Please note: text fields (clob) must not be used in the compare array
114
+     * @return int number of inserted rows
115
+     * @throws \Doctrine\DBAL\DBALException
116
+     * @since 6.0.0 - parameter $compare was added in 8.1.0, return type changed from boolean in 8.1.0
117
+     */
118
+    public function insertIfNotExist($table, $input, array $compare = null);
119 119
 
120
-	/**
121
-	 * Insert or update a row value
122
-	 *
123
-	 * @param string $table
124
-	 * @param array $keys (column name => value)
125
-	 * @param array $values (column name => value)
126
-	 * @param array $updatePreconditionValues ensure values match preconditions (column name => value)
127
-	 * @return int number of new rows
128
-	 * @throws \Doctrine\DBAL\DBALException
129
-	 * @throws PreconditionNotMetException
130
-	 * @since 9.0.0
131
-	 */
132
-	public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []);
120
+    /**
121
+     * Insert or update a row value
122
+     *
123
+     * @param string $table
124
+     * @param array $keys (column name => value)
125
+     * @param array $values (column name => value)
126
+     * @param array $updatePreconditionValues ensure values match preconditions (column name => value)
127
+     * @return int number of new rows
128
+     * @throws \Doctrine\DBAL\DBALException
129
+     * @throws PreconditionNotMetException
130
+     * @since 9.0.0
131
+     */
132
+    public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []);
133 133
 
134
-	/**
135
-	 * Create an exclusive read+write lock on a table
136
-	 *
137
-	 * Important Note: Due to the nature how locks work on different DBs, it is
138
-	 * only possible to lock one table at a time. You should also NOT start a
139
-	 * transaction while holding a lock.
140
-	 *
141
-	 * @param string $tableName
142
-	 * @since 9.1.0
143
-	 */
144
-	public function lockTable($tableName);
134
+    /**
135
+     * Create an exclusive read+write lock on a table
136
+     *
137
+     * Important Note: Due to the nature how locks work on different DBs, it is
138
+     * only possible to lock one table at a time. You should also NOT start a
139
+     * transaction while holding a lock.
140
+     *
141
+     * @param string $tableName
142
+     * @since 9.1.0
143
+     */
144
+    public function lockTable($tableName);
145 145
 
146
-	/**
147
-	 * Release a previous acquired lock again
148
-	 *
149
-	 * @since 9.1.0
150
-	 */
151
-	public function unlockTable();
146
+    /**
147
+     * Release a previous acquired lock again
148
+     *
149
+     * @since 9.1.0
150
+     */
151
+    public function unlockTable();
152 152
 
153
-	/**
154
-	 * Start a transaction
155
-	 * @since 6.0.0
156
-	 */
157
-	public function beginTransaction();
153
+    /**
154
+     * Start a transaction
155
+     * @since 6.0.0
156
+     */
157
+    public function beginTransaction();
158 158
 
159
-	/**
160
-	 * Check if a transaction is active
161
-	 *
162
-	 * @return bool
163
-	 * @since 8.2.0
164
-	 */
165
-	public function inTransaction();
159
+    /**
160
+     * Check if a transaction is active
161
+     *
162
+     * @return bool
163
+     * @since 8.2.0
164
+     */
165
+    public function inTransaction();
166 166
 
167
-	/**
168
-	 * Commit the database changes done during a transaction that is in progress
169
-	 * @since 6.0.0
170
-	 */
171
-	public function commit();
167
+    /**
168
+     * Commit the database changes done during a transaction that is in progress
169
+     * @since 6.0.0
170
+     */
171
+    public function commit();
172 172
 
173
-	/**
174
-	 * Rollback the database changes done during a transaction that is in progress
175
-	 * @since 6.0.0
176
-	 */
177
-	public function rollBack();
173
+    /**
174
+     * Rollback the database changes done during a transaction that is in progress
175
+     * @since 6.0.0
176
+     */
177
+    public function rollBack();
178 178
 
179
-	/**
180
-	 * Gets the error code and message as a string for logging
181
-	 * @return string
182
-	 * @since 6.0.0
183
-	 */
184
-	public function getError();
179
+    /**
180
+     * Gets the error code and message as a string for logging
181
+     * @return string
182
+     * @since 6.0.0
183
+     */
184
+    public function getError();
185 185
 
186
-	/**
187
-	 * Fetch the SQLSTATE associated with the last database operation.
188
-	 *
189
-	 * @return integer The last error code.
190
-	 * @since 8.0.0
191
-	 */
192
-	public function errorCode();
186
+    /**
187
+     * Fetch the SQLSTATE associated with the last database operation.
188
+     *
189
+     * @return integer The last error code.
190
+     * @since 8.0.0
191
+     */
192
+    public function errorCode();
193 193
 
194
-	/**
195
-	 * Fetch extended error information associated with the last database operation.
196
-	 *
197
-	 * @return array The last error information.
198
-	 * @since 8.0.0
199
-	 */
200
-	public function errorInfo();
194
+    /**
195
+     * Fetch extended error information associated with the last database operation.
196
+     *
197
+     * @return array The last error information.
198
+     * @since 8.0.0
199
+     */
200
+    public function errorInfo();
201 201
 
202
-	/**
203
-	 * Establishes the connection with the database.
204
-	 *
205
-	 * @return bool
206
-	 * @since 8.0.0
207
-	 */
208
-	public function connect();
202
+    /**
203
+     * Establishes the connection with the database.
204
+     *
205
+     * @return bool
206
+     * @since 8.0.0
207
+     */
208
+    public function connect();
209 209
 
210
-	/**
211
-	 * Close the database connection
212
-	 * @since 8.0.0
213
-	 */
214
-	public function close();
210
+    /**
211
+     * Close the database connection
212
+     * @since 8.0.0
213
+     */
214
+    public function close();
215 215
 
216
-	/**
217
-	 * Quotes a given input parameter.
218
-	 *
219
-	 * @param mixed $input Parameter to be quoted.
220
-	 * @param int $type Type of the parameter.
221
-	 * @return string The quoted parameter.
222
-	 * @since 8.0.0
223
-	 */
224
-	public function quote($input, $type = IQueryBuilder::PARAM_STR);
216
+    /**
217
+     * Quotes a given input parameter.
218
+     *
219
+     * @param mixed $input Parameter to be quoted.
220
+     * @param int $type Type of the parameter.
221
+     * @return string The quoted parameter.
222
+     * @since 8.0.0
223
+     */
224
+    public function quote($input, $type = IQueryBuilder::PARAM_STR);
225 225
 
226
-	/**
227
-	 * Gets the DatabasePlatform instance that provides all the metadata about
228
-	 * the platform this driver connects to.
229
-	 *
230
-	 * @return \Doctrine\DBAL\Platforms\AbstractPlatform The database platform.
231
-	 * @since 8.0.0
232
-	 */
233
-	public function getDatabasePlatform();
226
+    /**
227
+     * Gets the DatabasePlatform instance that provides all the metadata about
228
+     * the platform this driver connects to.
229
+     *
230
+     * @return \Doctrine\DBAL\Platforms\AbstractPlatform The database platform.
231
+     * @since 8.0.0
232
+     */
233
+    public function getDatabasePlatform();
234 234
 
235
-	/**
236
-	 * Drop a table from the database if it exists
237
-	 *
238
-	 * @param string $table table name without the prefix
239
-	 * @since 8.0.0
240
-	 */
241
-	public function dropTable($table);
235
+    /**
236
+     * Drop a table from the database if it exists
237
+     *
238
+     * @param string $table table name without the prefix
239
+     * @since 8.0.0
240
+     */
241
+    public function dropTable($table);
242 242
 
243
-	/**
244
-	 * Check if a table exists
245
-	 *
246
-	 * @param string $table table name without the prefix
247
-	 * @return bool
248
-	 * @since 8.0.0
249
-	 */
250
-	public function tableExists($table);
243
+    /**
244
+     * Check if a table exists
245
+     *
246
+     * @param string $table table name without the prefix
247
+     * @return bool
248
+     * @since 8.0.0
249
+     */
250
+    public function tableExists($table);
251 251
 
252
-	/**
253
-	 * Escape a parameter to be used in a LIKE query
254
-	 *
255
-	 * @param string $param
256
-	 * @return string
257
-	 * @since 9.0.0
258
-	 */
259
-	public function escapeLikeParameter($param);
252
+    /**
253
+     * Escape a parameter to be used in a LIKE query
254
+     *
255
+     * @param string $param
256
+     * @return string
257
+     * @since 9.0.0
258
+     */
259
+    public function escapeLikeParameter($param);
260 260
 
261
-	/**
262
-	 * Check whether or not the current database support 4byte wide unicode
263
-	 *
264
-	 * @return bool
265
-	 * @since 11.0.0
266
-	 */
267
-	public function supports4ByteText();
261
+    /**
262
+     * Check whether or not the current database support 4byte wide unicode
263
+     *
264
+     * @return bool
265
+     * @since 11.0.0
266
+     */
267
+    public function supports4ByteText();
268 268
 
269
-	/**
270
-	 * Create the schema of the connected database
271
-	 *
272
-	 * @return Schema
273
-	 * @since 13.0.0
274
-	 */
275
-	public function createSchema();
269
+    /**
270
+     * Create the schema of the connected database
271
+     *
272
+     * @return Schema
273
+     * @since 13.0.0
274
+     */
275
+    public function createSchema();
276 276
 
277
-	/**
278
-	 * Migrate the database to the given schema
279
-	 *
280
-	 * @param Schema $toSchema
281
-	 * @since 13.0.0
282
-	 */
283
-	public function migrateToSchema(Schema $toSchema);
277
+    /**
278
+     * Migrate the database to the given schema
279
+     *
280
+     * @param Schema $toSchema
281
+     * @since 13.0.0
282
+     */
283
+    public function migrateToSchema(Schema $toSchema);
284 284
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
  */
47 47
 interface IDBConnection {
48 48
 
49
-	const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
50
-	const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
49
+	const ADD_MISSING_INDEXES_EVENT = self::class.'::ADD_MISSING_INDEXES';
50
+	const CHECK_MISSING_INDEXES_EVENT = self::class.'::CHECK_MISSING_INDEXES';
51 51
 
52 52
 	/**
53 53
 	 * Gets the QueryBuilder for the connection.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
66 66
 	 * @since 6.0.0
67 67
 	 */
68
-	public function prepare($sql, $limit=null, $offset=null);
68
+	public function prepare($sql, $limit = null, $offset = null);
69 69
 
70 70
 	/**
71 71
 	 * Executes an, optionally parameterized, SQL query.
Please login to merge, or discard this patch.