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

miaoxing / admin / 7322929071

25 Dec 2023 04:02PM UTC coverage: 26.645% (-2.3%) from 28.897%
7322929071

push

github

twinh
ci: add PHP 8, remove PHP 7.2, 7.3

22 of 87 branches covered (0.0%)

162 of 608 relevant lines covered (26.64%)

2.74 hits per line

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

0.0
/src/Service/AdminLogModel.php
1
<?php
2

3
namespace Miaoxing\Admin\Service;
4

5
use Miaoxing\Admin\Metadata\AdminLogTrait;
6
use Miaoxing\Plugin\BaseModel;
7
use Miaoxing\Plugin\Model\HasAppIdTrait;
8
use Miaoxing\Plugin\Model\ModelTrait;
9
use Miaoxing\Plugin\Service\User;
10
use Miaoxing\Plugin\Service\UserModel;
11

12
/**
13
 * 后台管理日志
14
 */
15
class AdminLogModel extends BaseModel
16
{
17
    use AdminLogTrait;
18
    use HasAppIdTrait;
19
    use ModelTrait;
20

21
    /**
22
     * 记录后台操作日志
23
     *
24
     * @param string $description
25
     * @param UserModel|null $user
26
     * @svc
27
     */
28
    protected function log(string $description, UserModel $user = null)
29
    {
30
        $this->saveAttributes([
×
31
            'userId' => $user ? $user->id : User::id(),
×
32
            'description' => $description,
×
33
        ]);
×
34
    }
35
}
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