Passed
Push — master ( 89cf1c...91ae7f )
by John
14:16 queued 14s
created
apps/systemtags/list.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@
 block discarded – undo
23 23
 // WARNING: this should be moved to proper AppFramework handling
24 24
 // Check if we are a user
25 25
 if (!\OC::$server->getUserSession()->isLoggedIn()) {
26
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
27
-			'core.login.showLoginForm',
28
-			[
29
-				'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
30
-			]
31
-		)
32
-	);
33
-	exit();
26
+    header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
27
+            'core.login.showLoginForm',
28
+            [
29
+                'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
30
+            ]
31
+        )
32
+    );
33
+    exit();
34 34
 }
35 35
 // Redirect to 2FA challenge selection if 2FA challenge was not solved yet
36 36
 if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
37
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
38
-	exit();
37
+    header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
38
+    exit();
39 39
 }
40 40
 
41 41
 $tmpl = new OCP\Template('systemtags', 'list', '');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // WARNING: this should be moved to proper AppFramework handling
24 24
 // Check if we are a user
25 25
 if (!\OC::$server->getUserSession()->isLoggedIn()) {
26
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
26
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute(
27 27
 			'core.login.showLoginForm',
28 28
 			[
29 29
 				'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 }
35 35
 // Redirect to 2FA challenge selection if 2FA challenge was not solved yet
36 36
 if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
37
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
37
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
38 38
 	exit();
39 39
 }
40 40
 
Please login to merge, or discard this patch.
lib/public/Federation/ICloudId.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -30,35 +30,35 @@
 block discarded – undo
30 30
  * @since 12.0.0
31 31
  */
32 32
 interface ICloudId {
33
-	/**
34
-	 * The remote cloud id
35
-	 *
36
-	 * @return string
37
-	 * @since 12.0.0
38
-	 */
39
-	public function getId(): string;
33
+    /**
34
+     * The remote cloud id
35
+     *
36
+     * @return string
37
+     * @since 12.0.0
38
+     */
39
+    public function getId(): string;
40 40
 
41
-	/**
42
-	 * Get a clean representation of the cloud id for display
43
-	 *
44
-	 * @return string
45
-	 * @since 12.0.0
46
-	 */
47
-	public function getDisplayId(): string;
41
+    /**
42
+     * Get a clean representation of the cloud id for display
43
+     *
44
+     * @return string
45
+     * @since 12.0.0
46
+     */
47
+    public function getDisplayId(): string;
48 48
 
49
-	/**
50
-	 * The username on the remote server
51
-	 *
52
-	 * @return string
53
-	 * @since 12.0.0
54
-	 */
55
-	public function getUser(): string;
49
+    /**
50
+     * The username on the remote server
51
+     *
52
+     * @return string
53
+     * @since 12.0.0
54
+     */
55
+    public function getUser(): string;
56 56
 
57
-	/**
58
-	 * The base address of the remote server
59
-	 *
60
-	 * @return string
61
-	 * @since 12.0.0
62
-	 */
63
-	public function getRemote(): string;
57
+    /**
58
+     * The base address of the remote server
59
+     *
60
+     * @return string
61
+     * @since 12.0.0
62
+     */
63
+    public function getRemote(): string;
64 64
 }
Please login to merge, or discard this patch.
lib/public/Federation/ICloudIdManager.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -31,33 +31,33 @@
 block discarded – undo
31 31
  * @since 12.0.0
32 32
  */
33 33
 interface ICloudIdManager {
34
-	/**
35
-	 * @param string $cloudId
36
-	 * @return ICloudId
37
-	 * @throws \InvalidArgumentException
38
-	 *
39
-	 * @since 12.0.0
40
-	 */
41
-	public function resolveCloudId(string $cloudId): ICloudId;
34
+    /**
35
+     * @param string $cloudId
36
+     * @return ICloudId
37
+     * @throws \InvalidArgumentException
38
+     *
39
+     * @since 12.0.0
40
+     */
41
+    public function resolveCloudId(string $cloudId): ICloudId;
42 42
 
43
-	/**
44
-	 * Get the cloud id for a remote user
45
-	 *
46
-	 * @param string $user
47
-	 * @param string $remote
48
-	 * @return ICloudId
49
-	 *
50
-	 * @since 12.0.0
51
-	 */
52
-	public function getCloudId(string $user, string $remote): ICloudId;
43
+    /**
44
+     * Get the cloud id for a remote user
45
+     *
46
+     * @param string $user
47
+     * @param string $remote
48
+     * @return ICloudId
49
+     *
50
+     * @since 12.0.0
51
+     */
52
+    public function getCloudId(string $user, string $remote): ICloudId;
53 53
 
54
-	/**
55
-	 * Check if the input is a correctly formatted cloud id
56
-	 *
57
-	 * @param string $cloudId
58
-	 * @return bool
59
-	 *
60
-	 * @since 12.0.0
61
-	 */
62
-	public function isValidCloudId(string $cloudId): bool;
54
+    /**
55
+     * Check if the input is a correctly formatted cloud id
56
+     *
57
+     * @param string $cloudId
58
+     * @return bool
59
+     *
60
+     * @since 12.0.0
61
+     */
62
+    public function isValidCloudId(string $cloudId): bool;
63 63
 }
Please login to merge, or discard this patch.
lib/public/Http/Client/IClientService.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
  * @since 8.1.0
32 32
  */
33 33
 interface IClientService {
34
-	/**
35
-	 * @return IClient
36
-	 * @since 8.1.0
37
-	 */
38
-	public function newClient(): IClient;
34
+    /**
35
+     * @return IClient
36
+     * @since 8.1.0
37
+     */
38
+    public function newClient(): IClient;
39 39
 }
Please login to merge, or discard this patch.
lib/public/Http/Client/IResponse.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -32,28 +32,28 @@
 block discarded – undo
32 32
  * @since 8.1.0
33 33
  */
34 34
 interface IResponse {
35
-	/**
36
-	 * @return string|resource
37
-	 * @since 8.1.0
38
-	 */
39
-	public function getBody();
35
+    /**
36
+     * @return string|resource
37
+     * @since 8.1.0
38
+     */
39
+    public function getBody();
40 40
 
41
-	/**
42
-	 * @return int
43
-	 * @since 8.1.0
44
-	 */
45
-	public function getStatusCode(): int;
41
+    /**
42
+     * @return int
43
+     * @since 8.1.0
44
+     */
45
+    public function getStatusCode(): int;
46 46
 
47
-	/**
48
-	 * @param string $key
49
-	 * @return string
50
-	 * @since 8.1.0
51
-	 */
52
-	public function getHeader(string $key): string;
47
+    /**
48
+     * @param string $key
49
+     * @return string
50
+     * @since 8.1.0
51
+     */
52
+    public function getHeader(string $key): string;
53 53
 
54
-	/**
55
-	 * @return array
56
-	 * @since 8.1.0
57
-	 */
58
-	public function getHeaders(): array;
54
+    /**
55
+     * @return array
56
+     * @since 8.1.0
57
+     */
58
+    public function getHeaders(): array;
59 59
 }
Please login to merge, or discard this patch.
lib/public/Security/IHasher.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -45,23 +45,23 @@
 block discarded – undo
45 45
  * @since 8.0.0
46 46
  */
47 47
 interface IHasher {
48
-	/**
49
-	 * Hashes a message using PHP's `password_hash` functionality.
50
-	 * Please note that the size of the returned string is not guaranteed
51
-	 * and can be up to 255 characters.
52
-	 *
53
-	 * @param string $message Message to generate hash from
54
-	 * @return string Hash of the message with appended version parameter
55
-	 * @since 8.0.0
56
-	 */
57
-	public function hash(string $message): string;
48
+    /**
49
+     * Hashes a message using PHP's `password_hash` functionality.
50
+     * Please note that the size of the returned string is not guaranteed
51
+     * and can be up to 255 characters.
52
+     *
53
+     * @param string $message Message to generate hash from
54
+     * @return string Hash of the message with appended version parameter
55
+     * @since 8.0.0
56
+     */
57
+    public function hash(string $message): string;
58 58
 
59
-	/**
60
-	 * @param string $message Message to verify
61
-	 * @param string $hash Assumed hash of the message
62
-	 * @param null|string &$newHash Reference will contain the updated hash if necessary. Update the existing hash with this one.
63
-	 * @return bool Whether $hash is a valid hash of $message
64
-	 * @since 8.0.0
65
-	 */
66
-	public function verify(string $message, string $hash, &$newHash = null): bool ;
59
+    /**
60
+     * @param string $message Message to verify
61
+     * @param string $hash Assumed hash of the message
62
+     * @param null|string &$newHash Reference will contain the updated hash if necessary. Update the existing hash with this one.
63
+     * @return bool Whether $hash is a valid hash of $message
64
+     * @since 8.0.0
65
+     */
66
+    public function verify(string $message, string $hash, &$newHash = null): bool ;
67 67
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,5 +63,5 @@
 block discarded – undo
63 63
 	 * @return bool Whether $hash is a valid hash of $message
64 64
 	 * @since 8.0.0
65 65
 	 */
66
-	public function verify(string $message, string $hash, &$newHash = null): bool ;
66
+	public function verify(string $message, string $hash, &$newHash = null): bool;
67 67
 }
Please login to merge, or discard this patch.
lib/private/Memcache/Factory.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return IMemcache
134 134
 	 */
135 135
 	public function createLocking(string $prefix = ''): IMemcache {
136
-		return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix);
136
+		return new $this->lockingCacheClass($this->globalPrefix.'/'.$prefix);
137 137
 	}
138 138
 
139 139
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return ICache
144 144
 	 */
145 145
 	public function createDistributed(string $prefix = ''): ICache {
146
-		return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
146
+		return new $this->distributedCacheClass($this->globalPrefix.'/'.$prefix);
147 147
 	}
148 148
 
149 149
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @return ICache
154 154
 	 */
155 155
 	public function createLocal(string $prefix = ''): ICache {
156
-		return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
156
+		return new $this->localCacheClass($this->globalPrefix.'/'.$prefix);
157 157
 	}
158 158
 
159 159
 	/**
Please login to merge, or discard this patch.
Indentation   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -37,148 +37,148 @@
 block discarded – undo
37 37
 use OCP\IMemcache;
38 38
 
39 39
 class Factory implements ICacheFactory {
40
-	public const NULL_CACHE = NullCache::class;
41
-
42
-	/**
43
-	 * @var string $globalPrefix
44
-	 */
45
-	private $globalPrefix;
46
-
47
-	/**
48
-	 * @var ILogger $logger
49
-	 */
50
-	private $logger;
51
-
52
-	/**
53
-	 * @var string $localCacheClass
54
-	 */
55
-	private $localCacheClass;
56
-
57
-	/**
58
-	 * @var string $distributedCacheClass
59
-	 */
60
-	private $distributedCacheClass;
61
-
62
-	/**
63
-	 * @var string $lockingCacheClass
64
-	 */
65
-	private $lockingCacheClass;
66
-
67
-	/**
68
-	 * @param string $globalPrefix
69
-	 * @param ILogger $logger
70
-	 * @param string|null $localCacheClass
71
-	 * @param string|null $distributedCacheClass
72
-	 * @param string|null $lockingCacheClass
73
-	 */
74
-	public function __construct(string $globalPrefix, ILogger $logger,
75
-		$localCacheClass = null, $distributedCacheClass = null, $lockingCacheClass = null) {
76
-		$this->logger = $logger;
77
-		$this->globalPrefix = $globalPrefix;
78
-
79
-		if (!$localCacheClass) {
80
-			$localCacheClass = self::NULL_CACHE;
81
-		}
82
-		if (!$distributedCacheClass) {
83
-			$distributedCacheClass = $localCacheClass;
84
-		}
85
-
86
-		$missingCacheMessage = 'Memcache {class} not available for {use} cache';
87
-		$missingCacheHint = 'Is the matching PHP module installed and enabled?';
88
-		if (!class_exists($localCacheClass) || !$localCacheClass::isAvailable()) {
89
-			if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
90
-				// CLI should not hard-fail on broken memcache
91
-				$this->logger->info($missingCacheMessage, [
92
-					'class' => $localCacheClass,
93
-					'use' => 'local',
94
-					'app' => 'cli'
95
-				]);
96
-				$localCacheClass = self::NULL_CACHE;
97
-			} else {
98
-				throw new \OC\HintException(strtr($missingCacheMessage, [
99
-					'{class}' => $localCacheClass, '{use}' => 'local'
100
-				]), $missingCacheHint);
101
-			}
102
-		}
103
-		if (!class_exists($distributedCacheClass) || !$distributedCacheClass::isAvailable()) {
104
-			if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
105
-				// CLI should not hard-fail on broken memcache
106
-				$this->logger->info($missingCacheMessage, [
107
-					'class' => $distributedCacheClass,
108
-					'use' => 'distributed',
109
-					'app' => 'cli'
110
-				]);
111
-				$distributedCacheClass = self::NULL_CACHE;
112
-			} else {
113
-				throw new \OC\HintException(strtr($missingCacheMessage, [
114
-					'{class}' => $distributedCacheClass, '{use}' => 'distributed'
115
-				]), $missingCacheHint);
116
-			}
117
-		}
118
-		if (!($lockingCacheClass && class_exists($distributedCacheClass) && $lockingCacheClass::isAvailable())) {
119
-			// don't fallback since the fallback might not be suitable for storing lock
120
-			$lockingCacheClass = self::NULL_CACHE;
121
-		}
122
-
123
-		$this->localCacheClass = $localCacheClass;
124
-		$this->distributedCacheClass = $distributedCacheClass;
125
-		$this->lockingCacheClass = $lockingCacheClass;
126
-	}
127
-
128
-	/**
129
-	 * create a cache instance for storing locks
130
-	 *
131
-	 * @param string $prefix
132
-	 * @return IMemcache
133
-	 */
134
-	public function createLocking(string $prefix = ''): IMemcache {
135
-		return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix);
136
-	}
137
-
138
-	/**
139
-	 * create a distributed cache instance
140
-	 *
141
-	 * @param string $prefix
142
-	 * @return ICache
143
-	 */
144
-	public function createDistributed(string $prefix = ''): ICache {
145
-		return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
146
-	}
147
-
148
-	/**
149
-	 * create a local cache instance
150
-	 *
151
-	 * @param string $prefix
152
-	 * @return ICache
153
-	 */
154
-	public function createLocal(string $prefix = ''): ICache {
155
-		return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
156
-	}
157
-
158
-	/**
159
-	 * check memcache availability
160
-	 *
161
-	 * @return bool
162
-	 */
163
-	public function isAvailable(): bool {
164
-		return ($this->distributedCacheClass !== self::NULL_CACHE);
165
-	}
166
-
167
-	/**
168
-	 * @see \OC\Memcache\Factory::createLocal()
169
-	 * @param string $prefix
170
-	 * @return ICache
171
-	 */
172
-	public function createLowLatency(string $prefix = ''): ICache {
173
-		return $this->createLocal($prefix);
174
-	}
175
-
176
-	/**
177
-	 * Check if a local memory cache backend is available
178
-	 *
179
-	 * @return bool
180
-	 */
181
-	public function isLocalCacheAvailable(): bool {
182
-		return ($this->localCacheClass !== self::NULL_CACHE);
183
-	}
40
+    public const NULL_CACHE = NullCache::class;
41
+
42
+    /**
43
+     * @var string $globalPrefix
44
+     */
45
+    private $globalPrefix;
46
+
47
+    /**
48
+     * @var ILogger $logger
49
+     */
50
+    private $logger;
51
+
52
+    /**
53
+     * @var string $localCacheClass
54
+     */
55
+    private $localCacheClass;
56
+
57
+    /**
58
+     * @var string $distributedCacheClass
59
+     */
60
+    private $distributedCacheClass;
61
+
62
+    /**
63
+     * @var string $lockingCacheClass
64
+     */
65
+    private $lockingCacheClass;
66
+
67
+    /**
68
+     * @param string $globalPrefix
69
+     * @param ILogger $logger
70
+     * @param string|null $localCacheClass
71
+     * @param string|null $distributedCacheClass
72
+     * @param string|null $lockingCacheClass
73
+     */
74
+    public function __construct(string $globalPrefix, ILogger $logger,
75
+        $localCacheClass = null, $distributedCacheClass = null, $lockingCacheClass = null) {
76
+        $this->logger = $logger;
77
+        $this->globalPrefix = $globalPrefix;
78
+
79
+        if (!$localCacheClass) {
80
+            $localCacheClass = self::NULL_CACHE;
81
+        }
82
+        if (!$distributedCacheClass) {
83
+            $distributedCacheClass = $localCacheClass;
84
+        }
85
+
86
+        $missingCacheMessage = 'Memcache {class} not available for {use} cache';
87
+        $missingCacheHint = 'Is the matching PHP module installed and enabled?';
88
+        if (!class_exists($localCacheClass) || !$localCacheClass::isAvailable()) {
89
+            if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
90
+                // CLI should not hard-fail on broken memcache
91
+                $this->logger->info($missingCacheMessage, [
92
+                    'class' => $localCacheClass,
93
+                    'use' => 'local',
94
+                    'app' => 'cli'
95
+                ]);
96
+                $localCacheClass = self::NULL_CACHE;
97
+            } else {
98
+                throw new \OC\HintException(strtr($missingCacheMessage, [
99
+                    '{class}' => $localCacheClass, '{use}' => 'local'
100
+                ]), $missingCacheHint);
101
+            }
102
+        }
103
+        if (!class_exists($distributedCacheClass) || !$distributedCacheClass::isAvailable()) {
104
+            if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
105
+                // CLI should not hard-fail on broken memcache
106
+                $this->logger->info($missingCacheMessage, [
107
+                    'class' => $distributedCacheClass,
108
+                    'use' => 'distributed',
109
+                    'app' => 'cli'
110
+                ]);
111
+                $distributedCacheClass = self::NULL_CACHE;
112
+            } else {
113
+                throw new \OC\HintException(strtr($missingCacheMessage, [
114
+                    '{class}' => $distributedCacheClass, '{use}' => 'distributed'
115
+                ]), $missingCacheHint);
116
+            }
117
+        }
118
+        if (!($lockingCacheClass && class_exists($distributedCacheClass) && $lockingCacheClass::isAvailable())) {
119
+            // don't fallback since the fallback might not be suitable for storing lock
120
+            $lockingCacheClass = self::NULL_CACHE;
121
+        }
122
+
123
+        $this->localCacheClass = $localCacheClass;
124
+        $this->distributedCacheClass = $distributedCacheClass;
125
+        $this->lockingCacheClass = $lockingCacheClass;
126
+    }
127
+
128
+    /**
129
+     * create a cache instance for storing locks
130
+     *
131
+     * @param string $prefix
132
+     * @return IMemcache
133
+     */
134
+    public function createLocking(string $prefix = ''): IMemcache {
135
+        return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix);
136
+    }
137
+
138
+    /**
139
+     * create a distributed cache instance
140
+     *
141
+     * @param string $prefix
142
+     * @return ICache
143
+     */
144
+    public function createDistributed(string $prefix = ''): ICache {
145
+        return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
146
+    }
147
+
148
+    /**
149
+     * create a local cache instance
150
+     *
151
+     * @param string $prefix
152
+     * @return ICache
153
+     */
154
+    public function createLocal(string $prefix = ''): ICache {
155
+        return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
156
+    }
157
+
158
+    /**
159
+     * check memcache availability
160
+     *
161
+     * @return bool
162
+     */
163
+    public function isAvailable(): bool {
164
+        return ($this->distributedCacheClass !== self::NULL_CACHE);
165
+    }
166
+
167
+    /**
168
+     * @see \OC\Memcache\Factory::createLocal()
169
+     * @param string $prefix
170
+     * @return ICache
171
+     */
172
+    public function createLowLatency(string $prefix = ''): ICache {
173
+        return $this->createLocal($prefix);
174
+    }
175
+
176
+    /**
177
+     * Check if a local memory cache backend is available
178
+     *
179
+     * @return bool
180
+     */
181
+    public function isLocalCacheAvailable(): bool {
182
+        return ($this->localCacheClass !== self::NULL_CACHE);
183
+    }
184 184
 }
