Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BBCodePlus/BBCodePlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function register() {
$this->name = plugin_lang_get( 'title' );
$this->description = plugin_lang_get( 'description' );
$this->page = 'config';
$this->version = '2.1.0';
$this->version = '2.1.1';

$this->requires['MantisCore'] = '2.0.0';
# this plugin can coexist with MantisCoreFormatting.
Expand Down
4 changes: 2 additions & 2 deletions BBCodePlus/core/BBCodeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ final class BBCodeParser extends Parser
],
];

public function stripTags(string $source): string
public function stripTags($source)
{
foreach ($this->parsers as $name => $parser) {
$source = $this->searchAndReplace($parser['pattern'] . 'i', $parser['content'], $source);
Expand All @@ -146,7 +146,7 @@ public function stripTags(string $source): string
return $source;
}

public function parse(string $source, $caseInsensitive = null): string
public function parse($source, $caseInsensitive = null)
{
$caseInsensitive = $caseInsensitive === self::CASE_INSENSITIVE ? true : false;

Expand Down
2 changes: 1 addition & 1 deletion BBCodePlus/core/HTMLParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ final class HTMLParser extends Parser
],
];

public function parse(string $source): string
public function parse($source)
{
foreach ($this->parsers as $name => $parser) {
$source = $this->searchAndReplace($parser['pattern'], $parser['replace'], $source);
Expand Down
4 changes: 2 additions & 2 deletions BBCodePlus/core/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Parser

protected $parsers = [];

protected function searchAndReplace(string $pattern, string $replace, string $source): string
protected function searchAndReplace($pattern, $replace, $source)
{
while (preg_match($pattern, $source)) {
$source = preg_replace($pattern, $replace, $source);
Expand All @@ -39,7 +39,7 @@ public function except($except = null)
return $this;
}

public function addParser(string $name, string $pattern, string $replace, string $content)
public function addParser($name, $pattern, $replace, $content)
{
$this->parsers = array_merge($this->parsers, [
$name => [
Expand Down
Loading