From 9c2380130cba93080bb4d6aedf0c87619da1dd6b Mon Sep 17 00:00:00 2001 From: Tim Kliesch Date: Fri, 14 Oct 2022 08:54:25 +0200 Subject: [PATCH] Add PHPDoc to LaravelEntrustFacade This commit adds PHPDoc to the Facade in order to help with IDE inspections and autocomplete. --- src/Facades/LaravelEntrustFacade.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Facades/LaravelEntrustFacade.php b/src/Facades/LaravelEntrustFacade.php index deaa197..3e6f043 100644 --- a/src/Facades/LaravelEntrustFacade.php +++ b/src/Facades/LaravelEntrustFacade.php @@ -14,6 +14,15 @@ use Illuminate\Support\Facades\Facade; +/** + * @method static bool ability(array|string $roles, array|string $permissions, array $options = []) + * @method static bool can(string $permission, bool $requireAll = false) + * @method static bool canAndOwns(string|array $permission, Object $thing, array $options = []) + * @method static bool hasRole(string $role, bool $requireAll = false) + * @method static bool hasRoleAndOwns(string|array $role, Object $thing, array $options = []) + * @method static bool owns(Object $thing, string|null $foreignKeyName = null) + * @method static \Illuminate\Auth\UserInterface|null user() + */ class LaravelEntrustFacade extends Facade { /** @@ -25,4 +34,4 @@ protected static function getFacadeAccessor() { return 'laravel_entrust'; } -} \ No newline at end of file +}