Passed
Push — master ( c6645c...a05176 )
by John
17:56 queued 13s
created
apps/comments/composer/composer/ClassLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.
apps/provisioning_api/composer/composer/ClassLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.
apps/federatedfilesharing/composer/composer/ClassLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.
apps/files/composer/composer/ClassLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.
apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@
 block discarded – undo
30 30
 
31 31
 class CheckBackupCodes implements IRepairStep {
32 32
 
33
-	/** @var IJobList */
34
-	private $jobList;
33
+    /** @var IJobList */
34
+    private $jobList;
35 35
 
36
-	public function __construct(IJobList $jobList) {
37
-		$this->jobList = $jobList;
38
-	}
36
+    public function __construct(IJobList $jobList) {
37
+        $this->jobList = $jobList;
38
+    }
39 39
 
40
-	public function getName(): string {
41
-		return 'Add background job to check for backup codes';
42
-	}
40
+    public function getName(): string {
41
+        return 'Add background job to check for backup codes';
42
+    }
43 43
 
44
-	public function run(IOutput $output) {
45
-		$this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
46
-	}
44
+    public function run(IOutput $output) {
45
+        $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
46
+    }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
lib/private/Setup/Sqlite.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
 	public function setupDatabase($username) {
65 65
 		$datadir = $this->config->getValue(
66 66
 			'datadirectory',
67
-			\OC::$SERVERROOT . '/data'
67
+			\OC::$SERVERROOT.'/data'
68 68
 		);
69 69
 
70
-		$sqliteFile = $datadir . '/' . $this->dbName . 'db';
70
+		$sqliteFile = $datadir.'/'.$this->dbName.'db';
71 71
 		if (file_exists($sqliteFile)) {
72 72
 			unlink($sqliteFile);
73 73
 		}
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
 use OC\DB\ConnectionFactory;
27 27
 
28 28
 class Sqlite extends AbstractDatabase {
29
-	public $dbprettyname = 'Sqlite';
29
+    public $dbprettyname = 'Sqlite';
30 30
 
31
-	public function validate($config) {
32
-		return [];
33
-	}
31
+    public function validate($config) {
32
+        return [];
33
+    }
34 34
 
35
-	public function initialize($config) {
36
-		/*
35
+    public function initialize($config) {
36
+        /*
37 37
 		 * Web: When using web based installer its not possible to set dbname
38 38
 		 * or dbtableprefix. Defaults used from ConnectionFactory and dbtype = 'sqlite'
39 39
 		 * is written to config.php.
@@ -44,32 +44,32 @@  discard block
 block discarded – undo
44 44
 		 * in connection factory configuration is obtained from config.php.
45 45
 		 */
46 46
 
47
-		$this->dbName = empty($config['dbname'])
48
-			? ConnectionFactory::DEFAULT_DBNAME
49
-			: $config['dbname'];
47
+        $this->dbName = empty($config['dbname'])
48
+            ? ConnectionFactory::DEFAULT_DBNAME
49
+            : $config['dbname'];
50 50
 
51
-		$this->tablePrefix = empty($config['dbtableprefix'])
52
-			? ConnectionFactory::DEFAULT_DBTABLEPREFIX
53
-			: $config['dbtableprefix'];
51
+        $this->tablePrefix = empty($config['dbtableprefix'])
52
+            ? ConnectionFactory::DEFAULT_DBTABLEPREFIX
53
+            : $config['dbtableprefix'];
54 54
 
55
-		if ($this->dbName !== ConnectionFactory::DEFAULT_DBNAME) {
56
-			$this->config->setValue('dbname', $this->dbName);
57
-		}
55
+        if ($this->dbName !== ConnectionFactory::DEFAULT_DBNAME) {
56
+            $this->config->setValue('dbname', $this->dbName);
57
+        }
58 58
 
59
-		if ($this->tablePrefix !== ConnectionFactory::DEFAULT_DBTABLEPREFIX) {
60
-			$this->config->setValue('dbtableprefix', $this->tablePrefix);
61
-		}
62
-	}
59
+        if ($this->tablePrefix !== ConnectionFactory::DEFAULT_DBTABLEPREFIX) {
60
+            $this->config->setValue('dbtableprefix', $this->tablePrefix);
61
+        }
62
+    }
63 63
 
64
-	public function setupDatabase($username) {
65
-		$datadir = $this->config->getValue(
66
-			'datadirectory',
67
-			\OC::$SERVERROOT . '/data'
68
-		);
64
+    public function setupDatabase($username) {
65
+        $datadir = $this->config->getValue(
66
+            'datadirectory',
67
+            \OC::$SERVERROOT . '/data'
68
+        );
69 69
 
70
-		$sqliteFile = $datadir . '/' . $this->dbName . 'db';
71
-		if (file_exists($sqliteFile)) {
72
-			unlink($sqliteFile);
73
-		}
74
-	}
70
+        $sqliteFile = $datadir . '/' . $this->dbName . 'db';
71
+        if (file_exists($sqliteFile)) {
72
+            unlink($sqliteFile);
73
+        }
74
+    }
75 75
 }
Please login to merge, or discard this patch.
lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 */
43 43
 	public function __construct($newProviderId, $existingProviderName) {
44 44
 		$l = \OC::$server->getL10N('federation');
45
-		$message = 'ID "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"';
45
+		$message = 'ID "'.$newProviderId.'" already used by cloud federation provider "'.$existingProviderName.'"';
46 46
 		$hint = $l->t('ID "%1$s" already used by cloud federation provider "%2$s"', [$newProviderId, $existingProviderName]);
47 47
 		parent::__construct($message, $hint);
48 48
 	}
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -33,18 +33,18 @@
 block discarded – undo
33 33
  * @since 14.0.0
34 34
  */
35 35
 class ProviderAlreadyExistsException extends HintException {
36
-	/**
37
-	 * ProviderAlreadyExistsException constructor.
38
-	 *
39
-	 * @since 14.0.0
40
-	 *
41
-	 * @param string $newProviderId cloud federation provider ID of the new provider
42
-	 * @param string $existingProviderName name of cloud federation provider which already use the same ID
43
-	 */
44
-	public function __construct($newProviderId, $existingProviderName) {
45
-		$l = \OC::$server->getL10N('federation');
46
-		$message = 'ID "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"';
47
-		$hint = $l->t('ID "%1$s" already used by cloud federation provider "%2$s"', [$newProviderId, $existingProviderName]);
48
-		parent::__construct($message, $hint);
49
-	}
36
+    /**
37
+     * ProviderAlreadyExistsException constructor.
38
+     *
39
+     * @since 14.0.0
40
+     *
41
+     * @param string $newProviderId cloud federation provider ID of the new provider
42
+     * @param string $existingProviderName name of cloud federation provider which already use the same ID
43
+     */
44
+    public function __construct($newProviderId, $existingProviderName) {
45
+        $l = \OC::$server->getL10N('federation');
46
+        $message = 'ID "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"';
47
+        $hint = $l->t('ID "%1$s" already used by cloud federation provider "%2$s"', [$newProviderId, $existingProviderName]);
48
+        parent::__construct($message, $hint);
49
+    }
50 50
 }
Please login to merge, or discard this patch.
core/templates/untrustedDomain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 	</p>
9 9
 	<br />
10 10
 	<p>
11
-		<?php print_unescaped($l->t('Further information how to configure this can be found in the %1$sdocumentation%2$s.', ['<a href="' . $_['docUrl'] . '" target="blank">', '</a>'])); ?>
11
+		<?php print_unescaped($l->t('Further information how to configure this can be found in the %1$sdocumentation%2$s.', ['<a href="'.$_['docUrl'].'" target="blank">', '</a>'])); ?>
12 12
 	</p>
13 13
 </div>
Please login to merge, or discard this patch.
core/Command/TwoFactorAuth/Enforce.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,10 +98,10 @@
 block discarded – undo
98 98
 		if (empty($state->getEnforcedGroups())) {
99 99
 			$message = 'Two-factor authentication is enforced for all users';
100 100
 		} else {
101
-			$message = 'Two-factor authentication is enforced for members of the group(s) ' . implode(', ', $state->getEnforcedGroups());
101
+			$message = 'Two-factor authentication is enforced for members of the group(s) '.implode(', ', $state->getEnforcedGroups());
102 102
 		}
103 103
 		if (!empty($state->getExcludedGroups())) {
104
-			$message .= ', except members of ' . implode(', ', $state->getExcludedGroups());
104
+			$message .= ', except members of '.implode(', ', $state->getExcludedGroups());
105 105
 		}
106 106
 		$output->writeln($message);
107 107
 	}
