Completed
Push — master ( 249848...a073b6 )
by Anton
01:25
created
src/Installers/Plugin.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function __construct()
59 59
     {
60
-        defined('PATH_ROOT') ? : define('PATH_ROOT', realpath($_SERVER['DOCUMENT_ROOT']));
61
-        defined('DS') ? : define('DS', DIRECTORY_SEPARATOR);
60
+        defined('PATH_ROOT') ?: define('PATH_ROOT', realpath($_SERVER['DOCUMENT_ROOT']));
61
+        defined('DS') ?: define('DS', DIRECTORY_SEPARATOR);
62 62
     }
63 63
 
64 64
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     protected function getExtraFiles() : array
151 151
     {
152
-        $moduleJson = json_decode(file_get_contents($this->installer->getVendorPath() .DS. 'composer.json'), true);
152
+        $moduleJson = json_decode(file_get_contents($this->installer->getVendorPath() . DS . 'composer.json'), true);
153 153
 
154 154
         if (isset($moduleJson, $moduleJson['extra'], $moduleJson['extra']['copy-files'])) {
155 155
             return $moduleJson['extra']['copy-files'];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         foreach (self::DIRECTORIES as $directory) {
171 171
             $this->copy(
172
-                $this->installer->getVendorPath() .DS. $directory . DS,
172
+                $this->installer->getVendorPath() . DS . $directory . DS,
173 173
                 PATH_ROOT . DS . $directory . DS
174 174
             );
175 175
         }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         foreach ($files as $source => $target) {
194 194
             $this->copy(
195
-                dirname($this->installer->getVendorPath(), 2) .DS. $source,
195
+                dirname($this->installer->getVendorPath(), 2) . DS . $source,
196 196
                 PATH_ROOT . DS . $target
197 197
             );
198 198
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
             foreach ($finder as $file) {
247 247
                 try {
248
-                    $this->getFilesystem()->copy($file, $target .DS. $file->getRelativePathname());
248
+                    $this->getFilesystem()->copy($file, $target . DS . $file->getRelativePathname());
249 249
                 } catch (IOException $e) {
250 250
                     throw new \InvalidArgumentException(
251 251
                         sprintf('Could not copy `%s`', $file->getBaseName())
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                 if ($isRenameFile) {
258 258
                     $this->getFilesystem()->copy($source, $target);
259 259
                 } else {
260
-                    $this->getFilesystem()->copy($source, $target.'/'.basename($source));
260
+                    $this->getFilesystem()->copy($source, $target . '/' . basename($source));
261 261
                 }
262 262
             } catch (IOException $e) {
263 263
                 throw new \InvalidArgumentException(sprintf('Could not copy `%s`', $source));
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
             // remove empty directories
327 327
             if (is_dir($current)) {
328
-                if (count(scandir($current, SCANDIR_SORT_ASCENDING )) === 2) {
328
+                if (count(scandir($current, SCANDIR_SORT_ASCENDING)) === 2) {
329 329
                     rmdir($current);
330 330
                     $this->installer->getIo()->write(
331 331
                         "  - Removed directory `{$iterator->getSubPathName()}`",
Please login to merge, or discard this patch.