[CORE][Event] Make all events return \EventResult, enforced at container build time
This commit is contained in:
@@ -33,16 +33,17 @@ namespace Plugin\MarkdownNotes;
|
||||
|
||||
use App\Core\Event;
|
||||
use App\Core\Modules\Plugin;
|
||||
use EventResult;
|
||||
use Parsedown;
|
||||
|
||||
class MarkdownNotes extends Plugin
|
||||
{
|
||||
public function onPostingAvailableContentTypes(array &$types): bool
|
||||
public function onPostingAvailableContentTypes(array &$types): EventResult
|
||||
{
|
||||
$types['Markdown'] = 'text/markdown';
|
||||
return Event::next;
|
||||
}
|
||||
public function onRenderNoteContent($content, $content_type, &$rendered): bool
|
||||
public function onRenderNoteContent($content, $content_type, &$rendered): EventResult
|
||||
{
|
||||
if ($content_type !== 'text/markdown') {
|
||||
return Event::next;
|
||||
|
Reference in New Issue
Block a user