Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored and github-actions[bot] committed Feb 9, 2023
1 parent c67e8ee commit 166ae0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/PermissionRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ private function hydrateRolesCache()
$this->permissions['roles'] = [];
}

public static function isUid($value){
public static function isUid($value)
{
if (! is_string($value) || empty(trim($value))) {
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions tests/PermissionRegistarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function it_can_check_uids()
'01GRVB3DRESRM2K9AVQSW1JCKA',
'01GRVB3DRES5CQ31PB24MP4CSV',
];

$not_uids = [
'9be37b52-e1fa',
'9be37b52-e1fa-4e86',
Expand All @@ -39,11 +39,11 @@ public function it_can_check_uids()
'00-00-00-00-00-00',
'91GRVB3DRES5CQ31PB24MP4CSV',
];

foreach ($uids as $uid) {
$this->assertTrue(PermissionRegistrar::isUid($uid));
}
}

foreach ($not_uids as $not_uid) {
$this->assertFalse(PermissionRegistrar::isUid($not_uid));
}
Expand Down

0 comments on commit 166ae0c

Please sign in to comment.