From e60f9373a391243314db0be974d890199bc31072 Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Mon, 8 Nov 2021 07:52:44 -0500 Subject: [PATCH] fix some errors reported by phpstan --- Michelf/Markdown.php | 6 +++--- Michelf/MarkdownExtra.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Michelf/Markdown.php b/Michelf/Markdown.php index 8ab24d2..e7a5976 100644 --- a/Michelf/Markdown.php +++ b/Michelf/Markdown.php @@ -708,7 +708,7 @@ class Markdown implements MarkdownInterface { /** * Callback method to parse referenced anchors - * @param string $matches + * @param array $matches * @return string */ protected function _doAnchors_reference_callback($matches) { @@ -747,7 +747,7 @@ class Markdown implements MarkdownInterface { /** * Callback method to parse inline anchors - * @param string $matches + * @param array $matches * @return string */ protected function _doAnchors_inline_callback($matches) { @@ -1808,7 +1808,7 @@ class Markdown implements MarkdownInterface { /** * String length function for detab. `_initDetab` will create a function to * handle UTF-8 if the default function does not exist. - * @var string + * can be a string or function */ protected $utf8_strlen = 'mb_strlen'; diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index 8485c5c..060a4ae 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -1222,6 +1222,7 @@ class MarkdownExtra extends \Michelf\Markdown { $head = $matches[1]; $underline = $matches[2]; $content = $matches[3]; + $attr = []; // Remove any tailing pipes for each line. $head = preg_replace('/[|] *$/m', '', $head);