From 1d3cb1124b70335621b8ea765c7218fda7734118 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 5 Sep 2023 13:50:51 -0500 Subject: [PATCH 1/3] Further docblock fixes Continues on #638 --- src/BouncerFacade.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/BouncerFacade.php b/src/BouncerFacade.php index 2652eb4..1b7e1da 100644 --- a/src/BouncerFacade.php +++ b/src/BouncerFacade.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade; -/** + /** * @method static \Silber\Bouncer\Conductors\GivesAbilities allow(\Illuminate\Database\Eloquent\Model|string $authority) * @method static \Silber\Bouncer\Conductors\GivesAbilities allowEveryone() * @method static \Silber\Bouncer\Conductors\RemovesAbilities disallow(\Illuminate\Database\Eloquent\Model|string $authority) @@ -20,9 +20,9 @@ * @method static \Silber\Bouncer\Contracts\Clipboard getClipboard() * @method static self setClipboard(\Silber\Bouncer\Contracts\Clipboard $clipboard) * @method static self registerClipboardAtContainer() - * @method static self cache(null|\Illuminate\Contracts\Cache\Store $cache) + * @method static self cache(null|\Illuminate\Contracts\Cache\Store $cache = null) * @method static self dontCache() - * @method static self refresh(null|\Illuminate\Database\Eloquent\Model $authority) + * @method static self refresh(null|\Illuminate\Database\Eloquent\Model $authority = null) * @method static self refreshFor(\Illuminate\Database\Eloquent\Model $authority) * @method static self setGate(\Illuminate\Contracts\Auth\Access\Gate $gate) * @method static \Illuminate\Contracts\Auth\Access\Gate|null getGate() @@ -35,16 +35,16 @@ * @method static bool cannot(string $ability, array|mixed $arguments = []) * @method static bool allows(string $ability, array|mixed $arguments = []) * @method static bool denies(string $ability, array|mixed $arguments = []) - * @method static \Silber\Bouncer\Database\Role role(array $attributes) - * @method static \Silber\Bouncer\Database\Ability ability(array $attributes) - * @method static self runBeforePolicies(bool $boolean) - * @method static self ownedVia(string|\Closure $model, string|\Closure|null $attribute) + * @method static \Silber\Bouncer\Database\Role role(array $attributes = []) + * @method static \Silber\Bouncer\Database\Ability ability(array $attributes = []) + * @method static self runBeforePolicies(bool $boolean = true) + * @method static self ownedVia(string|\Closure $model, string|\Closure|null $attribute = null) * @method static self useAbilityModel(string $model) * @method static self useRoleModel(string $model) * @method static self useUserModel(string $model) * @method static self tables(array $map) - * @method static mixed scope(null|\Silber\Bouncer\Contracts\Scope $scope) - * + * @method static mixed scope(null|\Silber\Bouncer\Contracts\Scope $scope = null) + * * @see \Silber\Bouncer\Bouncer */ class BouncerFacade extends Facade From 1e4f5c1e793869986b737f5c0f13e292b8de9922 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 5 Sep 2023 13:52:51 -0500 Subject: [PATCH 2/3] AssociatesAbilities::to accepts string --- src/Conductors/Concerns/AssociatesAbilities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Conductors/Concerns/AssociatesAbilities.php b/src/Conductors/Concerns/AssociatesAbilities.php index 53a91a9..559923e 100644 --- a/src/Conductors/Concerns/AssociatesAbilities.php +++ b/src/Conductors/Concerns/AssociatesAbilities.php @@ -13,7 +13,7 @@ trait AssociatesAbilities /** * Associate the abilities with the authority. * - * @param \Illuminate\Database\Eloquent\model|array|int $abilities + * @param \Illuminate\Database\Eloquent\model|array|int|string $abilities * @param \Illuminate\Database\Eloquent\Model|string|null $model * @param array $attributes * @return \Silber\Bouncer\Conductors\Lazy\ConductsAbilities|null From a10a58dbb5a9c2ddd8e57c2f29973217df591410 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 5 Sep 2023 13:54:07 -0500 Subject: [PATCH 3/3] Revert whitespace change --- src/BouncerFacade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BouncerFacade.php b/src/BouncerFacade.php index 1b7e1da..da66ddf 100644 --- a/src/BouncerFacade.php +++ b/src/BouncerFacade.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade; - /** +/** * @method static \Silber\Bouncer\Conductors\GivesAbilities allow(\Illuminate\Database\Eloquent\Model|string $authority) * @method static \Silber\Bouncer\Conductors\GivesAbilities allowEveryone() * @method static \Silber\Bouncer\Conductors\RemovesAbilities disallow(\Illuminate\Database\Eloquent\Model|string $authority)