Fix warnings and errors reported by Scrutinizer
This commit is contained in:
@ -38,15 +38,8 @@ class LinkRenderer implements InlineRendererInterface, ConfigurationAwareInterfa
|
||||
*/
|
||||
public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer)
|
||||
{
|
||||
// This can't be in the method type as
|
||||
// the method is an abstract and should
|
||||
// have the same interface
|
||||
if (!$inline instanceof Link) {
|
||||
throw new \RuntimeException(
|
||||
'Wrong type passed to ' . __CLASS__ . '::' . __METHOD__ .
|
||||
" the expected type was 'League\\CommonMark\\Inline\\Element\\Link' but '" .
|
||||
get_class($inline) . "' was provided"
|
||||
);
|
||||
if (!($inline instanceof Link)) {
|
||||
throw new \InvalidArgumentException('Incompatible inline type: ' . \get_class($inline));
|
||||
}
|
||||
|
||||
$element = $this->parent->render($inline, $htmlRenderer);
|
||||
|
Reference in New Issue
Block a user