Issues (109)

parser/PluginNode.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace dokuwiki\plugin\prosemirror\parser;
4
5
class PluginNode extends Node implements InlineNodeInterface
6
{
7
    protected $textNode;
8
9
    public function __construct($data, Node $parent, Node $previous = null)
10
    {
11
        $this->textNode = new TextNode($data['content'][0], $this, $previous);
12
    }
13
14
    public function toSyntax()
15
    {
16
        return $this->textNode->toSyntax();
17
    }
18
19
    /**
20
     * @param string $markType
21
     */
22
    public function increaseMark($markType)
23
    {
24
        return $this->textNode->increaseMark($markType);
0 ignored issues
show
Are you sure the usage of $this->textNode->increaseMark($markType) targeting dokuwiki\plugin\prosemir...extNode::increaseMark() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
25
    }
26
27
    public function getStartingNodeMarkScore($markType)
28
    {
29
        return $this->textNode->getStartingNodeMarkScore($markType);
30
    }
31
}
32