@@ -106,7 +106,6 @@ discard block |
||
| 106 | 106 | /** |
| 107 | 107 | * Compile the website. |
| 108 | 108 | * |
| 109 | - * @param bool $cleanDirectory Clean the target directing before rebuilding |
|
| 110 | 109 | * @param bool $tracking Whether or not to keep track of files as they're compiled to save time in 'watch' |
| 111 | 110 | */ |
| 112 | 111 | public function build ($tracking = false) |
@@ -300,6 +299,9 @@ discard block |
||
| 300 | 299 | $this->noClean = $noClean; |
| 301 | 300 | } |
| 302 | 301 | |
| 302 | + /** |
|
| 303 | + * @param string $filePath |
|
| 304 | + */ |
|
| 303 | 305 | private function modificationWatcher ($filePath) |
| 304 | 306 | { |
| 305 | 307 | $this->output->writeln(sprintf("File change detected: %s", $filePath)); |
@@ -182,7 +182,8 @@ |
||
| 182 | 182 | |
| 183 | 183 | $this->output->notice('Watch started successfully'); |
| 184 | 184 | |
| 185 | - $listener->onAnything(function (Event $event, FileResource $resouce, $path) use ($targetPath) { |
|
| 185 | + $listener->onAnything(function (Event $event, FileResource $resouce, $path) use ($targetPath) |
|
| 186 | + { |
|
| 186 | 187 | $filePath = $this->fs->getRelativePath($path); |
| 187 | 188 | |
| 188 | 189 | if ((substr($filePath, 0, strlen($targetPath)) === $targetPath) || |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * PageManager constructor |
| 41 | 41 | */ |
| 42 | - public function __construct() |
|
| 42 | + public function __construct () |
|
| 43 | 43 | { |
| 44 | 44 | parent::__construct(); |
| 45 | 45 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | /** |
| 155 | 155 | * {@inheritdoc} |
| 156 | 156 | */ |
| 157 | - public function refreshItem($filePath) |
|
| 157 | + public function refreshItem ($filePath) |
|
| 158 | 158 | { |
| 159 | 159 | $this->compilePageView($filePath, true); |
| 160 | 160 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | /** |
| 163 | 163 | * {@inheritdoc} |
| 164 | 164 | */ |
| 165 | - protected function handleTrackableItem($filePath, $options = array()) |
|
| 165 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
| 166 | 166 | { |
| 167 | 167 | $pageView = new PageView($filePath); |
| 168 | 168 | $namespace = 'static'; |
@@ -46,7 +46,9 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public function setCollections ($collections) |
| 48 | 48 | { |
| 49 | - if (empty($collections)) { return; } |
|
| 49 | + if (empty($collections)) |
|
| 50 | + { |
|
| 51 | +return; } |
|
| 50 | 52 | |
| 51 | 53 | $this->collections = $collections; |
| 52 | 54 | } |
@@ -85,7 +87,9 @@ discard block |
||
| 85 | 87 | */ |
| 86 | 88 | public function parsePageViews ($pageViewFolders) |
| 87 | 89 | { |
| 88 | - if (empty($pageViewFolders)) { return; } |
|
| 90 | + if (empty($pageViewFolders)) |
|
| 91 | + { |
|
| 92 | +return; } |
|
| 89 | 93 | |
| 90 | 94 | /** |
| 91 | 95 | * The name of the folder where PageViews are located |