Please login to merge, or discard this patch.
core/Migrations/Version13000Date20170814074715.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -29,50 +29,50 @@
 block discarded – undo
29 29
 
30 30
 class Version13000Date20170814074715 extends SimpleMigrationStep {
31 31
 
32
-	/**
33
-	 * @param IOutput $output
34
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
35
-	 * @param array $options
36
-	 * @since 13.0.0
37
-	 */
38
-	public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
39
-	}
32
+    /**
33
+     * @param IOutput $output
34
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
35
+     * @param array $options
36
+     * @since 13.0.0
37
+     */
38
+    public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
39
+    }
40 40
 
41
-	/**
42
-	 * @param IOutput $output
43
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
44
-	 * @param array $options
45
-	 * @return null|ISchemaWrapper
46
-	 * @since 13.0.0
47
-	 */
48
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
49
-		/** @var ISchemaWrapper $schema */
50
-		$schema = $schemaClosure();
41
+    /**
42
+     * @param IOutput $output
43
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
44
+     * @param array $options
45
+     * @return null|ISchemaWrapper
46
+     * @since 13.0.0
47
+     */
48
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
49
+        /** @var ISchemaWrapper $schema */
50
+        $schema = $schemaClosure();
51 51
 
52 52
 
53
-		if (!$schema->hasTable('accounts')) {
54
-			$table = $schema->createTable('accounts');
55
-			$table->addColumn('uid', 'string', [
56
-				'notnull' => true,
57
-				'length' => 64,
58
-				'default' => '',
59
-			]);
60
-			$table->addColumn('data', 'text', [
61
-				'notnull' => true,
62
-				'default' => '',
63
-			]);
64
-			$table->setPrimaryKey(['uid']);
65
-		}
53
+        if (!$schema->hasTable('accounts')) {
54
+            $table = $schema->createTable('accounts');
55
+            $table->addColumn('uid', 'string', [
56
+                'notnull' => true,
57
+                'length' => 64,
58
+                'default' => '',
59
+            ]);
60
+            $table->addColumn('data', 'text', [
61
+                'notnull' => true,
62
+                'default' => '',
63
+            ]);
64
+            $table->setPrimaryKey(['uid']);
65
+        }
66 66
 
