| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | protected function getLogEntry(string $action, User $user, PdoDatabase $database): ?string |
||
| 20 | { |
||
| 21 | /** @var Log[] $logs */ |
||
| 22 | $logs = LogSearchHelper::get($database, null) |
||
| 23 | ->byAction($action) |
||
| 24 | ->byObjectType('User') |
||
| 25 | ->byObjectId($user->getId()) |
||
| 26 | ->limit(1) |
||
| 27 | ->fetch(); |
||
| 28 | |||
| 29 | if (count($logs) > 0) { |
||
| 30 | return $logs[0]->getComment(); |
||
| 31 | } |
||
| 32 | |||
| 33 | return null; |
||
| 34 | } |
||
| 35 | } |