[CORE][Event] Make all events return \EventResult, enforced at container build time
This commit is contained in:
@@ -41,6 +41,7 @@ use App\Entity\Feed;
|
||||
use App\Entity\LocalUser;
|
||||
use App\Util\Nickname;
|
||||
use Component\Collection\Util\MetaCollectionTrait;
|
||||
use EventResult;
|
||||
use Plugin\AttachmentCollections\Controller\AttachmentCollections as AttachmentCollectionsController;
|
||||
use Plugin\AttachmentCollections\Entity\AttachmentCollection;
|
||||
use Plugin\AttachmentCollections\Entity\AttachmentCollectionEntry;
|
||||
@@ -122,7 +123,7 @@ class AttachmentCollections extends Plugin
|
||||
return array_map(fn ($x) => $x['attachment_collection_id'], $res);
|
||||
}
|
||||
|
||||
public function onAddRoute(Router $r): bool
|
||||
public function onAddRoute(Router $r): EventResult
|
||||
{
|
||||
// View all collections by actor id and nickname
|
||||
$r->connect(
|
||||
@@ -149,7 +150,7 @@ class AttachmentCollections extends Plugin
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
public function onCreateDefaultFeeds(int $actor_id, LocalUser $user, int &$ordering)
|
||||
public function onCreateDefaultFeeds(int $actor_id, LocalUser $user, int &$ordering): EventResult
|
||||
{
|
||||
DB::persist(Feed::create([
|
||||
'actor_id' => $actor_id,
|
||||
|
Reference in New Issue
Block a user