Skip to content

Commit aa3bbcb

Browse files
authored
Merge pull request #9 from prajapati-kaushik/5760-methods-protected-vs-private
fix: methods protected vs private #5760
2 parents 4c3f490 + a8a09fe commit aa3bbcb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Security/AuthorizationContextAwareTrait.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Graphael\Security;
46

@@ -10,7 +12,7 @@
1012

1113
trait AuthorizationContextAwareTrait
1214
{
13-
private function assertSameUsername(array $context, ?string $username): void
15+
protected function assertSameUsername(array $context, ?string $username): void
1416
{
1517
$this->assertGranted(
1618
$context,
@@ -20,13 +22,12 @@ private function assertSameUsername(array $context, ?string $username): void
2022
);
2123
}
2224

23-
private function assertGranted(
25+
protected function assertGranted(
2426
array $context,
2527
array $attributes,
2628
$subject = null,
2729
string $deniedMessage = 'Access Denied.'
28-
): void
29-
{
30+
): void {
3031
$checker = $context[Server::CONTEXT_AUTHORIZATION_KEY];
3132

3233
assert($checker instanceof AuthorizationCheckerInterface);

0 commit comments

Comments
 (0)