From c6b183b4ea1b7dccfa1f78e2ecb5f496dab3f9c6 Mon Sep 17 00:00:00 2001 From: liwenrui Date: Mon, 10 Jul 2023 10:26:02 +0800 Subject: [PATCH] * make helper functions private. --- module/ai/model.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/ai/model.php b/module/ai/model.php index d287bae8b9..01f5b04099 100644 --- a/module/ai/model.php +++ b/module/ai/model.php @@ -642,11 +642,11 @@ class aiModel extends model /** * Auto prepend newline to text if text has newline in the middle. * - * @param string $text - * @access public + * @param string $text + * @access private * @return string */ - public static function autoPrependNewline($text) + private static function autoPrependNewline($text) { preg_match('/\n[^$]/', $text, $matches); @@ -656,12 +656,12 @@ class aiModel extends model /** * Try to punctuate sentence if sentence is not ended with punctuation. * - * @param string $sentence - * @param bool $newline - * @access public + * @param string $sentence + * @param bool $newline + * @access private * @return string */ - public static function tryPunctuate($sentence, $newline = false) + private static function tryPunctuate($sentence, $newline = false) { preg_match('/\p{P}$/u', $sentence, $matches); if(empty($matches)) $sentence .= '.';