This commit is contained in:
Paolo A
2024-08-13 13:44:16 +00:00
parent 1bbb23088d
commit e796d76612
4001 changed files with 30101 additions and 40075 deletions

View File

@@ -1,6 +1,8 @@
<?php
/**
declare(strict_types=1);
/*
* This file is part of the league/commonmark package.
*
* (c) Colin O'Dell <colinodell@gmail.com>
@@ -14,6 +16,8 @@
namespace League\CommonMark\Event;
use Psr\EventDispatcher\StoppableEventInterface;
/**
* Base class for classes containing event data.
*
@@ -23,10 +27,10 @@ namespace League\CommonMark\Event;
* You can call the method stopPropagation() to abort the execution of
* further listeners in your event listener.
*/
abstract class AbstractEvent
abstract class AbstractEvent implements StoppableEventInterface
{
/** @var bool */
private $propagationStopped = false;
/** @psalm-readonly-allow-private-mutation */
private bool $propagationStopped = false;
/**
* Returns whether further event listeners should be triggered.

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of the league/commonmark package.
*
@@ -11,15 +13,15 @@
namespace League\CommonMark\Event;
use League\CommonMark\Block\Element\Document;
use League\CommonMark\Node\Block\Document;
/**
* Event dispatched when the document has been fully parsed
*/
final class DocumentParsedEvent extends AbstractEvent
{
/** @var Document */
private $document;
/** @psalm-readonly */
private Document $document;
public function __construct(Document $document)
{

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of the league/commonmark package.
*
@@ -11,19 +13,18 @@
namespace League\CommonMark\Event;
use League\CommonMark\Block\Element\Document;
use League\CommonMark\Input\MarkdownInputInterface;
use League\CommonMark\Node\Block\Document;
/**
* Event dispatched when the document is about to be parsed
*/
final class DocumentPreParsedEvent extends AbstractEvent
{
/** @var Document */
private $document;
/** @psalm-readonly */
private Document $document;
/** @var MarkdownInputInterface */
private $markdown;
private MarkdownInputInterface $markdown;
public function __construct(Document $document, MarkdownInputInterface $markdown)
{