@@ -54,21 +54,21 @@ discard block |
||
54 | 54 | * @return Collection |
55 | 55 | */ |
56 | 56 | protected function compile(CommandContextInterface $commandContext) { |
57 | - $this->logFile = storage_path('logs/async/' . (string) round(microtime(true) * 1000) . |
|
58 | - mt_rand(1, 10000) . '.log'); |
|
57 | + $this->logFile = storage_path('logs/async/'.(string) round(microtime(true) * 1000). |
|
58 | + mt_rand(1, 10000).'.log'); |
|
59 | 59 | |
60 | 60 | $memoryLimit = config('satis.memory_limit'); |
61 | 61 | $buildVerbosity = config('satis.build_verbosity'); |
62 | 62 | |
63 | 63 | $chunks = new Collection([ |
64 | - 'php' . ($memoryLimit !== null ? ' -dmemory_limit=' . $memoryLimit : ''), |
|
64 | + 'php'.($memoryLimit !== null ? ' -dmemory_limit='.$memoryLimit : ''), |
|
65 | 65 | sprintf($this->executable, DIRECTORY_SEPARATOR), |
66 | - $this->command . ($buildVerbosity !== null ? ' -' . $buildVerbosity : ''), |
|
66 | + $this->command.($buildVerbosity !== null ? ' -'.$buildVerbosity : ''), |
|
67 | 67 | $this->configPath, |
68 | 68 | $this->buildDirectory |
69 | 69 | ]); |
70 | 70 | |
71 | - if($this->item !== null) { |
|
71 | + if ($this->item !== null) { |
|
72 | 72 | $chunks->push($this->item); |
73 | 73 | } |
74 | 74 | |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | $chunks->push($commandContext->getSendMailOnError($email, $message)); |
83 | 83 | } |
84 | 84 | |
85 | - foreach(['http', 'https'] as $protocol) { |
|
85 | + foreach (['http', 'https'] as $protocol) { |
|
86 | 86 | $proxy = $this->proxySettings->get($protocol); |
87 | - if($proxy !== null) { |
|
88 | - $chunks->prepend(strtoupper($protocol) . '_PROXY=' . $proxy); |
|
87 | + if ($proxy !== null) { |
|
88 | + $chunks->prepend(strtoupper($protocol).'_PROXY='.$proxy); |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $logger = $commandContext->getLogger(); |
120 | 120 | |
121 | 121 | $logger->info(str_repeat('=', 30)); |
122 | - $logger->info('Running command => ' . PHP_EOL . $commandChunks->implode(' ')); |
|
122 | + $logger->info('Running command => '.PHP_EOL.$commandChunks->implode(' ')); |
|
123 | 123 | |
124 | 124 | chdir($this->directory); |
125 | 125 | |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | |
128 | 128 | chdir($this->currentDirectory); |
129 | 129 | |
130 | - if($commandContext instanceof SyncCommand) { |
|
131 | - $logger->info('Command output => ' . implode(PHP_EOL, $output)); |
|
130 | + if ($commandContext instanceof SyncCommand) { |
|
131 | + $logger->info('Command output => '.implode(PHP_EOL, $output)); |
|
132 | 132 | } else { |
133 | - $logger->notice('Command output can be found in "' . $this->logFile . '".'); |
|
133 | + $logger->notice('Command output can be found in "'.$this->logFile.'".'); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | $this->setCommandOutput($output); |
@@ -176,12 +176,12 @@ discard block |
||
176 | 176 | * @param string $item |
177 | 177 | */ |
178 | 178 | public function setItem($item) { |
179 | - if($item === null) { |
|
179 | + if ($item === null) { |
|
180 | 180 | return; |
181 | 181 | } |
182 | 182 | |
183 | - if(preg_match(Repository::REGEX, $item)) { |
|
184 | - $this->item = '--repository-url ' . escapeshellarg($item); |
|
183 | + if (preg_match(Repository::REGEX, $item)) { |
|
184 | + $this->item = '--repository-url '.escapeshellarg($item); |
|
185 | 185 | } else { |
186 | 186 | $this->item = escapeshellarg($item); |
187 | 187 | } |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | public function run($asyncMode = true) { |
217 | 217 | # -- force sync |
218 | 218 | #if(true) { |
219 | - if($asyncMode === false || $this->isWindows() === true) { |
|
220 | - if($this->isWindows() === true) { |
|
219 | + if ($asyncMode === false || $this->isWindows() === true) { |
|
220 | + if ($this->isWindows() === true) { |
|
221 | 221 | $this->getLogger() |
222 | 222 | ->warn('OS does not support async mode, forcing sync.'); |
223 | 223 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | $result = $this->exec(new SyncCommand()); |
241 | 241 | |
242 | - if($result !== 0) { |
|
242 | + if ($result !== 0) { |
|
243 | 243 | throw new PackageBuildFailedException('Package build failed. Check build log for details.'); |
244 | 244 | } |
245 | 245 |