mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-07 08:54:22 +01:00
Fix larastan issues
This commit is contained in:
parent
0ce5db371f
commit
71bc378212
@ -62,7 +62,7 @@ public function deleting(User $user) : bool
|
||||
|
||||
// Deleting user's twofaccounts icon
|
||||
$iconPathes = $user->twofaccounts->filter(function ($twofaccount, $key) {
|
||||
return $twofaccount->icon;
|
||||
return filled($twofaccount->icon);
|
||||
})->map(function ($twofaccount, $key) {
|
||||
return $twofaccount->icon;
|
||||
});
|
||||
|
@ -45,10 +45,10 @@ public static function assign($ids, User $user, ?Group $group = null) : void
|
||||
/**
|
||||
* Prepends the pseudo group named 'All' to a group collection
|
||||
*
|
||||
* @param Collection<int, Group> $groups
|
||||
* @return Collection<int, Group>
|
||||
* @param \Illuminate\Database\Eloquent\Collection<int, Group> $groups
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, Group>
|
||||
*/
|
||||
public static function prependTheAllGroup(Collection $groups, User $user) : Collection
|
||||
public static function prependTheAllGroup(Collection $groups, User $user)
|
||||
{
|
||||
$theAllGroup = new Group([
|
||||
'name' => __('commons.all'),
|
||||
@ -63,7 +63,7 @@ public static function prependTheAllGroup(Collection $groups, User $user) : Coll
|
||||
/**
|
||||
* Set owner of given groups
|
||||
*
|
||||
* @param Collection<int, Group> $groups
|
||||
* @param \Illuminate\Database\Eloquent\Collection<int, Group> $groups
|
||||
*/
|
||||
public static function setUser(Collection $groups, User $user) : void
|
||||
{
|
||||
|
@ -14,6 +14,7 @@
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use ParagonIE\ConstantTime\Base32;
|
||||
use TypeError;
|
||||
|
||||
class GoogleAuthMigrator extends Migrator
|
||||
{
|
||||
@ -76,8 +77,10 @@ public function migrate(mixed $migrationPayload) : Collection
|
||||
|
||||
/**
|
||||
* Encode into uppercase Base32
|
||||
*
|
||||
* @throws TypeError
|
||||
*/
|
||||
protected function toBase32(string $str)
|
||||
protected function toBase32(string $str) : string
|
||||
{
|
||||
return Base32::encodeUpper($str);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user