Skip to content

Commit

Permalink
Added success return to all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Dec 17, 2023
1 parent 2676480 commit 1fbbe59
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions app/Console/Commands/CleanUpActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ public function handle(): int
$activity->delete();
}
$this->info('Done.');

return Command::SUCCESS;
}
}
2 changes: 2 additions & 0 deletions app/Console/Commands/DiscordRoleSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ public function handle(): int
$discord_role->save();
}
$this->info('Discord roles synced.');

return Command::SUCCESS;
}
}
2 changes: 2 additions & 0 deletions app/Console/Commands/DiscordUserRoleSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ public function handle(): int
}
}
$this->info('Done!');

return Command::SUCCESS;
}
}
2 changes: 2 additions & 0 deletions app/Console/Commands/GiveSuperAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ public function handle(): int
$user->assignRole('super-admin');
$this->info('Super-Admin rights granted to '.$user->email);
}

return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion app/Console/Commands/ImportFromTumblr.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ public function handle(): int
$this->error($e->getMessage());
}

return 0;
return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion app/Console/Commands/NotifyGameUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function handle(): int
$this->info('No new update found to notify about.');
}

return 0;
return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion app/Console/Commands/PingAllServers.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function handle(): int
}
$this->info('All servers have been pinged.');

return 0;
return Command::SUCCESS;
}
}
4 changes: 2 additions & 2 deletions app/Console/Commands/PingServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function handle(): int
}

$starttime = microtime(true);
// supress error messages with @
// Suppress error messages with @
$connection = @fsockopen($server->host, $server->port, $errno, $errstr, 2);
$stoptime = microtime(true);
$ping = 0;
Expand All @@ -71,6 +71,6 @@ public function handle(): int
$server->save();
$this->info('Name: '.$server->name.' - Ping: '.$ping.'ms');

return 0;
return Command::SUCCESS;
}
}
3 changes: 3 additions & 0 deletions app/Console/Commands/SkinUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@ public function handle(): int
}
}
}
$this->info('All done!');

return Command::SUCCESS;
}
}
2 changes: 2 additions & 0 deletions app/Console/Commands/SyncGameVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,7 @@ public function handle(): int
$this->info('Updated or created release: '.$version->version);
}
$this->info('Done.');

return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion app/Console/Commands/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ public function handle(): int
$this->call('schedule-monitor:sync');
$this->info('Done.');

return 0;
return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion app/Console/Commands/UpdateLanguageFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ public function handle(): int
}
$this->info('Language files updated!');

return 0;
return Command::SUCCESS;
}
}

0 comments on commit 1fbbe59

Please sign in to comment.