Skip to content

Commit d438953

Browse files
OrkhanAlikhanovbarryvdh
authored andcommitted
Allow non-Authenticatable gate users (barryvdh#895)
1 parent 94a12a5 commit d438953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DataCollector/GateCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ public function __construct(Gate $gate)
2020
{
2121
parent::__construct('gate');
2222
$this->setDataFormatter(new SimpleFormatter());
23-
$gate->after(function (Authenticatable $user = null, $ability, $result, $arguments = []) {
23+
$gate->after(function ($user = null, $ability, $result, $arguments = []) {
2424
$this->addCheck($user, $ability, $result, $arguments);
2525
});
2626
}
2727

28-
public function addCheck(Authenticatable $user = null, $ability, $result, $arguments = [])
28+
public function addCheck($user = null, $ability, $result, $arguments = [])
2929
{
3030
$userKey = 'user';
3131
$userId = null;

0 commit comments

Comments
 (0)