for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This is part of the webuni/commonmark-attributes-extension package.
*
* (c) Martin Hasoň <[email protected]>
* (c) Webuni s.r.o. <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webuni\CommonMark\AttributesExtension;
use League\CommonMark\Block\Element\AbstractBlock;
use League\CommonMark\ContextInterface;
use League\CommonMark\Cursor;
final class Attributes extends AbstractBlock
{
private $attributes;
public function __construct(array $attributes)
$this->attributes = $attributes;
}
public function getAttributes(): array
return $this->attributes;
public function canContain(AbstractBlock $block): bool
return false;
public function isCode(): bool
public function matchesNextLine(Cursor $cursor): bool
if ($cursor->isBlank()) {
$this->setLastLineBlank(true);
} else {
$this->setLastLineBlank(false);
public function shouldLastLineBeBlank(Cursor $cursor, int $currentLineNumber): bool
public function handleRemainingContents(ContextInterface $context, Cursor $cursor): void
$context
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$cursor
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.