• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

php-casbin / think-authz / 15025178114

14 May 2025 03:45PM UTC coverage: 92.667%. Remained the same
15025178114

push

github

web-flow
fix: delete without condition if cache disabled (#52)

1 of 1 new or added line in 1 file covered. (100.0%)

139 of 150 relevant lines covered (92.67%)

48.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/model/Rule.php
1
<?php
2

3
namespace tauthz\model;
4

5
use tauthz\traits\Configurable;
6
use think\Model;
7
use think\contract\Arrayable;
8

9
/**
10
 * Rule Model
11
 */
12
class Rule extends Model implements Arrayable
13
{
14
    use Configurable;
15

16
    protected $name;
17

18
    // 设置当前模型对应的完整数据表名称
19
    protected $table;
20

21
    // 设置当前模型的数据库连接
22
    protected $connection;
23

24
    // 默认主键
25
    protected $pk = 'id';
26

27
    /**
28
     * 设置字段信息
29
     *
30
     * @var array
31
     */
32
    protected $schema = [
33
        'id'    => 'int',
34
        'ptype' => 'string',
35
        'v0'    => 'string',
36
        'v1'    => 'string',
37
        'v2'    => 'string',
38
        'v3'    => 'string',
39
        'v4'    => 'string',
40
        'v5'    => 'string',
41
    ];
42
    /**
43
     * 架构函数
44
     * 
45
     * @param array|object $data 数据
46
     */
47
    public function __construct(array|object $data = [])
48
    {
49
        $this->connection = $this->config('database.connection') ?: '';
108✔
50
        $this->table = $this->config('database.rules_table');
108✔
51
        $this->name = $this->config('database.rules_name');
108✔
52

53
        parent::__construct($data);
108✔
54
    }
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc