Passed
Branch master (7cd0ca)
by Tim
10:18
created
Category
src/ModuleInstaller.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
 
38 38
         $name = $package->getPrettyName();
39 39
         if (!preg_match('@^.*/simplesamlphp-module-(.+)$@', $name, $matches)) {
40
-            throw new InvalidArgumentException('Unable to install module ' . $name .', package name must be on the form "VENDOR/simplesamlphp-module-MODULENAME".');
40
+            throw new InvalidArgumentException('Unable to install module ' . $name . ', package name must be on the form "VENDOR/simplesamlphp-module-MODULENAME".');
41 41
         }
42 42
         $moduleDir = $matches[1];
43 43
 
44 44
         if (!preg_match('@^[a-z0-9_.-]*$@', $moduleDir)) {
45
-            throw new InvalidArgumentException('Unable to install module ' . $name .', module name must only contain characters from a-z, 0-9, "_", "." and "-".');
45
+            throw new InvalidArgumentException('Unable to install module ' . $name . ', module name must only contain characters from a-z, 0-9, "_", "." and "-".');
46 46
         }
47 47
         if ($moduleDir[0] === '.') {
48
-            throw new InvalidArgumentException('Unable to install module ' . $name .', module name cannot start with ".".');
48
+            throw new InvalidArgumentException('Unable to install module ' . $name . ', module name cannot start with ".".');
49 49
         }
50 50
 
51 51
         /* Composer packages are supposed to only contain lowercase letters, but historically many modules have had names in mixed case.
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
         if (isset($extraData['ssp-mixedcase-module-name'])) {
56 56
             $mixedCaseModuleName = $extraData['ssp-mixedcase-module-name'];
57 57
             if (!is_string($mixedCaseModuleName)) {
58
-                throw new InvalidArgumentException('Unable to install module ' . $name .', "ssp-mixedcase-module-name" must be a string.');
58
+                throw new InvalidArgumentException('Unable to install module ' . $name . ', "ssp-mixedcase-module-name" must be a string.');
59 59
             }
60 60
             if (mb_strtolower($mixedCaseModuleName, 'utf-8') !== $moduleDir) {
61
-                throw new InvalidArgumentException('Unable to install module ' . $name .', "ssp-mixedcase-module-name" must match the package name except that it can contain uppercase letters.');
61
+                throw new InvalidArgumentException('Unable to install module ' . $name . ', "ssp-mixedcase-module-name" must match the package name except that it can contain uppercase letters.');
62 62
             }
63 63
             $moduleDir = $mixedCaseModuleName;
64 64
         }
Please login to merge, or discard this patch.
src/ModuleInstallerPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $installPath = $this->installer->getPackageBasePath($package);
61 61
 
62 62
         $io = $this->io;
63
-        $outputStatus = function () use ($io, $installPath) {
63
+        $outputStatus = function() use ($io, $installPath) {
64 64
             $io->write(
65 65
                 sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>')
66 66
             );
Please login to merge, or discard this patch.