diff --git a/Michelf/Markdown.php b/Michelf/Markdown.php index 287cd24..78a8aa1 100644 --- a/Michelf/Markdown.php +++ b/Michelf/Markdown.php @@ -29,7 +29,7 @@ class Markdown implements MarkdownInterface { * @param string $text * @return string */ - public static function defaultTransform($text) { + public static function defaultTransform(string $text): string { // Take parser class on which this function was called. $parser_class = static::class; @@ -213,7 +213,7 @@ class Markdown implements MarkdownInterface { * @param string $text * @return string */ - public function transform($text) { + public function transform(string $text): string { $this->setup(); # Remove UTF-8 BOM and marker character in input, if present. diff --git a/Michelf/MarkdownInterface.php b/Michelf/MarkdownInterface.php index 748c819..84e6545 100644 --- a/Michelf/MarkdownInterface.php +++ b/Michelf/MarkdownInterface.php @@ -23,7 +23,7 @@ interface MarkdownInterface { * @param string $text * @return string */ - public static function defaultTransform($text); + public static function defaultTransform(string $text): string; /** * Main function. Performs some preprocessing on the input text @@ -34,5 +34,5 @@ interface MarkdownInterface { * @param string $text * @return string */ - public function transform($text); + public function transform(string $text): string; }