Ignore testing coverage in console commands and exceptions

This commit is contained in:
Matt Young 2025-07-02 23:06:41 -05:00
parent 471fe11570
commit bd14c10b93
8 changed files with 26 additions and 7 deletions

View File

@ -5,6 +5,9 @@ namespace App\Console\Commands;
use App\Actions\Tabulation\ForceRecalculateTotalScores; use App\Actions\Tabulation\ForceRecalculateTotalScores;
use Illuminate\Console\Command; use Illuminate\Console\Command;
/**
* @codeCoverageIgnore
*/
class RecalculateScores extends Command class RecalculateScores extends Command
{ {
/** /**

View File

@ -6,6 +6,9 @@ use App\Models\Doubler;
use App\Models\Event; use App\Models\Event;
use Illuminate\Console\Command; use Illuminate\Console\Command;
/**
* @codeCoverageIgnore
*/
class SyncDoublers extends Command class SyncDoublers extends Command
{ {
/** /**

View File

@ -8,6 +8,9 @@ use App\Models\User;
use Faker\Factory; use Faker\Factory;
use Illuminate\Console\Command; use Illuminate\Console\Command;
/**
* @codeCoverageIgnore
*/
class fictionalize extends Command class fictionalize extends Command
{ {
/** /**

View File

@ -6,5 +6,5 @@ use Exception;
class AuditionServiceException extends Exception class AuditionServiceException extends Exception
{ {
// //TODO: Fully depricate this class
} }

View File

@ -1,19 +1,24 @@
<?php <?php
namespace App\Exceptions; namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable; use Throwable;
use App\Exceptions\TabulationException;
/**
* @codeCoverageIgnore
*/
//TODO: Fully depricate this class
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
public function render($request, Throwable $e) public function render($request, Throwable $e)
{ {
if ($e instanceof TabulationException) { if ($e instanceof TabulationException) {
dd('here'); dd('here');
return redirect('/tabulation/status')->with('warning', $e->getMessage()); return redirect('/tabulation/status')->with('warning', $e->getMessage());
} }
return parent::render($request, $e); return parent::render($request, $e);
} }
} }

View File

@ -6,4 +6,5 @@ use Exception;
class ManageEntryException extends Exception class ManageEntryException extends Exception
{ {
//TODO: Fully depricate this class
} }

View File

@ -6,5 +6,5 @@ use Exception;
class ScoreEntryException extends Exception class ScoreEntryException extends Exception
{ {
// //TODO: Fully depricate this class
} }

View File

@ -3,20 +3,24 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Exception;
use Throwable;
use function dd; use function dd;
use function redirect; use function redirect;
/**
* @codeCoverageIgnore
*/
class TabulationException extends Exception class TabulationException extends Exception
{ {
public function report(): void public function report(): void
{ {
// //TODO: Fully depricate this class
} }
public function render($request) public function render($request)
{ {
dd('in the render'); dd('in the render');
return redirect('/tabulation/status')->with('error', $this->getMessage());
return redirect('/tabulation/status')->with('error', $this->getMessage());
} }
} }