1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

PHP < 7 compat

Don't use token name for function name

Remove return typehint

Remove parameter typehints
This commit is contained in:
Aidan Woods 2018-12-05 15:17:53 +01:00
parent 0f36000dc9
commit 0f6c0fa84d
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
2 changed files with 9 additions and 5 deletions

View File

@ -537,7 +537,7 @@ class Parsedown
'name' => 'li',
'handler' => [
'function' => 'li',
'argument' => !empty($matches[3]) ? Lines::fromTextLines($matches[3], 0) : Lines::empty(),
'argument' => !empty($matches[3]) ? Lines::fromTextLines($matches[3], 0) : Lines::none(),
'destination' => 'elements'
]
];

View File

@ -40,7 +40,7 @@ final class Lines
}
/** @return self */
public static function empty()
public static function none()
{
return new self([], 0);
}
@ -94,7 +94,7 @@ final class Lines
}
/** @return bool */
public function containsBlankLines(): bool
public function containsBlankLines()
{
return $this->containsBlankLines;
}
@ -122,8 +122,12 @@ final class Lines
return $Lines;
}
/** @return Lines */
public function appendingTextLines(string $text, int $indentOffset)
/**
* @param string $text
* @param int $indentOffset
* @return Lines
*/
public function appendingTextLines($text, $indentOffset)
{
$Lines = clone($this);