@@ -99,8 +99,8 @@ |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | - * @param PreFileDownloadEvent $event |
|
103 | - */ |
|
102 | + * @param PreFileDownloadEvent $event |
|
103 | + */ |
|
104 | 104 | public function onPreFileDownload(PreFileDownloadEvent $event) { |
105 | 105 | /*$protocol = parse_url($event->getProcessedUrl(), PHP_URL_SCHEME); |
106 | 106 | if ($protocol === 's3') { |
@@ -66,7 +66,7 @@ |
||
66 | 66 | 'MyAdmin DocBlock Parser', |
67 | 67 | '=======================', |
68 | 68 | '' |
69 | - ]); |
|
69 | + ]); |
|
70 | 70 | $output->writeln('<info>foo</info>'); // green text |
71 | 71 | $output->writeln('<comment>foo</comment>'); // yellow text |
72 | 72 | $output->writeln('<question>foo</question>'); // black text on a cyan background |
@@ -62,7 +62,7 @@ |
||
62 | 62 | * @param OutputInterface $output |
63 | 63 | */ |
64 | 64 | protected function execute(InputInterface $input, OutputInterface $output) { |
65 | - $output->writeln([ // outputs multiple lines to the console (adding "\n" at the end of each line) |
|
65 | + $output->writeln([// outputs multiple lines to the console (adding "\n" at the end of each line) |
|
66 | 66 | 'MyAdmin DocBlock Parser', |
67 | 67 | '=======================', |
68 | 68 | '' |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'User Creator', |
63 | 63 | '============', |
64 | 64 | '' |
65 | - ]); |
|
65 | + ]); |
|
66 | 66 | /* |
67 | 67 | $output->writeln('Username: '.$input->getArgument('username')); // retrieve the argument value using getArgument() |
68 | 68 | */ |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @param OutputInterface $output |
59 | 59 | */ |
60 | 60 | protected function execute(InputInterface $input, OutputInterface $output) { |
61 | - $output->writeln([ // outputs multiple lines to the console (adding "\n" at the end of each line) |
|
61 | + $output->writeln([// outputs multiple lines to the console (adding "\n" at the end of each line) |
|
62 | 62 | 'User Creator', |
63 | 63 | '============', |
64 | 64 | '' |
@@ -59,7 +59,7 @@ |
||
59 | 59 | 'User Creator', |
60 | 60 | '============', |
61 | 61 | '' |
62 | - ]); |
|
62 | + ]); |
|
63 | 63 | $output->write('You are about to '); // outputs a message without adding a "\n" at the end of the line |
64 | 64 | $output->write('create a user.'); |
65 | 65 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @param OutputInterface $output |
59 | 59 | */ |
60 | 60 | protected function execute(InputInterface $input, OutputInterface $output) { |
61 | - $output->writeln([ // outputs multiple lines to the console (adding "\n" at the end of each line) |
|
61 | + $output->writeln([// outputs multiple lines to the console (adding "\n" at the end of each line) |
|
62 | 62 | 'User Creator', |
63 | 63 | '============', |
64 | 64 | '' |
@@ -72,7 +72,7 @@ |
||
72 | 72 | 'User Creator', |
73 | 73 | '============', |
74 | 74 | '' |
75 | - ]); |
|
75 | + ]); |
|
76 | 76 | $output->writeln('Username: '.$input->getArgument('username')); // retrieve the argument value using getArgument() |
77 | 77 | $output->write('You are about to '); // outputs a message without adding a "\n" at the end of the line |
78 | 78 | $output->write('create a user.'); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @param OutputInterface $output |
59 | 59 | */ |
60 | 60 | protected function execute(InputInterface $input, OutputInterface $output) { |
61 | - $output->writeln([ // outputs multiple lines to the console (adding "\n" at the end of each line) |
|
61 | + $output->writeln([// outputs multiple lines to the console (adding "\n" at the end of each line) |
|
62 | 62 | 'User Creator', |
63 | 63 | '============', |
64 | 64 | '' |
@@ -143,13 +143,13 @@ |
||
143 | 143 | public function getInstallPath(PackageInterface $package) { |
144 | 144 | if ($this->type == 'myadmin-template') { |
145 | 145 | $this->initializeTemplateDir(); |
146 | - $basePath = ($this->templateDir ? $this->templateDir.'/' : '') . $package->getPrettyName(); |
|
146 | + $basePath = ($this->templateDir ? $this->templateDir.'/' : '').$package->getPrettyName(); |
|
147 | 147 | } else { |
148 | 148 | $this->initializeVendorDir(); |
149 | - $basePath = ($this->vendorDir ? $this->vendorDir.'/' : '') . $package->getPrettyName(); |
|
149 | + $basePath = ($this->vendorDir ? $this->vendorDir.'/' : '').$package->getPrettyName(); |
|
150 | 150 | } |
151 | 151 | $targetDir = $package->getTargetDir(); |
152 | - return $basePath . ($targetDir ? '/'.$targetDir : ''); |
|
152 | + return $basePath.($targetDir ? '/'.$targetDir : ''); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -22,22 +22,22 @@ |
||
22 | 22 | * {@inheritDoc} |
23 | 23 | * @throws \InvalidArgumentException |
24 | 24 | */ |
25 | - public function getInstallPath(PackageInterface $package) { |
|
26 | - $prefix = mb_substr($package->getPrettyName(), 0, 23); |
|
27 | - if ('myadmin/template-' !== $prefix) { |
|
28 | - throw new \InvalidArgumentException( |
|
29 | - 'Unable to install template, myadmin templates ' |
|
30 | - .'should always start their package name with ' |
|
31 | - .'"myadmin/template-"' |
|
32 | - ); |
|
33 | - } |
|
34 | - return 'data/templates/'.mb_substr($package->getPrettyName(), 23); |
|
35 | - } |
|
25 | + public function getInstallPath(PackageInterface $package) { |
|
26 | + $prefix = mb_substr($package->getPrettyName(), 0, 23); |
|
27 | + if ('myadmin/template-' !== $prefix) { |
|
28 | + throw new \InvalidArgumentException( |
|
29 | + 'Unable to install template, myadmin templates ' |
|
30 | + .'should always start their package name with ' |
|
31 | + .'"myadmin/template-"' |
|
32 | + ); |
|
33 | + } |
|
34 | + return 'data/templates/'.mb_substr($package->getPrettyName(), 23); |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * {@inheritDoc} |
|
39 | - */ |
|
40 | - public function supports($packageType) { |
|
41 | - return 'myadmin-template' === $packageType; |
|
42 | - } |
|
37 | + /** |
|
38 | + * {@inheritDoc} |
|
39 | + */ |
|
40 | + public function supports($packageType) { |
|
41 | + return 'myadmin-template' === $packageType; |
|
42 | + } |
|
43 | 43 | } |
@@ -533,21 +533,21 @@ |
||
533 | 533 | if (isset($requirements[$function])) |
534 | 534 | if (!is_array($requirements[$function])) |
535 | 535 | if (strrpos($requirements[$function], '\\') !== FALSE) { |
536 | - require_once $include_root .'/'. substr($requirements[$function], strrpos($requirements[$function], '\\')+2); |
|
536 | + require_once $include_root.'/'.substr($requirements[$function], strrpos($requirements[$function], '\\') + 2); |
|
537 | 537 | if (substr($function, 0, 6) != 'class.') |
538 | - $function = substr($requirements[$function], 0, strrpos($requirements[$function], '\\')+1).$function; |
|
538 | + $function = substr($requirements[$function], 0, strrpos($requirements[$function], '\\') + 1).$function; |
|
539 | 539 | else |
540 | - $function = 'class.'.substr($requirements[$function], 0, strrpos($requirements[$function], '\\')+1).substr($function, 6); |
|
540 | + $function = 'class.'.substr($requirements[$function], 0, strrpos($requirements[$function], '\\') + 1).substr($function, 6); |
|
541 | 541 | } else |
542 | - require_once $include_root .'/'. $requirements[$function]; |
|
542 | + require_once $include_root.'/'.$requirements[$function]; |
|
543 | 543 | else |
544 | 544 | foreach ($requirements[$function] as $requirement) |
545 | 545 | if (strrpos($requirement, '\\') !== FALSE) { |
546 | - require_once $include_root .'/'. substr($requirement, strrpos($requirement, '\\')+2); |
|
546 | + require_once $include_root.'/'.substr($requirement, strrpos($requirement, '\\') + 2); |
|
547 | 547 | if (substr($function, 0, 6) != 'class.') |
548 | - $function = substr($requirement, 0, strrpos($requirement, '\\')+1).$function; |
|
548 | + $function = substr($requirement, 0, strrpos($requirement, '\\') + 1).$function; |
|
549 | 549 | else |
550 | - $function = 'class.'.substr($requirement, 0, strrpos($requirement, '\\')+1).substr($function, 6); |
|
550 | + $function = 'class.'.substr($requirement, 0, strrpos($requirement, '\\') + 1).substr($function, 6); |
|
551 | 551 | } else |
552 | 552 | require_once $include_root.'/'.$requirement; |
553 | 553 | if (!function_exists($function)) |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @param \Composer\IO\IOInterface $io |
25 | 25 | */ |
26 | 26 | public function activate(Composer $composer, IOInterface $io) { |
27 | - $installer = new TemplateInstaller($io, $composer); |
|
28 | - $composer->getInstallationManager()->addInstaller($installer); |
|
29 | - } |
|
27 | + $installer = new TemplateInstaller($io, $composer); |
|
28 | + $composer->getInstallationManager()->addInstaller($installer); |
|
29 | + } |
|
30 | 30 | } |