Passed
Push — master ( f67d2d...65552c )
by Nico
17:17
created

Import::getBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php declare(strict_types=1);
2
/**
3
 * @author Nicolas CARPi <[email protected]>
4
 * @copyright 2024 Nicolas CARPi
5
 * @see https://www.elabftw.net Official website
6
 * @license AGPL-3.0
7
 * @package elabftw
8
 */
9
10
namespace Elabftw\AuditEvent;
11
12
use Elabftw\Enums\AuditCategory;
13
14
class Import extends AbstractAuditEvent
15
{
16
    public function __construct(int $requesterUserid, private int $count)
17
    {
18
        parent::__construct($requesterUserid, 0);
19
    }
20
21
    public function getBody(): string
22
    {
23
        return sprintf('User imported %d entries', $this->count);
24
    }
25
26
    public function getCategory(): int
27
    {
28
        return AuditCategory::Import->value;
29
    }
30
}
31