pull/7362/head
Your Name 5 days ago
parent 1379ae4019
commit b9a01b68f0

@ -60,7 +60,7 @@ class FixHashtags extends Command
if ($slug === $tag->slug) {
continue;
}
$count = Hashtag::whereName($tag->name)->where('slug', '===', $slug)->count();
$count = Hashtag::whereName($tag->name)->where('slug', '=', $slug)->count();
if (! $count) {
continue;
}
@ -70,8 +70,6 @@ class FixHashtags extends Command
$this->info('Found '.$count.' broken tags');
return;
$missingCount = StatusHashtag::doesntHave('profile')->doesntHave('status')->count();
if ($missingCount > 0) {
$this->info("Found {$missingCount} orphaned StatusHashtag records to delete ...");

@ -73,23 +73,15 @@ class UserDelete extends Command implements PromptsForMissingInput
return $u->username;
})
);
$user = Profile::whereUsername($user)->first();
$profile = Profile::whereUsername($user)->first();
if (! $user) {
if (! $profile) {
$this->error('Invalid id or username');
return;
}
$this->info($user->username);
return;
if (ctype_digit($id) === true) {
$user = User::find($id);
} else {
$user = User::whereUsername($id)->first();
}
$user = $profile->user_id ? User::find($profile->user_id) : null;
if (! $user) {
$this->error('Could not find any user with that username or id.');
@ -135,7 +127,6 @@ class UserDelete extends Command implements PromptsForMissingInput
exit;
}
return;
if ($user->status !== 'deleted') {
$profile = $user->profile;
$profile->status = $user->status = 'deleted';

@ -37,8 +37,8 @@ parameters:
path: app/Console/Commands/FixBugs/FixDuplicateProfiles.php
-
message: '#^Unreachable statement \- code above always terminates\.$#'
identifier: deadCode.unreachable
message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$scope\.$#'
identifier: property.notFound
count: 1
path: app/Console/Commands/FixBugs/FixHashtags.php
@ -133,14 +133,14 @@ parameters:
path: app/Console/Commands/User/UserCheckPassword.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse
message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$status\.$#'
identifier: property.notFound
count: 1
path: app/Console/Commands/User/UserDelete.php
-
message: '#^Unreachable statement \- code above always terminates\.$#'
identifier: deadCode.unreachable
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse
count: 1
path: app/Console/Commands/User/UserDelete.php

Loading…
Cancel
Save