Skip to content

Commit

Permalink
Merge pull request #280 from jun-taniai/patch-1
Browse files Browse the repository at this point in the history
Fix BeforePolicyInterface docs
  • Loading branch information
dereuromark authored Feb 6, 2024
2 parents 10739f4 + df1bedd commit 819b496
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/en/policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ in your policy::

class ArticlesPolicy implements BeforePolicyInterface
{
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
{
if ($user->getOriginalData()->is_admin) {
if ($identity->getOriginalData()->is_admin) {
return true;
}
// fall through
Expand Down
4 changes: 2 additions & 2 deletions docs/es/policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ en su policy::

class ArticlesPolicy implements BeforePolicyInterface
{
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
{
if ($user->getOriginalData()->is_admin) {
if ($identity->getOriginalData()->is_admin) {
return true;
}
// fall through
Expand Down
4 changes: 2 additions & 2 deletions docs/fr/policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ policy doit implémenter ``BeforePolicyInterface``::

class ArticlesPolicy implements BeforePolicyInterface
{
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
{
if ($user->getOriginalData()->is_admin) {
if ($identity->getOriginalData()->is_admin) {
return true;
}
// continuer
Expand Down
4 changes: 2 additions & 2 deletions docs/ja/policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ ORMオブジェクトのポリシーを作成するには ``bake`` コマンド

class ArticlesPolicy implements BeforePolicyInterface
{
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
{
if ($user->getOriginalData()->is_admin) {
if ($identity->getOriginalData()->is_admin) {
return true;
}
// fall through
Expand Down

0 comments on commit 819b496

Please sign in to comment.