[CORE][Event] Make all events return \EventResult, enforced at container build time

This commit is contained in:
2022-04-03 21:40:32 +01:00
parent aef1fac536
commit d4b7e990ce
60 changed files with 345 additions and 239 deletions

View File

@@ -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;