Skip to content

Commit 819b496

Browse files
authored
Merge pull request #280 from jun-taniai/patch-1
Fix BeforePolicyInterface docs
2 parents 10739f4 + df1bedd commit 819b496

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/en/policies.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ in your policy::
118118

119119
class ArticlesPolicy implements BeforePolicyInterface
120120
{
121-
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
121+
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
122122
{
123-
if ($user->getOriginalData()->is_admin) {
123+
if ($identity->getOriginalData()->is_admin) {
124124
return true;
125125
}
126126
// fall through

docs/es/policies.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ en su policy::
117117

118118
class ArticlesPolicy implements BeforePolicyInterface
119119
{
120-
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
120+
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
121121
{
122-
if ($user->getOriginalData()->is_admin) {
122+
if ($identity->getOriginalData()->is_admin) {
123123
return true;
124124
}
125125
// fall through

docs/fr/policies.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ policy doit implémenter ``BeforePolicyInterface``::
125125

126126
class ArticlesPolicy implements BeforePolicyInterface
127127
{
128-
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
128+
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
129129
{
130-
if ($user->getOriginalData()->is_admin) {
130+
if ($identity->getOriginalData()->is_admin) {
131131
return true;
132132
}
133133
// continuer

docs/ja/policies.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ ORMオブジェクトのポリシーを作成するには ``bake`` コマンド
111111

112112
class ArticlesPolicy implements BeforePolicyInterface
113113
{
114-
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
114+
public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
115115
{
116-
if ($user->getOriginalData()->is_admin) {
116+
if ($identity->getOriginalData()->is_admin) {
117117
return true;
118118
}
119119
// fall through

0 commit comments

Comments
 (0)