for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the league/commonmark package.
*
* (c) Colin O'Dell <[email protected]>
* Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
* - (c) John MacFarlane
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\CommonMark\Node\Block;
use League\CommonMark\Parser\Cursor;
use League\CommonMark\Reference\ReferenceMap;
use League\CommonMark\Reference\ReferenceMapInterface;
class Document extends AbstractBlock
{
/**
* @var ReferenceMapInterface
* @psalm-readonly
protected $referenceMap;
public function __construct(?ReferenceMapInterface $referenceMap = null)
parent::__construct();
$this->setStartLine(1);
$this->referenceMap = $referenceMap ?? new ReferenceMap();
}
public function getReferenceMap(): ReferenceMapInterface
return $this->referenceMap;
public function canContain(AbstractBlock $block): bool
$block
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function canContain(/** @scrutinizer ignore-unused */ AbstractBlock $block): bool
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return true;
public function isCode(): bool
return false;
public function matchesNextLine(Cursor $cursor): bool
$cursor
public function matchesNextLine(/** @scrutinizer ignore-unused */ Cursor $cursor): bool
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.