From 5e64479c06b5880182e2b6276f94ba9fd3c75106 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sun, 28 Jun 2020 17:34:50 +0900 Subject: [PATCH] Document the callback --- src/PhpSpreadsheet/Writer/Html.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php index 752f286f..f3b40fa1 100644 --- a/src/PhpSpreadsheet/Writer/Html.php +++ b/src/PhpSpreadsheet/Writer/Html.php @@ -208,9 +208,15 @@ class Html extends BaseWriter return $html; } - public function setEditHtmlCallback(?callable $cbk): void + /** + * Set a callback to edit the entire HTML. + * + * The callback must accept the HTML as string as first parameter, + * and it must return the edited HTML as string. + */ + public function setEditHtmlCallback(?callable $callback): void { - $this->editHtmlCallback = $cbk; + $this->editHtmlCallback = $callback; } const VALIGN_ARR = [