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

More keyword fixes for pre-PHP7

This commit is contained in:
Aidan Woods 2019-01-25 20:02:04 +00:00
parent 2618509cc6
commit 5e7fb61879
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
3 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ final class BlockTypes implements Configurable
* @param string $marker * @param string $marker
* @return class-string<Block>[] * @return class-string<Block>[]
*/ */
public function for($marker) public function get($marker)
{ {
if (isset($this->blockTypes[$marker])) { if (isset($this->blockTypes[$marker])) {
return $this->blockTypes[$marker]; return $this->blockTypes[$marker];

View File

@ -63,7 +63,7 @@ final class InlineTypes implements Configurable
* @param string $marker * @param string $marker
* @return class-string<Inline>[] * @return class-string<Inline>[]
*/ */
public function for($marker) public function get($marker)
{ {
if (isset($this->inlineTypes[$marker])) { if (isset($this->inlineTypes[$marker])) {
return $this->inlineTypes[$marker]; return $this->inlineTypes[$marker];

View File

@ -104,7 +104,7 @@ final class Parsedown
$potentialBlockTypes = \array_merge( $potentialBlockTypes = \array_merge(
$this->State->get(BlockTypes::class)->unmarked(), $this->State->get(BlockTypes::class)->unmarked(),
$this->State->get(BlockTypes::class)->for($marker) $this->State->get(BlockTypes::class)->get($marker)
); );
foreach ($potentialBlockTypes as $blockType) { foreach ($potentialBlockTypes as $blockType) {
@ -186,7 +186,7 @@ final class Parsedown
) { ) {
$marker = \substr($Excerpt->text(), 0, 1); $marker = \substr($Excerpt->text(), 0, 1);
foreach ($InlineTypes->for($marker) as $inlineType) { foreach ($InlineTypes->get($marker) as $inlineType) {
# check to see if the current inline type is nestable in the current context # check to see if the current inline type is nestable in the current context
$Inline = $inlineType::build($Excerpt, $this->State); $Inline = $inlineType::build($Excerpt, $this->State);