@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | $this->eventDispatcher->dispatch(self::EVENT_BEFORE_RUN, new SourceSetEvent($sourceSet)); |
127 | 127 | |
128 | - if ($updatedSources = array_filter($sourceSet->updatedSources(), function ($source) { |
|
128 | + if ($updatedSources = array_filter($sourceSet->updatedSources(), function($source) { |
|
129 | 129 | return !$source->isGenerated(); |
130 | 130 | })) { |
131 | 131 | if (!$found) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $timer = microtime(true); |
142 | 142 | foreach ($updatedSources as $source) { |
143 | 143 | $this->generatorManager->generate($source, $sourceSet); |
144 | - $this->consoleIo->overwrite(sprintf('%3d%%', 100 * ((++$counter) / $total)), false); |
|
144 | + $this->consoleIo->overwrite(sprintf('%3d%%', 100*((++$counter)/$total)), false); |
|
145 | 145 | } |
146 | 146 | $this->consoleIo->write(sprintf(' (%d sources / %4.2f seconds)', $total, microtime(true) - $timer)); |
147 | 147 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | if ($source->canBeFormatted()) { |
171 | 171 | $source->data()->set('blocks', $this->formatterManager->formatSourceBlocks($source)); |
172 | 172 | } |
173 | - $this->consoleIo->overwrite(sprintf('%3d%%', 100 * ((++$counter) / $total)), false); |
|
173 | + $this->consoleIo->overwrite(sprintf('%3d%%', 100*((++$counter)/$total)), false); |
|
174 | 174 | } |
175 | 175 | $this->consoleIo->write(sprintf(' (%d sources / %4.2f seconds)', $total, microtime(true) - $timer)); |
176 | 176 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } else { |
194 | 194 | $source->setFormattedContent($source->content()); |
195 | 195 | } |
196 | - $this->consoleIo->overwrite(sprintf('%3d%%', 100 * ((++$counter) / $total)), false); |
|
196 | + $this->consoleIo->overwrite(sprintf('%3d%%', 100*((++$counter)/$total)), false); |
|
197 | 197 | } |
198 | 198 | $this->eventDispatcher->dispatch(self::EVENT_AFTER_FORMAT, new SourceSetEvent($sourceSet)); |
199 | 199 | $this->consoleIo->write(sprintf(' (%d sources / %4.2f seconds)', $total, microtime(true) - $timer)); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | $socketServer = new ReactSocketServer($this->loop); |
48 | 48 | $httpServer = new ReactHttpServer($socketServer); |
49 | - $httpServer->on('request', function (Request $request, Response $response) use ($repository, $docroot, $output) { |
|
49 | + $httpServer->on('request', function(Request $request, Response $response) use ($repository, $docroot, $output) { |
|
50 | 50 | $path = $docroot.'/'.ltrim(rawurldecode($request->getPath()), '/'); |
51 | 51 | if (is_dir($path)) { |
52 | 52 | $path .= '/index.html'; |
@@ -18,7 +18,6 @@ |
||
18 | 18 | use React\Http\Server as ReactHttpServer; |
19 | 19 | use React\Socket\Server as ReactSocketServer; |
20 | 20 | use Sculpin\Core\Io\ConsoleIo; |
21 | -use Symfony\Component\Console\Output\OutputInterface; |
|
22 | 21 | |
23 | 22 | final class HttpServer |
24 | 23 | { |
@@ -115,7 +115,7 @@ |
||
115 | 115 | ); |
116 | 116 | |
117 | 117 | if ($watch) { |
118 | - $httpServer->addPeriodicTimer(1, function () use ($sourceSet) { |
|
118 | + $httpServer->addPeriodicTimer(1, function() use ($sourceSet) { |
|
119 | 119 | clearstatcache(); |
120 | 120 | $sourceSet->reset(); |
121 | 121 |