Issues (36)

src/Builder/HeadingBuilder.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DH\Adf\Builder;
6
7
use DH\Adf\Node\Block\Heading;
8
9
trait HeadingBuilder
10
{
11
    use BuilderInterface;
12
13
    public function heading(int $level): Heading
14
    {
15
        $block = new Heading($level, $this);
0 ignored issues
show
$this of type DH\Adf\Builder\HeadingBuilder is incompatible with the type DH\Adf\Node\BlockNode|null expected by parameter $parent of DH\Adf\Node\Block\Heading::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

15
        $block = new Heading($level, /** @scrutinizer ignore-type */ $this);
Loading history...
16
        $this->append($block);
17
18
        return $block;
19
    }
20
}
21