@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is a part of Sculpin. |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | $this->eventDispatcher->dispatch(SculpinEvents::EVENT_BEFORE_RUN, new SourceSetEvent($sourceSet)); |
| 90 | 90 | |
| 91 | - if ($updatedSources = array_filter($sourceSet->updatedSources(), function ($source) { |
|
| 91 | + if ($updatedSources = array_filter($sourceSet->updatedSources(), function($source) { |
|
| 92 | 92 | return !$source->isGenerated(); |
| 93 | 93 | })) { |
| 94 | 94 | if (!$found) { |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function dataSourceId() |
| 64 | 64 | { |
| 65 | - return 'CompositeDataSource('.implode(',', array_map(function ($dataSource) { |
|
| 65 | + return 'CompositeDataSource('.implode(',', array_map(function($dataSource) { |
|
| 66 | 66 | return $dataSource->dataSourceId(); |
| 67 | 67 | }, $this->dataSources)); |
| 68 | 68 | } |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public function updatedSources() |
| 89 | 89 | { |
| 90 | - return array_filter($this->sources, function (SourceInterface $source) { |
|
| 90 | + return array_filter($this->sources, function(SourceInterface $source) { |
|
| 91 | 91 | return $source->hasChanged(); |
| 92 | 92 | }); |
| 93 | 93 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | if (null === $antPathMatcher) { |
| 29 | 29 | $antPathMatcher = new AntPathMatcher; |
| 30 | 30 | } |
| 31 | - $this->patterns = array_map(function ($path) use ($antPathMatcher) { |
|
| 31 | + $this->patterns = array_map(function($path) use ($antPathMatcher) { |
|
| 32 | 32 | return $antPathMatcher->isPattern($path) ? $path : $path.'/**'; |
| 33 | 33 | }, $paths); |
| 34 | 34 | $this->antPathMatcher = $antPathMatcher; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | // We have special sorting rules for our items based on the date |
| 21 | 21 | // and title. This assumes that the items are actually Post instances. |
| 22 | - uasort($this->items, function ($a, $b) { |
|
| 22 | + uasort($this->items, function($a, $b) { |
|
| 23 | 23 | return strnatcmp($b->date().' '.$b->title(), $a->date().' '.$a->title()); |
| 24 | 24 | }); |
| 25 | 25 | parent::init(); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | { |
| 72 | 72 | $this->port = $port; |
| 73 | 73 | |
| 74 | - $this->reactHttpServer->on('request', function (Request $request, Response $response) { |
|
| 74 | + $this->reactHttpServer->on('request', function(Request $request, Response $response) { |
|
| 75 | 75 | $path = $this->outputDirectory.'/'.ltrim(rawurldecode($request->getPath()), '/'); |
| 76 | 76 | if (is_dir($path)) { |
| 77 | 77 | $path .= '/index.html'; |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | |
| 110 | 110 | $this->httpServer->init(); |
| 111 | 111 | if ($watch) { |
| 112 | - $this->httpServer->addPeriodicTimer(1, function () use ($sourceSet) { |
|
| 112 | + $this->httpServer->addPeriodicTimer(1, function() use ($sourceSet) { |
|
| 113 | 113 | clearstatcache(); |
| 114 | 114 | $sourceSet->reset(); |
| 115 | 115 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | foreach ($data as $type => $extensions) { |
| 55 | - $data[$type] = array_filter($extensions, function ($var) { |
|
| 55 | + $data[$type] = array_filter($extensions, function($var) { |
|
| 56 | 56 | return strlen($var) > 0; |
| 57 | 57 | }); |
| 58 | 58 | } |