Completed
Push — master ( 93c5dd...55c47c )
by Sylvain
06:12 queued 26s
created
src/LEtudiant/Composer/Installer/Config/SharedPackageInstallerConfig.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         if (!isset($extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['vendor-dir'])) {
66 66
             throw new \InvalidArgumentException(
67
-                'The "vendor-dir" parameter for "' . SharedPackageInstaller::PACKAGE_TYPE . '" configuration '
67
+                'The "vendor-dir" parameter for "'.SharedPackageInstaller::PACKAGE_TYPE.'" configuration '
68 68
                 . 'should be provided in your project composer.json ("extra" key)'
69 69
             );
70 70
         }
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
      */
87 87
     protected function setSymlinkDirectory($baseDir, array $extraConfigs)
88 88
     {
89
-        $this->symlinkDir = $baseDir . 'vendor-shared';
89
+        $this->symlinkDir = $baseDir.'vendor-shared';
90 90
 
91 91
         if (isset($extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['symlink-dir'])) {
92 92
             $this->symlinkDir = $extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['symlink-dir'];
93 93
 
94 94
             if ('/' != $this->symlinkDir[0]) {
95
-                $this->symlinkDir = $baseDir . $this->symlinkDir;
95
+                $this->symlinkDir = $baseDir.$this->symlinkDir;
96 96
             }
97 97
         }
98 98
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
 
114 114
         if ('/' != $this->vendorDir[0]) {
115
-            $this->vendorDir = $baseDir . $this->vendorDir;
115
+            $this->vendorDir = $baseDir.$this->vendorDir;
116 116
         }
117 117
     }
118 118
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         // Up to the project root directory
144 144
         if (0 < strpos($this->symlinkBasePath, '/')) {
145
-            $this->symlinkBasePath = '../../' . $this->symlinkBasePath;
145
+            $this->symlinkBasePath = '../../'.$this->symlinkBasePath;
146 146
         }
147 147
     }