Please login to merge, or discard this patch.
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -35,74 +35,74 @@
 block discarded – undo
35 35
 use Symfony\Component\Console\Output\OutputInterface;
36 36
 
37 37
 class Enforce extends Command {
38
-	private MandatoryTwoFactor $mandatoryTwoFactor;
38
+    private MandatoryTwoFactor $mandatoryTwoFactor;
39 39
 
40
-	public function __construct(MandatoryTwoFactor $mandatoryTwoFactor) {
41
-		parent::__construct();
40
+    public function __construct(MandatoryTwoFactor $mandatoryTwoFactor) {
41
+        parent::__construct();
42 42
 
43
-		$this->mandatoryTwoFactor = $mandatoryTwoFactor;
44
-	}
43
+        $this->mandatoryTwoFactor = $mandatoryTwoFactor;
44
+    }
45 45
 
46
-	protected function configure() {
47
-		$this->setName('twofactorauth:enforce');
48
-		$this->setDescription('Enabled/disable enforced two-factor authentication');
49
-		$this->addOption(
50
-			'on',
51
-			null,
52
-			InputOption::VALUE_NONE,
53
-			'enforce two-factor authentication'
54
-		);
55
-		$this->addOption(
56
-			'off',
57
-			null,
58
-			InputOption::VALUE_NONE,
59
-			'don\'t enforce two-factor authenticaton'
60
-		);
61
-		$this->addOption(
62
-			'group',
63
-			null,
64
-			InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
65
-			'enforce only for the given group(s)'
66
-		);
67
-		$this->addOption(
68
-			'exclude',
69
-			null,
70
-			InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
71
-			'exclude mandatory two-factor auth for the given group(s)'
72
-		);
73
-	}
46
+    protected function configure() {
47
+        $this->setName('twofactorauth:enforce');
48
+        $this->setDescription('Enabled/disable enforced two-factor authentication');
49
+        $this->addOption(
50
+            'on',
51
+            null,
52
+            InputOption::VALUE_NONE,
53
+            'enforce two-factor authentication'
54
+        );
55
+        $this->addOption(
56
+            'off',
57
+            null,
58
+            InputOption::VALUE_NONE,
59
+            'don\'t enforce two-factor authenticaton'
60
+        );
61
+        $this->addOption(
62
+            'group',
63
+            null,
64
+            InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
65
+            'enforce only for the given group(s)'
66
+        );
67
+        $this->addOption(
68
+            'exclude',
69
+            null,
70
+            InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
71
+            'exclude mandatory two-factor auth for the given group(s)'
72
+        );
73
+    }
74 74
 
75
-	protected function execute(InputInterface $input, OutputInterface $output): int {
76
-		if ($input->getOption('on')) {
77
-			$enforcedGroups = $input->getOption('group');
78
-			$excludedGroups = $input->getOption('exclude');
79
-			$this->mandatoryTwoFactor->setState(new EnforcementState(true, $enforcedGroups, $excludedGroups));
80
-		} elseif ($input->getOption('off')) {
81
-			$this->mandatoryTwoFactor->setState(new EnforcementState(false));
82
-		}
75
+    protected function execute(InputInterface $input, OutputInterface $output): int {
76
+        if ($input->getOption('on')) {
77
+            $enforcedGroups = $input->getOption('group');
78
+            $excludedGroups = $input->getOption('exclude');
79
+            $this->mandatoryTwoFactor->setState(new EnforcementState(true, $enforcedGroups, $excludedGroups));
80
+        } elseif ($input->getOption('off')) {
81
+            $this->mandatoryTwoFactor->setState(new EnforcementState(false));
82
+        }
83 83
 
84
-		$state = $this->mandatoryTwoFactor->getState();
85
-		if ($state->isEnforced()) {
86
-			$this->writeEnforced($output, $state);
87
-		} else {
88
-			$this->writeNotEnforced($output);
89
-		}
90
-		return 0;
91
-	}
84
+        $state = $this->mandatoryTwoFactor->getState();
85
+        if ($state->isEnforced()) {
86
+            $this->writeEnforced($output, $state);
87
+        } else {
88
+            $this->writeNotEnforced($output);
89
+        }
90
+        return 0;
91
+    }
92 92
 
93
-	protected function writeEnforced(OutputInterface $output, EnforcementState $state) {
94
-		if (empty($state->getEnforcedGroups())) {
95
-			$message = 'Two-factor authentication is enforced for all users';
96
-		} else {
97
-			$message = 'Two-factor authentication is enforced for members of the group(s) ' . implode(', ', $state->getEnforcedGroups());
98
-		}
99
-		if (!empty($state->getExcludedGroups())) {
100
-			$message .= ', except members of ' . implode(', ', $state->getExcludedGroups());
101
-		}
102
-		$output->writeln($message);
103
-	}
93
+    protected function writeEnforced(OutputInterface $output, EnforcementState $state) {
94
+        if (empty($state->getEnforcedGroups())) {
95
+            $message = 'Two-factor authentication is enforced for all users';
96
+        } else {
97
+            $message = 'Two-factor authentication is enforced for members of the group(s) ' . implode(', ', $state->getEnforcedGroups());
98
+        }
99
+        if (!empty($state->getExcludedGroups())) {
100
+            $message .= ', except members of ' . implode(', ', $state->getExcludedGroups());
101
+        }
102
+        $output->writeln($message);
103
+    }
104 104
 
105
-	protected function writeNotEnforced(OutputInterface $output) {
106
-		$output->writeln('Two-factor authentication is not enforced');
107
-	}
105
+    protected function writeNotEnforced(OutputInterface $output) {
106
+        $output->writeln('Two-factor authentication is not enforced');
107
+    }
108 108
 }
Please login to merge, or discard this patch.