67
-		return $schema;
68
-	}
67
+        return $schema;
68
+    }
69 69
 
70
-	/**
71
-	 * @param IOutput $output
72
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
73
-	 * @param array $options
74
-	 * @since 13.0.0
75
-	 */
76
-	public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
77
-	}
70
+    /**
71
+     * @param IOutput $output
72
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
73
+     * @param array $options
74
+     * @since 13.0.0
75
+     */
76
+    public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
77
+    }
78 78
 }
Please login to merge, or discard this patch.
apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -31,75 +31,75 @@
 block discarded – undo
31 31
 
32 32
 class Version1002Date20170607113030 extends SimpleMigrationStep {
33 33
 
34
-	/** @var IDBConnection */
35
-	protected $connection;
34
+    /** @var IDBConnection */
35
+    protected $connection;
36 36
 
37
-	/**
38
-	 * @param IDBConnection $connection
39
-	 */
40
-	public function __construct(IDBConnection $connection) {
41
-		$this->connection = $connection;
42
-	}
37
+    /**
38
+     * @param IDBConnection $connection
39
+     */
40
+    public function __construct(IDBConnection $connection) {
41
+        $this->connection = $connection;
42
+    }
43 43
 
44
-	/**
45
-	 * @param IOutput $output
46
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
47
-	 * @param array $options
48
-	 * @since 13.0.0
49
-	 */
50
-	public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
51
-		/** @var ISchemaWrapper $schema */
52
-		$schema = $schemaClosure();
44
+    /**
45
+     * @param IOutput $output
46
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
47
+     * @param array $options
48
+     * @since 13.0.0
49
+     */
50
+    public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
51
+        /** @var ISchemaWrapper $schema */
52
+        $schema = $schemaClosure();
53 53
 
54
-		if (!$schema->hasTable('twofactor_backup_codes')) {
55
-			// Legacy table does not exist
56
-			return;
57
-		}
54
+        if (!$schema->hasTable('twofactor_backup_codes')) {
55
+            // Legacy table does not exist
56
+            return;
57
+        }
58 58
 
59
-		$insert = $this->connection->getQueryBuilder();
60
-		$insert->insert('twofactor_backupcodes')
61
-			->values([
62
-				// Inserting with id might fail: 'id' => $insert->createParameter('id'),
63
-				'user_id' => $insert->createParameter('user_id'),
64
-				'code' => $insert->createParameter('code'),
65
-				'used' => $insert->createParameter('used'),
66
-			]);
59
+        $insert = $this->connection->getQueryBuilder();
60
+        $insert->insert('twofactor_backupcodes')
61
+            ->values([
62
+                // Inserting with id might fail: 'id' => $insert->createParameter('id'),
63
+                'user_id' => $insert->createParameter('user_id'),
64
+                'code' => $insert->createParameter('code'),
65
+                'used' => $insert->createParameter('used'),
66
+            ]);
67 67
 
68
-		$query = $this->connection->getQueryBuilder();
69
-		$query->select('*')
70
-			->from('twofactor_backup_codes')
71
-			->orderBy('id', 'ASC');
72
-		$result = $query->execute();
68
+        $query = $this->connection->getQueryBuilder();
69
+        $query->select('*')
70
+            ->from('twofactor_backup_codes')
71
+            ->orderBy('id', 'ASC');
72
+        $result = $query->execute();
73 73
 
74
-		$output->startProgress();
75
-		while ($row = $result->fetch()) {
76
-			$output->advance();
74
+        $output->startProgress();
75
+        while ($row = $result->fetch()) {
76
+            $output->advance();
77 77
 
78
-			$insert
79
-				// Inserting with id might fail: ->setParameter('id', $row['id'], IQueryBuilder::PARAM_INT)
80
-				->setParameter('user_id', $row['user_id'], IQueryBuilder::PARAM_STR)
81
-				->setParameter('code', $row['code'], IQueryBuilder::PARAM_STR)
82
-				->setParameter('used', $row['used'], IQueryBuilder::PARAM_INT)
83
-				->execute();
84
-		}
85
-		$output->finishProgress();
86
-	}
78
+            $insert
79
+                // Inserting with id might fail: ->setParameter('id', $row['id'], IQueryBuilder::PARAM_INT)
80
+                ->setParameter('user_id', $row['user_id'], IQueryBuilder::PARAM_STR)
81
+                ->setParameter('code', $row['code'], IQueryBuilder::PARAM_STR)
82
+                ->setParameter('used', $row['used'], IQueryBuilder::PARAM_INT)
83
+                ->execute();
84
+        }
85
+        $output->finishProgress();
86
+    }
87 87
 
88
-	/**
89
-	 * @param IOutput $output
90
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
91
-	 * @param array $options
92
-	 * @return null|ISchemaWrapper
93
-	 * @since 13.0.0
94
-	 */
95
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
96
-		/** @var ISchemaWrapper $schema */
97
-		$schema = $schemaClosure();
88
+    /**
89
+     * @param IOutput $output
90
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
91
+     * @param array $options
92
+     * @return null|ISchemaWrapper
93
+     * @since 13.0.0
94
+     */
95
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
96
+        /** @var ISchemaWrapper $schema */
97
+        $schema = $schemaClosure();
98 98
 
99
-		if ($schema->hasTable('twofactor_backup_codes')) {
100
-			$schema->dropTable('twofactor_backup_codes');
101
-			return $schema;
102
-		}
103
-		return null;
104
-	}
99
+        if ($schema->hasTable('twofactor_backup_codes')) {
100
+            $schema->dropTable('twofactor_backup_codes');
101
+            return $schema;
102
+        }
103
+        return null;
104
+    }
105 105
 }
Please login to merge, or discard this patch.