@@ -52,6 +52,9 @@ |
||
| 52 | 52 | $this->async = $async; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $environment |
|
| 57 | + */ |
|
| 55 | 58 | public function setEnvironment($environment) { |
| 56 | 59 | $this->environment = $environment; |
| 57 | 60 | } |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Pageon\Pcntl; |
| 4 | 4 | |
| 5 | -use Brendt\Stitcher\App; |
|
| 6 | 5 | use Brendt\Stitcher\Application\DevController; |
| 7 | 6 | use Brendt\Stitcher\Parser\Site\PageParser; |
| 8 | 7 | use Brendt\Stitcher\Site\Page; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $this->success = $callback; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - public function getSuccess() : ?callable { |
|
| 55 | + public function getSuccess() : ? callable { |
|
| 56 | 56 | return $this->success; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | return count($this->array) === 0; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function current() : ?Process { |
|
| 23 | + public function current() : ? Process { |
|
| 24 | 24 | return $this->array[$this->position]; |
| 25 | 25 | } |
| 26 | 26 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return isset($this->array[$offset]); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - public function offsetGet($offset) : ?Process { |
|
| 47 | + public function offsetGet($offset) : ? Process { |
|
| 48 | 48 | return isset($this->array[$offset]) ? $this->array[$offset] : null; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $this->eventDispatcher = $eventDispatcher; |
| 20 | 20 | $this->children = []; |
| 21 | 21 | |
| 22 | - pcntl_signal(SIGCHLD, function () { |
|
| 22 | + pcntl_signal(SIGCHLD, function() { |
|
| 23 | 23 | |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -179,7 +179,7 @@ |
||
| 179 | 179 | |
| 180 | 180 | $pageRenderProcess = new PageRenderProcess($this->pageParser, $page, $this->publicDir, $filterValue); |
| 181 | 181 | $pageRenderProcess->setEnvironment($this->environment); |
| 182 | - $pageRenderProcess->onSuccess(function () use ($page) { |
|
| 182 | + $pageRenderProcess->onSuccess(function() use ($page) { |
|
| 183 | 183 | $this->eventDispatcher->dispatch(SiteParser::EVENT_PAGE_PARSED, Event::create(['pageId' => $page->getId()])); |
| 184 | 184 | }); |
| 185 | 185 | |