Updated MarkdownInteface to use type declarations.
This commit is contained in:
parent
932cbc7760
commit
86b59575e7
2 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ class Markdown implements MarkdownInterface {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function defaultTransform($text) {
|
public static function defaultTransform(string $text): string {
|
||||||
// Take parser class on which this function was called.
|
// Take parser class on which this function was called.
|
||||||
$parser_class = static::class;
|
$parser_class = static::class;
|
||||||
|
|
||||||
|
|
@ -213,7 +213,7 @@ class Markdown implements MarkdownInterface {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function transform($text) {
|
public function transform(string $text): string {
|
||||||
$this->setup();
|
$this->setup();
|
||||||
|
|
||||||
# Remove UTF-8 BOM and marker character in input, if present.
|
# Remove UTF-8 BOM and marker character in input, if present.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ interface MarkdownInterface {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function defaultTransform($text);
|
public static function defaultTransform(string $text): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function. Performs some preprocessing on the input text
|
* Main function. Performs some preprocessing on the input text
|
||||||
|
|
@ -34,5 +34,5 @@ interface MarkdownInterface {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function transform($text);
|
public function transform(string $text): string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue