Skip to content

Commit a47a4b2

Browse files
committed
feat: format 7.4 type
1 parent 966c990 commit a47a4b2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Model/RuleModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class RuleModel extends Model implements Arrayable
3939

4040
/**
4141
* 架构函数
42-
* @access public
43-
* @param array $data 数据
42+
* @param array $data
43+
* @param string|null $driver
4444
*/
4545
public function __construct(array $data = [], ?string $driver = null)
4646
{

src/Permission.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* @desc 描述
45
* @author Tinywan(ShaoBo Wan)
@@ -57,9 +58,9 @@ class Permission
5758
public static function client(?string $driver = null): Enforcer
5859
{
5960
$driver = $driver ?? config('plugin.casbin.webman-permission.permission.default');
60-
$config = config('plugin.casbin.webman-permission.permission.'.$driver);
61-
62-
if(isset(static::$_manager[$driver])){
61+
$config = config('plugin.casbin.webman-permission.permission.' . $driver);
62+
63+
if (isset(static::$_manager[$driver])) {
6364
return static::$_manager[$driver];
6465
}
6566

@@ -69,7 +70,7 @@ public static function client(?string $driver = null): Enforcer
6970
} elseif ('text' == $config['model']['config_type']) {
7071
$model->loadModel($config['model']['config_text']);
7172
}
72-
static::$_manager[$driver] = new Enforcer($model, Container::make($config['adapter'],[$driver]),false);
73+
static::$_manager[$driver] = new Enforcer($model, Container::make($config['adapter'], [$driver]), false);
7374

7475
$watcher = new RedisWatcher(config('redis.default'), $driver);
7576
static::$_manager[$driver]->setWatcher($watcher);
@@ -82,7 +83,6 @@ public static function client(?string $driver = null): Enforcer
8283
/**
8384
* @param $name
8485
* @param $arguments
85-
*
8686
* @return mixed
8787
* @throws CasbinException
8888
* @author Tinywan(ShaoBo Wan)

src/Watcher/RedisWatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class RedisWatcher implements Watcher
2222

2323
private Client $subRedis;
2424

25-
private $channel;
25+
private string $channel;
2626
/**
2727
* The config of Watcher.
2828
*

0 commit comments

Comments
 (0)