Code cleanup, no functional changes

This commit is contained in:
2023-06-27 19:39:11 +12:00
parent b70a36003a
commit ad36da0bb1
64 changed files with 466 additions and 438 deletions

View File

@@ -10,32 +10,32 @@ use App\Models\Address;
class AddressMerge extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'address:merge'
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'address:merge'
.' {src : Source Address}'
.' {dst : Destination Address}'
.' {--F|force : Force}'
.' {--I|ignore : Ignore different BBSes}'
.' {--d|dryrun : Dry Run}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Permanently remove a duplicate address';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Permanently remove a duplicate address';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$src = Address::withTrashed()->findOrfail($this->argument('src'));
$dst = Address::withTrashed()->findOrfail($this->argument('dst'));
@@ -126,6 +126,6 @@ class AddressMerge extends Command
}
}
return Command::SUCCESS;
}
}
return Command::SUCCESS;
}
}

View File

@@ -42,7 +42,7 @@ class CommBinkpReceive extends Command
$server->listen();
} catch (SocketException $e) {
if ($e->getMessage() == 'Can\'t accept connections: "Success"')
if ($e->getMessage() === 'Can\'t accept connections: "Success"')
Log::debug('Server Terminated');
else
Log::emergency('Uncaught Message: '.$e->getMessage());

View File

@@ -42,7 +42,7 @@ class CommEMSIReceive extends Command
$server->listen();
} catch (SocketException $e) {
if ($e->getMessage() == 'Can\'t accept connections: "Success"')
if ($e->getMessage() === 'Can\'t accept connections: "Success"')
Log::debug('Server Terminated');
else
Log::emergency('Uncaught Message: '.$e->getMessage());

View File

@@ -41,7 +41,7 @@ class CommZmodemReceive extends Command
$server->listen();
} catch (SocketException $e) {
if ($e->getMessage() == 'Can\'t accept connections: "Success"')
if ($e->getMessage() === 'Can\'t accept connections: "Success"')
Log::debug('Server Terminated');
else
Log::emergency('Uncaught Message: '.$e->getMessage());

View File

@@ -8,27 +8,27 @@ use Illuminate\Support\Facades\DB;
class FilesList extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'files:list';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'files:list';
/**
* The console command description.
*
* @var string
*/
protected $description = 'List files';
/**
* The console command description.
*
* @var string
*/
protected $description = 'List files';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$this->table([
'files.id' => 'ID',
'file' => 'Filename',
@@ -38,5 +38,5 @@ class FilesList extends Command
->cursor());
return Command::SUCCESS;
}
}
}
}

View File

@@ -8,27 +8,27 @@ use Illuminate\Support\Facades\Artisan;
class InitialSetup extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'initial:setup';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'initial:setup';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Initial Setup of DB';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Initial Setup of DB';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
Artisan::call('db:seed',['class'=>InitialSetupSeeder::class]);
}
}
}

View File

@@ -81,7 +81,7 @@ class ServerStart extends Command
$pid = pcntl_fork();
if ($pid == -1)
if ($pid === -1)
die('could not fork');
// We are the child
@@ -96,7 +96,7 @@ class ServerStart extends Command
$server->listen();
} catch (SocketException $e) {
if ($e->getMessage() == 'Can\'t accept connections: "Success"')
if ($e->getMessage() === 'Can\'t accept connections: "Success"')
Log::debug(sprintf('%s:! Server Terminated [%s]',self::LOGKEY,$item));
else
Log::emergency(sprintf('%s:! Uncaught Message: %s',self::LOGKEY,$e->getMessage()));

View File

@@ -8,32 +8,32 @@ use App\Jobs\TicProcess as Job;
class TicProcess extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tic:process'
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tic:process'
.' {file : TIC file}'
.' {domain? : Domain Name}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process a TIC file';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process a TIC file';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
// Dispatch job.
Job::dispatchSync($this->argument('file'),$this->argument('domain'));
return Command::SUCCESS;
}
}
return Command::SUCCESS;
}
}