From 0904e34525dca22f122a056ac5252f4c6883ddaf Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sat, 13 Mar 2021 17:15:50 -0500 Subject: [PATCH] Fix ModelPrivate docblocks --- framework/core/src/Extend/ModelPrivate.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/core/src/Extend/ModelPrivate.php b/framework/core/src/Extend/ModelPrivate.php index 197e77e13..b20bf34e7 100644 --- a/framework/core/src/Extend/ModelPrivate.php +++ b/framework/core/src/Extend/ModelPrivate.php @@ -14,7 +14,7 @@ use Flarum\Foundation\ContainerUtil; use Illuminate\Contracts\Container\Container; /** - * Some models, in particular Discussion and Post, are intended to + * Some models, in particular Discussion and CommentPost, are intended to * support a "private" mode, wherein they aren't visible unless some * criteria is met. This can be used to implement anything from * private discussions to post approvals. @@ -25,7 +25,7 @@ use Illuminate\Contracts\Container\Container; * `false`. Accordingly, this is only available for models with an `is_private` * field. * - * In Flarum core, the Discussion and Post models come with private support. + * In Flarum core, the Discussion and CommentPost models come with private support. * Core also contains visibility scopers that hide instances of these models * with `is_private = true` from queries. Extensions can register custom scopers * for these classes with the `viewPrivate` ability to grant access to view some @@ -37,7 +37,7 @@ class ModelPrivate implements ExtenderInterface private $checkers = []; /** - * @param string $modelClass The ::class attribute of the model you are applying scopers to. + * @param string $modelClass The ::class attribute of the model you are applying private checkers to. * This model must have a `is_private` field. */ public function __construct(string $modelClass) @@ -51,8 +51,7 @@ class ModelPrivate implements ExtenderInterface * @param callable|string $callback * * The callback can be a closure or invokable class, and should accept: - * - \Flarum\User\User $actor - * - \Illuminate\Database\Eloquent\Builder $query + * - \Flarum\Database\AbstractModel $instance: An instance of the model. * * It should return `true` if the model instance should be made private. *