From 06b383878979317686d88023435e4001be320b4f Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 11 Jan 2021 10:03:58 +0900 Subject: [PATCH 1/3] fix: $saveData default value --- system/View/RendererInterface.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/system/View/RendererInterface.php b/system/View/RendererInterface.php index 0128d1c8f696..e3a5f92ab58c 100644 --- a/system/View/RendererInterface.php +++ b/system/View/RendererInterface.php @@ -22,17 +22,17 @@ interface RendererInterface * Builds the output based upon a file name and any * data that has already been set. * - * @param string $view - * @param array $options Reserved for 3rd-party uses since - * it might be needed to pass additional info - * to other template engines. - * @param boolean $saveData If true, will save data for use with any other calls, + * @param string $view + * @param array $options Reserved for 3rd-party uses since + * it might be needed to pass additional info + * to other template engines. + * @param boolean|null $saveData If true, will save data for use with any other calls, * if false, will clean the data after displaying the view, * if not specified, use the config setting. * * @return string */ - public function render(string $view, array $options = null, bool $saveData = false): string; + public function render(string $view, array $options = null, bool $saveData = null): string; //-------------------------------------------------------------------- @@ -40,17 +40,17 @@ public function render(string $view, array $options = null, bool $saveData = fal * Builds the output based upon a string and any * data that has already been set. * - * @param string $view The view contents - * @param array $options Reserved for 3rd-party uses since - * it might be needed to pass additional info - * to other template engines. - * @param boolean $saveData If true, will save data for use with any other calls, + * @param string $view The view contents + * @param array $options Reserved for 3rd-party uses since + * it might be needed to pass additional info + * to other template engines. + * @param boolean|null $saveData If true, will save data for use with any other calls, * if false, will clean the data after displaying the view, * if not specified, use the config setting. * * @return string */ - public function renderString(string $view, array $options = null, bool $saveData = false): string; + public function renderString(string $view, array $options = null, bool $saveData = null): string; //-------------------------------------------------------------------- From 02ee95c88be62dc3b38da65b1ffe6e8357e75560 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 11 Jan 2021 10:04:43 +0900 Subject: [PATCH 2/3] docs: fix @param type --- system/View/View.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/View/View.php b/system/View/View.php index 3d98fae92662..ad2fc5cc787d 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -272,11 +272,11 @@ public function render(string $view, array $options = null, bool $saveData = nul * data that has already been set. * Cache does not apply, because there is no "key". * - * @param string $view The view contents - * @param array $options Reserved for 3rd-party uses since - * it might be needed to pass additional info - * to other template engines. - * @param boolean $saveData If true, will save data for use with any other calls, + * @param string $view The view contents + * @param array $options Reserved for 3rd-party uses since + * it might be needed to pass additional info + * to other template engines. + * @param boolean|null $saveData If true, will save data for use with any other calls, * if false, will clean the data after displaying the view, * if not specified, use the config setting. * From 02ef6a16ea6d3ce33dbd4cf30674eb4fad7621db Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 11 Jan 2021 10:07:14 +0900 Subject: [PATCH 3/3] docs: fix phpdoc indentation --- system/View/RendererInterface.php | 8 ++++---- system/View/View.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system/View/RendererInterface.php b/system/View/RendererInterface.php index e3a5f92ab58c..08a3d13f1920 100644 --- a/system/View/RendererInterface.php +++ b/system/View/RendererInterface.php @@ -27,8 +27,8 @@ interface RendererInterface * it might be needed to pass additional info * to other template engines. * @param boolean|null $saveData If true, will save data for use with any other calls, - * if false, will clean the data after displaying the view, - * if not specified, use the config setting. + * if false, will clean the data after displaying the view, + * if not specified, use the config setting. * * @return string */ @@ -45,8 +45,8 @@ public function render(string $view, array $options = null, bool $saveData = nul * it might be needed to pass additional info * to other template engines. * @param boolean|null $saveData If true, will save data for use with any other calls, - * if false, will clean the data after displaying the view, - * if not specified, use the config setting. + * if false, will clean the data after displaying the view, + * if not specified, use the config setting. * * @return string */ diff --git a/system/View/View.php b/system/View/View.php index ad2fc5cc787d..534d4adcad8c 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -152,7 +152,7 @@ public function __construct(ViewConfig $config, string $viewPath = null, FileLoc * data that has already been set. * * Valid $options: - * - cache number of seconds to cache for + * - cache number of seconds to cache for * - cache_name Name to use for cache * * @param string $view @@ -277,8 +277,8 @@ public function render(string $view, array $options = null, bool $saveData = nul * it might be needed to pass additional info * to other template engines. * @param boolean|null $saveData If true, will save data for use with any other calls, - * if false, will clean the data after displaying the view, - * if not specified, use the config setting. + * if false, will clean the data after displaying the view, + * if not specified, use the config setting. * * @return string */