Completed
Pull Request — master (#4)
by Tomáš
03:05
created
src/Core/Sculpin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Bundle/SculpinBundle/HttpServer/HttpServer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
src/Bundle/SculpinBundle/Command/GenerateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.