1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 02:36:08 +02:00

Apply fixes from StyleCI (#1793)

[ci skip] [skip ci]
This commit is contained in:
Franz Liedke
2019-06-12 23:50:21 +02:00
committed by GitHub
parent 5e1680c458
commit 7f5bd1e96b
6 changed files with 12 additions and 12 deletions

View File

@@ -115,13 +115,13 @@ class User extends AbstractModel
parent::boot();
// Don't allow the root admin to be deleted.
static::deleting(function (User $user) {
static::deleting(function (self $user) {
if ($user->id == 1) {
throw new DomainException('Cannot delete the root admin');
}
});
static::deleted(function (User $user) {
static::deleted(function (self $user) {
$user->raise(new Deleted($user));
Notification::whereSubject($user)->delete();