Skip to content

Commit ef3191d

Browse files
authored
Merge pull request #27 from akroa/main
php8.4 xx as nullable is deprecated
2 parents 56e7440 + c5618ff commit ef3191d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Model/LaravelRuleModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public function __construct(array $data = [], ?string $driver = null)
5959
*
6060
* @return mixed
6161
*/
62-
protected function config(string $key = null, $default = null)
62+
protected function config(?string $key = null, $default = null)
6363
{
6464
$driver = $this->driver ?? config('plugin.casbin.webman-permission.permission.default');
6565
return config('plugin.casbin.webman-permission.permission.' . $driver . '.' . $key, $default);
6666
}
67-
}
67+
}

src/Permission.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static function getDefaultDriver(): mixed
137137
* @return mixed
138138
* @author Tinywan(ShaoBo Wan)
139139
*/
140-
public static function getConfig(string $name = null, $default = null): mixed
140+
public static function getConfig(?string $name = null, $default = null): mixed
141141
{
142142
if (!is_null($name)) {
143143
return config('plugin.casbin.webman-permission.permission.' . $name, $default);

0 commit comments

Comments
 (0)