From e5f85ec1625f71e52e63fc358d92c6bf072daadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Mart=C3=ADn?= Date: Wed, 7 Oct 2020 06:15:45 +0200 Subject: [PATCH] Fix optional parameters --- src/Limenius/ReactRenderer/Renderer/AbstractReactRenderer.php | 4 ++-- .../ReactRenderer/Renderer/ExternalServerReactRenderer.php | 4 ++-- .../ReactRenderer/Renderer/PhpExecJsReactRenderer.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Limenius/ReactRenderer/Renderer/AbstractReactRenderer.php b/src/Limenius/ReactRenderer/Renderer/AbstractReactRenderer.php index 25d0800..b8e6e8a 100644 --- a/src/Limenius/ReactRenderer/Renderer/AbstractReactRenderer.php +++ b/src/Limenius/ReactRenderer/Renderer/AbstractReactRenderer.php @@ -30,7 +30,7 @@ abstract class AbstractReactRenderer * * @return array */ - abstract public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace); + abstract public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace = false); /** * @return string @@ -89,7 +89,7 @@ protected function initializeReduxStores($registeredStores = array(), $context = * * @return string */ - protected function wrap($name, $propsString, $uuid, $registeredStores = array(), $trace) + protected function wrap($name, $propsString, $uuid, $registeredStores = array(), $trace = false) { $traceStr = $trace ? 'true' : 'false'; $context = json_encode($this->contextProvider->getContext(true)); diff --git a/src/Limenius/ReactRenderer/Renderer/ExternalServerReactRenderer.php b/src/Limenius/ReactRenderer/Renderer/ExternalServerReactRenderer.php index 0f87ae6..b948f6d 100644 --- a/src/Limenius/ReactRenderer/Renderer/ExternalServerReactRenderer.php +++ b/src/Limenius/ReactRenderer/Renderer/ExternalServerReactRenderer.php @@ -28,7 +28,7 @@ class ExternalServerReactRenderer extends AbstractReactRenderer * @param ContextProviderInterface $contextProvider * @param LoggerInterface $logger */ - public function __construct($serverSocketPath, $failLoud = false, ContextProviderInterface $contextProvider, LoggerInterface $logger = null) + public function __construct($serverSocketPath, $failLoud, ContextProviderInterface $contextProvider, LoggerInterface $logger = null) { $this->serverSocketPath = $serverSocketPath; $this->failLoud = $failLoud; @@ -53,7 +53,7 @@ public function setServerSocketPath($serverSocketPath) * * @return array */ - public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace) + public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace = false) { if (strpos($this->serverSocketPath, '://') === false) { $this->serverSocketPath = 'unix://'.$this->serverSocketPath; diff --git a/src/Limenius/ReactRenderer/Renderer/PhpExecJsReactRenderer.php b/src/Limenius/ReactRenderer/Renderer/PhpExecJsReactRenderer.php index c61fe30..bd834c9 100644 --- a/src/Limenius/ReactRenderer/Renderer/PhpExecJsReactRenderer.php +++ b/src/Limenius/ReactRenderer/Renderer/PhpExecJsReactRenderer.php @@ -50,7 +50,7 @@ class PhpExecJsReactRenderer extends AbstractReactRenderer * @param ContextProviderInterface $contextProvider * @param LoggerInterface $logger */ - public function __construct($serverBundlePath, $failLoud = false, ContextProviderInterface $contextProvider, LoggerInterface $logger = null) + public function __construct($serverBundlePath, $failLoud, ContextProviderInterface $contextProvider, LoggerInterface $logger = null) { $this->serverBundlePath = $serverBundlePath; $this->failLoud = $failLoud; @@ -90,7 +90,7 @@ public function setServerBundlePath($serverBundlePath) * * @return array */ - public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace) + public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace = false) { $this->ensurePhpExecJsIsBuilt(); if ($this->needToSetContext) {