148 148
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     public function getOriginalVendorDir($endingSlash = false)
220 220
     {
221 221
         if ($endingSlash && null != $this->originalVendorDir) {
222
-            return $this->originalVendorDir . '/';
222
+            return $this->originalVendorDir.'/';
223 223
         }
224 224
 
225 225
         return $this->originalVendorDir;
Please login to merge, or discard this patch.
src/LEtudiant/Composer/Installer/Solver/SharedPackageSolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,12 +92,12 @@
 block discarded – undo
92 92
             if (false !== strpos($packageName, '*')) {
93 93
                 $pattern = str_replace('*', '[a-zA-Z0-9-_]+', str_replace('/', '\/', $packageName));
94 94
 
95
-                $callbacks[] = function ($packagePrettyName) use ($pattern) {
96
-                    return 1 === preg_match('/' . $pattern . '/', $packagePrettyName);
95
+                $callbacks[] = function($packagePrettyName) use ($pattern) {
96
+                    return 1 === preg_match('/'.$pattern.'/', $packagePrettyName);
97 97
                 };
98 98
             // Raw package name
99 99
             } else {
100
-                $callbacks[] = function ($packagePrettyName) use ($packageName) {
100
+                $callbacks[] = function($packagePrettyName) use ($packageName) {
101 101
                     return $packageName === $packagePrettyName;
102 102
                 };
103 103
             }
Please login to merge, or discard this patch.
src/LEtudiant/Composer/Installer/Solver/SharedPackageInstallerSolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $this->defaultInstaller->update($repo, $initial, $target);
117 117
         } else {
118 118
             if (!$repo->hasPackage($initial)) {
119
-                throw new \InvalidArgumentException('Package is not installed : ' . $initial->getPrettyName());
119
+                throw new \InvalidArgumentException('Package is not installed : '.$initial->getPrettyName());
120 120
             }
121 121
 
122 122
             $this->symlinkInstaller->update($repo, $initial, $target);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         if ($this->solver->isSharedPackage($package)) {
135 135
             if (!$repo->hasPackage($package)) {
136
-                throw new \InvalidArgumentException('Package is not installed : ' . $package->getPrettyName());
136
+                throw new \InvalidArgumentException('Package is not installed : '.$package->getPrettyName());
137 137
             }
138 138
 
139 139
             $this->symlinkInstaller->uninstall($repo, $package);
Please login to merge, or discard this patch.
src/LEtudiant/Composer/Installer/SharedPackageInstaller.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
         $this->initializeVendorDir();
82 82
 
83 83
         $basePath =
84
-            $this->vendorDir . DIRECTORY_SEPARATOR
85
-            . $package->getPrettyName() . DIRECTORY_SEPARATOR
84
+            $this->vendorDir.DIRECTORY_SEPARATOR
85
+            . $package->getPrettyName().DIRECTORY_SEPARATOR
86 86
             . $package->getPrettyVersion()
87 87
         ;
88 88
 
89 89
         $targetDir = $package->getTargetDir();
90 90
 
91
-        return $basePath . ($targetDir ? '/' . $targetDir : '');
91
+        return $basePath.($targetDir ? '/'.$targetDir : '');
92 92
     }
93 93
 
94 94
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     protected function getPackageVendorSymlink(PackageInterface $package)
100 100
     {
101
-        return $this->config->getSymlinkDir() . DIRECTORY_SEPARATOR . $package->getPrettyName();
101
+        return $this->config->getSymlinkDir().DIRECTORY_SEPARATOR.$package->getPrettyName();
102 102
     }
103 103
 
104 104
     /**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
     public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
166 166
     {
167 167
         if ($this->isSourceDirUnused($package) && $this->io->askConfirmation(
168
-                "The package version <info>" . $package->getPrettyName() . "</info> "
169
-                . "(<fg=yellow>" . $package->getPrettyVersion() . "</fg=yellow>) seems to be unused."
168
+                "The package version <info>".$package->getPrettyName()."</info> "
169
+                . "(<fg=yellow>".$package->getPrettyVersion()."</fg=yellow>) seems to be unused."
170 170
                 . PHP_EOL
171 171
                 . 'Do you want to <fg=red>delete the source folder</fg=red> ? [y/n] (default: no) : ',
172 172
                 false
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
             )
209 209
         ) {
210 210
             $this->io->write(array(
211
-                '  - Creating symlink for <info>' . $package->getPrettyName()
212
-                . '</info> (<fg=yellow>' . $package->getPrettyVersion() . '</fg=yellow>)',
211
+                '  - Creating symlink for <info>'.$package->getPrettyName()
212
+                . '</info> (<fg=yellow>'.$package->getPrettyVersion().'</fg=yellow>)',
213 213
                 ''
214 214
             ));
215 215
         }
@@ -226,9 +226,9 @@  discard block
 block discarded – undo
226 226
             $targetDir = $package->getTargetDir();
227 227
             $sourcePath =
228 228
                 $this->config->getSymlinkBasePath()
229
-                . '/' . $package->getPrettyName()
230
-                . '/' . $package->getPrettyVersion()
231
-                . ($targetDir ? '/' . $targetDir : '')
229
+                . '/'.$package->getPrettyName()
230
+                . '/'.$package->getPrettyVersion()
231
+                . ($targetDir ? '/'.$targetDir : '')
232 232
             ;
233 233
         } else {
234 234
             $sourcePath = $this->getInstallPath($package);
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
             && $this->filesystem->removeSymlink($this->getPackageVendorSymlink($package))
250 250
         ) {
251 251
             $this->io->write(array(
252
-                '  - Deleting symlink for <info>' . $package->getPrettyName() . '</info> '
253
-                . '(<fg=yellow>' . $package->getPrettyVersion() . '</fg=yellow>)',
252
+                '  - Deleting symlink for <info>'.$package->getPrettyName().'</info> '
253
+                . '(<fg=yellow>'.$package->getPrettyVersion().'</fg=yellow>)',
254 254
                 ''
255 255
             ));
256 256
 
Please login to merge, or discard this patch.
src/LEtudiant/Composer/Util/SymlinkFilesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if (is_link($symlinkPath)) {
50 50
             if (!$this->unlink($symlinkPath)) {
51 51
                 // @codeCoverageIgnoreStart
52
-                throw new \RuntimeException('Unable to remove the symlink : ' . $symlinkPath);
52
+                throw new \RuntimeException('Unable to remove the symlink : '.$symlinkPath);
53 53
                 // @codeCoverageIgnoreEnd
54 54
             }
55 55
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         if (is_dir($directoryPath) && $this->isDirEmpty($directoryPath)) {
72 72
             if (!$this->removeDirectory($directoryPath)) {
73 73
                 // @codeCoverageIgnoreStart
74
-                throw new \RuntimeException('Unable to remove the directory : ' . $directoryPath);
74
+                throw new \RuntimeException('Unable to remove the directory : '.$directoryPath);
75 75
                 // @codeCoverageIgnoreEnd
76 76
             }
77 77
 
Please login to merge, or discard this patch.
src/LEtudiant/Composer/Data/Package/SharedPackageDataManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     protected function updatePackageUsageFile(PackageInterface $package, array $packageData)
61 61
     {
62
-        $packageKey = $package->getPrettyName() . '/' . $package->getPrettyVersion();
62
+        $packageKey = $package->getPrettyName().'/'.$package->getPrettyVersion();
63 63
 
64 64
         // Remove the row if there is no data anymore
65 65
         if (!isset($packageData[0])) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         }
77 77
 
78 78
         file_put_contents(
79
-            $this->vendorDir . DIRECTORY_SEPARATOR . self::PACKAGE_DATA_FILENAME,
79
+            $this->vendorDir.DIRECTORY_SEPARATOR.self::PACKAGE_DATA_FILENAME,
80 80
             json_encode($this->packagesData)
81 81
         );
82 82
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     protected function initializePackageData()
137 137
     {
138
-        $filePath = $this->vendorDir . DIRECTORY_SEPARATOR . self::PACKAGE_DATA_FILENAME;
138
+        $filePath = $this->vendorDir.DIRECTORY_SEPARATOR.self::PACKAGE_DATA_FILENAME;
139 139
         if (!is_file($filePath)) {
140 140
             $this->packagesData = array();
141 141
         } else {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $this->initializePackageData();
157 157
         }
158 158
 
159
-        $packageKey = $package->getPrettyName() . '/' . $package->getPrettyVersion();
159
+        $packageKey = $package->getPrettyName().'/'.$package->getPrettyVersion();
160 160
         if (!isset($this->packagesData[$packageKey]) || !isset($this->packagesData[$packageKey][$key])) {
161 161
             return $defaultValue;
162 162
         }
Please login to merge, or discard this patch.