[CORE][Event] Make all events return \EventResult, enforced at container build time
This commit is contained in:
@@ -23,22 +23,23 @@ declare(strict_types = 1);
|
||||
namespace Plugin\Blog;
|
||||
|
||||
use App\Core\Event;
|
||||
use function App\Core\I18n\_m;
|
||||
use App\Core\Modules\Plugin;
|
||||
use App\Core\Router;
|
||||
use App\Util\Common;
|
||||
use App\Util\HTML;
|
||||
use EventResult;
|
||||
use Plugin\Blog\Controller as C;
|
||||
use function App\Core\I18n\_m;
|
||||
|
||||
class Blog extends Plugin
|
||||
{
|
||||
public function onAddRoute(Router $r): bool
|
||||
public function onAddRoute(Router $r): EventResult
|
||||
{
|
||||
$r->connect(id: 'blog_post', uri_path: '/blog/post', target: [C\Post::class, 'makePost']);
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
public function onAppendCardProfile(array $vars, array &$res): bool
|
||||
public function onAppendCardProfile(array $vars, array &$res): EventResult
|
||||
{
|
||||
$actor = Common::actor();
|
||||
$group = $vars['actor'];
|
||||
|
Reference in New Issue
Block a user