@@ -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') { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | mkdir($path, 0777, true); |
256 | 256 | if (!is_dir($path)) |
257 | 257 | throw new \Exception('Path Not Found: '.$path); |
258 | - if ($event->getIO()->isVerbose() === TRUE) |
|
258 | + if ($event->getIO()->isVerbose() === true) |
|
259 | 259 | $event->getIO()->write(sprintf('Created Directory <info>%s</info>', $path)); |
260 | 260 | } |
261 | 261 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | touch($path); |
274 | 274 | if (!file_exists($path)) |
275 | 275 | throw new \Exception('File Not Found: '.$path); |
276 | - if ($event->getIO()->isVerbose() === TRUE) |
|
276 | + if ($event->getIO()->isVerbose() === true) |
|
277 | 277 | $event->getIO()->write(sprintf('Created File <info>%s</info>', $path)); |
278 | 278 | } |
279 | 279 | } |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | * @throws \Exception |
288 | 288 | */ |
289 | 289 | public static function runProcess(Event $event, $commandline) { |
290 | - if ($event->getIO()->isVerbose() === TRUE) |
|
290 | + if ($event->getIO()->isVerbose() === true) |
|
291 | 291 | $event->getIO()->write(sprintf('Running <info>%s</info>', $commandline)); |
292 | 292 | exec($commandline, $output, $return); |
293 | 293 | if ($return != 0) |
@@ -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 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @param Filesystem $filesystem |
51 | 51 | * @param BinaryInstaller $binaryInstaller |
52 | 52 | */ |
53 | - public function __construct(IOInterface $io, Composer $composer, $type = 'library', Filesystem $filesystem = NULL, BinaryInstaller $binaryInstaller = NULL) { |
|
53 | + public function __construct(IOInterface $io, Composer $composer, $type = 'library', Filesystem $filesystem = null, BinaryInstaller $binaryInstaller = null) { |
|
54 | 54 | $this->composer = $composer; |
55 | 55 | $this->downloadManager = $composer->getDownloadManager(); |
56 | 56 | $this->io = $io; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * @param PackageInterface $package Package instance |
159 | 159 | */ |
160 | 160 | public function ensureBinariesPresence(PackageInterface $package) { |
161 | - $this->binaryInstaller->installBinaries($package, $this->getInstallPath($package), FALSE); |
|
161 | + $this->binaryInstaller->installBinaries($package, $this->getInstallPath($package), false); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -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 | } |
@@ -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 | } |
@@ -33,11 +33,11 @@ |
||
33 | 33 | * @param bool $include_admin |
34 | 34 | * @return array of routes |
35 | 35 | */ |
36 | - public function get_routes($include_admin = FALSE) { |
|
36 | + public function get_routes($include_admin = false) { |
|
37 | 37 | //if ($include_admin === FALSE && $GLOBALS['tf']->ima === 'admin') |
38 | 38 | //$include_admin = TRUE; |
39 | 39 | $routes = array_merge($this->public_routes, $this->routes); |
40 | - if ($include_admin === TRUE) |
|
40 | + if ($include_admin === true) |
|
41 | 41 | $routes = array_merge($this->admin_routes, $routes); |
42 | 42 | uksort($routes, function($a, $b) { |
43 | 43 | if (strlen($a) == strlen($b)) { |