Skip to content

RegularParser now properly takes into account escaped tokens #83

RegularParser now properly takes into account escaped tokens

RegularParser now properly takes into account escaped tokens #83

Triggered via pull request January 23, 2026 20:43
@thundererthunderer
synchronize #120
issue119
Status Success
Total duration 4m 47s
Artifacts

test.yaml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 60 warnings
test (8.6, ubuntu-latest, true)
Process completed with exit code 255.
test (8.6, ubuntu-latest, true)
Process completed with exit code 2.
test (8.6, ubuntu-latest, true)
Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires vimeo/psalm >=5.0 -> satisfiable by vimeo/psalm[5.0.0, ..., 5.26.1, 6.0.0, ..., 6.14.3]. - vimeo/psalm[5.0.0, ..., 5.13.1] require php ^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 -> your php version (8.6.0-dev) does not satisfy that requirement. - vimeo/psalm[5.14.0, ..., 5.26.1] require php ^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 -> your php version (8.6.0-dev) does not satisfy that requirement. - vimeo/psalm[6.0.0, ..., 6.5.0] require php ~8.1.17 || ~8.2.4 || ~8.3.0 || ~8.4.0 -> your php version (8.6.0-dev) does not satisfy that requirement. - vimeo/psalm[6.5.1, ..., 6.13.1] require php ~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 -> your php version (8.6.0-dev) does not satisfy that requirement. - vimeo/psalm[6.14.0, ..., 6.14.3] require php ~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 || ~8.5.0 -> your php version (8.6.0-dev) does not satisfy that requirement.
test (8.0, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ public function __invoke(ShortcodeInterface $shortcode) { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="' . (string) $url . '">' . (string) $shortcode->getContent() . '</a>'; + return '<a href="' . $url . '">' . (string) $shortcode->getContent() . '</a>'; } }
test (8.0, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L35
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ }, array_keys($args)); /** @var string[] $values */ $values = array_values($args); - return str_replace($keys, $values, (string) $shortcode->getContent()); + return str_replace($keys, $values, $shortcode->getContent()); } }
test (8.0, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L33
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ return $delimiter . $key . $delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, (string) $shortcode->getContent()); } }
test (8.0, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ { $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:' . (string) $email . '">' . (string) $content . '</a>'; + return '<a href="mailto:' . (string) $email . '">' . $content . '</a>'; } }
test (8.0, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ { $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:' . (string) $email . '">' . (string) $content . '</a>'; + return '<a href="mailto:' . $email . '">' . (string) $content . '</a>'; } }
test (8.0, ubuntu-latest, false): src/Handler/DeclareHandler.php#L45
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ return $delimiter . $key . $delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, $content); }); } }
test (8.0, ubuntu-latest, false): src/Handler/DeclareHandler.php#L38
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ } $keys = array_keys($args); $name = array_shift($keys); - $content = (string) $shortcode->getContent(); + $content = $shortcode->getContent(); $delimiter = $this->delimiter; $this->handlers->add($name, function (ShortcodeInterface $shortcode) use($content, $delimiter) { $args = $shortcode->getParameters();
test (8.0, ubuntu-latest, false): src/EventContainer/EventContainer.php#L30
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ if (!\in_array($event, Events::getEvents(), true)) { throw new \InvalidArgumentException(sprintf('Unsupported event %s!', $event)); } - if (!array_key_exists($event, $this->listeners)) { + if (array_key_exists($event, $this->listeners)) { $this->listeners[$event] = array(); } $this->listeners[$event][] = $handler;
test (8.0, ubuntu-latest, false): src/Event/ReplaceShortcodesEvent.php#L33
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ public function __construct($text, array $replacements, $shortcode = null) { - if (null !== $shortcode && false === $shortcode instanceof ShortcodeInterface) { + if (null !== $shortcode && false === true) { throw new \LogicException('Parameter $shortcode must be an instance of ShortcodeInterface.'); } $this->shortcode = $shortcode;
test (8.0, ubuntu-latest, false): src/Event/FilterShortcodesEvent.php#L28
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ public function __construct(array $shortcodes, $parent = null) { - if (null !== $parent && false === $parent instanceof ProcessedShortcode) { + if (null !== $parent && false === true) { throw new \LogicException('Parameter $parent must be an instance of ProcessedShortcode.'); } $this->parent = $parent;
test (8.1, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ public function __invoke(ShortcodeInterface $shortcode) { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="' . (string) $url . '">' . (string) $shortcode->getContent() . '</a>'; + return '<a href="' . $url . '">' . (string) $shortcode->getContent() . '</a>'; } }
test (8.1, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L35
Escaped Mutant for Mutator "CastString": @@ @@ }, array_keys($args)); /** @var string[] $values */ $values = array_values($args); - return str_replace($keys, $values, (string) $shortcode->getContent()); + return str_replace($keys, $values, $shortcode->getContent()); } }
test (8.1, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L33
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ return $delimiter . $key . $delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, (string) $shortcode->getContent()); } }
test (8.1, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ { $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:' . (string) $email . '">' . (string) $content . '</a>'; + return '<a href="mailto:' . (string) $email . '">' . $content . '</a>'; } }
test (8.1, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ { $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:' . (string) $email . '">' . (string) $content . '</a>'; + return '<a href="mailto:' . $email . '">' . (string) $content . '</a>'; } }
test (8.1, ubuntu-latest, false): src/Handler/DeclareHandler.php#L45
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ return $delimiter . $key . $delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, $content); }); } }
test (8.1, ubuntu-latest, false): src/Handler/DeclareHandler.php#L38
Escaped Mutant for Mutator "CastString": @@ @@ } $keys = array_keys($args); $name = array_shift($keys); - $content = (string) $shortcode->getContent(); + $content = $shortcode->getContent(); $delimiter = $this->delimiter; $this->handlers->add($name, function (ShortcodeInterface $shortcode) use ($content, $delimiter) { $args = $shortcode->getParameters();
test (8.1, ubuntu-latest, false): src/EventContainer/EventContainer.php#L30
Escaped Mutant for Mutator "LogicalNot": @@ @@ if (!\in_array($event, Events::getEvents(), true)) { throw new \InvalidArgumentException(sprintf('Unsupported event %s!', $event)); } - if (!array_key_exists($event, $this->listeners)) { + if (array_key_exists($event, $this->listeners)) { $this->listeners[$event] = array(); } $this->listeners[$event][] = $handler;
test (8.1, ubuntu-latest, false): src/Event/ReplaceShortcodesEvent.php#L33
Escaped Mutant for Mutator "InstanceOf_": @@ @@ */ public function __construct($text, array $replacements, $shortcode = null) { - if (null !== $shortcode && false === $shortcode instanceof ShortcodeInterface) { + if (null !== $shortcode && false === true) { throw new \LogicException('Parameter $shortcode must be an instance of ShortcodeInterface.'); } $this->shortcode = $shortcode;
test (8.1, ubuntu-latest, false): src/Event/FilterShortcodesEvent.php#L28
Escaped Mutant for Mutator "InstanceOf_": @@ @@ */ public function __construct(array $shortcodes, $parent = null) { - if (null !== $parent && false === $parent instanceof ProcessedShortcode) { + if (null !== $parent && false === true) { throw new \LogicException('Parameter $parent must be an instance of ProcessedShortcode.'); } $this->parent = $parent;
test (8.2, ubuntu-latest, false): src/Handler/WrapHandler.php#L42
Escaped Mutant for Mutator "CastString": @@ @@ */ public function __invoke(ShortcodeInterface $shortcode) { - return $this->before.(string)$shortcode->getContent().$this->after; + return $this->before.$shortcode->getContent().$this->after; } }
test (8.2, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.(string)$url.'">'.$shortcode->getContent().'</a>'; } }
test (8.2, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.$url.'">'.(string)$shortcode->getContent().'</a>'; } }
test (8.2, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L35
Escaped Mutant for Mutator "CastString": @@ @@ /** @var string[] $values */ $values = array_values($args); - return str_replace($keys, $values, (string)$shortcode->getContent()); + return str_replace($keys, $values, $shortcode->getContent()); } }
test (8.2, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L33
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $delimiter = $this->delimiter; $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, (string)$shortcode->getContent()); }
test (8.2, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.(string)$email.'">'.$content.'</a>'; } }
test (8.2, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.$email.'">'.(string)$content.'</a>'; } }
test (8.2, ubuntu-latest, false): src/Handler/DeclareHandler.php#L45
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $args = $shortcode->getParameters(); $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, $content); });
test (8.2, ubuntu-latest, false): src/Handler/DeclareHandler.php#L38
Escaped Mutant for Mutator "CastString": @@ @@ } $keys = array_keys($args); $name = array_shift($keys); - $content = (string)$shortcode->getContent(); + $content = $shortcode->getContent(); $delimiter = $this->delimiter; $this->handlers->add($name, function(ShortcodeInterface $shortcode) use($content, $delimiter) {
test (8.2, ubuntu-latest, false): src/EventContainer/EventContainer.php#L30
Escaped Mutant for Mutator "LogicalNot": @@ @@ throw new \InvalidArgumentException(sprintf('Unsupported event %s!', $event)); } - if(!array_key_exists($event, $this->listeners)) { + if(array_key_exists($event, $this->listeners)) { $this->listeners[$event] = array(); }
test (8.3, ubuntu-latest, false): src/Handler/WrapHandler.php#L42
Escaped Mutant for Mutator "CastString": @@ @@ */ public function __invoke(ShortcodeInterface $shortcode) { - return $this->before.(string)$shortcode->getContent().$this->after; + return $this->before.$shortcode->getContent().$this->after; } }
test (8.3, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.(string)$url.'">'.$shortcode->getContent().'</a>'; } }
test (8.3, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.$url.'">'.(string)$shortcode->getContent().'</a>'; } }
test (8.3, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L35
Escaped Mutant for Mutator "CastString": @@ @@ /** @var string[] $values */ $values = array_values($args); - return str_replace($keys, $values, (string)$shortcode->getContent()); + return str_replace($keys, $values, $shortcode->getContent()); } }
test (8.3, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L33
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $delimiter = $this->delimiter; $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, (string)$shortcode->getContent()); }
test (8.3, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.(string)$email.'">'.$content.'</a>'; } }
test (8.3, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.$email.'">'.(string)$content.'</a>'; } }
test (8.3, ubuntu-latest, false): src/Handler/DeclareHandler.php#L45
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $args = $shortcode->getParameters(); $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, $content); });
test (8.3, ubuntu-latest, false): src/Handler/DeclareHandler.php#L38
Escaped Mutant for Mutator "CastString": @@ @@ } $keys = array_keys($args); $name = array_shift($keys); - $content = (string)$shortcode->getContent(); + $content = $shortcode->getContent(); $delimiter = $this->delimiter; $this->handlers->add($name, function(ShortcodeInterface $shortcode) use($content, $delimiter) {
test (8.3, ubuntu-latest, false): src/EventContainer/EventContainer.php#L30
Escaped Mutant for Mutator "LogicalNot": @@ @@ throw new \InvalidArgumentException(sprintf('Unsupported event %s!', $event)); } - if(!array_key_exists($event, $this->listeners)) { + if(array_key_exists($event, $this->listeners)) { $this->listeners[$event] = array(); }
test (8.4, ubuntu-latest, false): src/Handler/WrapHandler.php#L42
Escaped Mutant for Mutator "CastString": @@ @@ */ public function __invoke(ShortcodeInterface $shortcode) { - return $this->before.(string)$shortcode->getContent().$this->after; + return $this->before.$shortcode->getContent().$this->after; } }
test (8.4, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.(string)$url.'">'.$shortcode->getContent().'</a>'; } }
test (8.4, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.$url.'">'.(string)$shortcode->getContent().'</a>'; } }
test (8.4, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L35
Escaped Mutant for Mutator "CastString": @@ @@ /** @var string[] $values */ $values = array_values($args); - return str_replace($keys, $values, (string)$shortcode->getContent()); + return str_replace($keys, $values, $shortcode->getContent()); } }
test (8.4, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L33
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $delimiter = $this->delimiter; $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, (string)$shortcode->getContent()); }
test (8.4, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.(string)$email.'">'.$content.'</a>'; } }
test (8.4, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.$email.'">'.(string)$content.'</a>'; } }
test (8.4, ubuntu-latest, false): src/Handler/DeclareHandler.php#L45
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $args = $shortcode->getParameters(); $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, $content); });
test (8.4, ubuntu-latest, false): src/Handler/DeclareHandler.php#L38
Escaped Mutant for Mutator "CastString": @@ @@ } $keys = array_keys($args); $name = array_shift($keys); - $content = (string)$shortcode->getContent(); + $content = $shortcode->getContent(); $delimiter = $this->delimiter; $this->handlers->add($name, function(ShortcodeInterface $shortcode) use($content, $delimiter) {
test (8.4, ubuntu-latest, false): src/EventContainer/EventContainer.php#L30
Escaped Mutant for Mutator "LogicalNot": @@ @@ throw new \InvalidArgumentException(sprintf('Unsupported event %s!', $event)); } - if(!array_key_exists($event, $this->listeners)) { + if(array_key_exists($event, $this->listeners)) { $this->listeners[$event] = array(); }
test (8.5, ubuntu-latest, false): src/Handler/WrapHandler.php#L42
Escaped Mutant for Mutator "CastString": @@ @@ */ public function __invoke(ShortcodeInterface $shortcode) { - return $this->before.(string)$shortcode->getContent().$this->after; + return $this->before.$shortcode->getContent().$this->after; } }
test (8.5, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.(string)$url.'">'.$shortcode->getContent().'</a>'; } }
test (8.5, ubuntu-latest, false): src/Handler/UrlHandler.php#L24
Escaped Mutant for Mutator "CastString": @@ @@ { $url = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); - return '<a href="'.(string)$url.'">'.(string)$shortcode->getContent().'</a>'; + return '<a href="'.$url.'">'.(string)$shortcode->getContent().'</a>'; } }
test (8.5, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L35
Escaped Mutant for Mutator "CastString": @@ @@ /** @var string[] $values */ $values = array_values($args); - return str_replace($keys, $values, (string)$shortcode->getContent()); + return str_replace($keys, $values, $shortcode->getContent()); } }
test (8.5, ubuntu-latest, false): src/Handler/PlaceholderHandler.php#L33
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $delimiter = $this->delimiter; $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, (string)$shortcode->getContent()); }
test (8.5, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.(string)$email.'">'.$content.'</a>'; } }
test (8.5, ubuntu-latest, false): src/Handler/EmailHandler.php#L25
Escaped Mutant for Mutator "CastString": @@ @@ $email = null !== $shortcode->getBbCode() ? $shortcode->getBbCode() : $shortcode->getContent(); $content = $shortcode->getContent() === null ? $email : $shortcode->getContent(); - return '<a href="mailto:'.(string)$email.'">'.(string)$content.'</a>'; + return '<a href="mailto:'.$email.'">'.(string)$content.'</a>'; } }
test (8.5, ubuntu-latest, false): src/Handler/DeclareHandler.php#L45
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $args = $shortcode->getParameters(); $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); /** @var string[] $values */ - $values = array_values($args); + $values = $args; return str_replace($keys, $values, $content); });
test (8.5, ubuntu-latest, false): src/Handler/DeclareHandler.php#L38
Escaped Mutant for Mutator "CastString": @@ @@ } $keys = array_keys($args); $name = array_shift($keys); - $content = (string)$shortcode->getContent(); + $content = $shortcode->getContent(); $delimiter = $this->delimiter; $this->handlers->add($name, function(ShortcodeInterface $shortcode) use($content, $delimiter) {
test (8.5, ubuntu-latest, false): src/EventContainer/EventContainer.php#L30
Escaped Mutant for Mutator "LogicalNot": @@ @@ throw new \InvalidArgumentException(sprintf('Unsupported event %s!', $event)); } - if(!array_key_exists($event, $this->listeners)) { + if(array_key_exists($event, $this->listeners)) { $this->listeners[$event] = array(); }