style: prefix global PHP classes with backslash instead of importing them

This commit is contained in:
Jérémy Munsch 2026-10-03 10:01:56 +02:00
parent da0b32c7ee
commit 15e729cbe2
No known key found for this signature in database
GPG key ID: 2AAECDA6B7330F91
7 changed files with 7 additions and 18 deletions

View file

@ -4,9 +4,7 @@ declare(strict_types=1);
namespace App\Exceptions\Crm;
use Exception;
class CrmAuthenticationFailedException extends Exception
class CrmAuthenticationFailedException extends \Exception
{
/** @phpcs:disable */
public function __construct(string $message = 'CRM Authentication failed')

View file

@ -4,9 +4,7 @@ declare(strict_types=1);
namespace App\Exceptions\Crm;
use Exception;
class CrmCustomerExistsException extends Exception
class CrmCustomerExistsException extends \Exception
{
/** @phpcs:disable */
public function __construct(string $message = 'CRM Customer already exists')

View file

@ -4,9 +4,7 @@ declare(strict_types=1);
namespace App\Exceptions\Crm;
use Exception;
class CrmCustomerNotActivatedException extends Exception
class CrmCustomerNotActivatedException extends \Exception
{
/** @phpcs:disable */
public function __construct(string $message = 'CRM Customer is not activated')

View file

@ -4,8 +4,6 @@ declare(strict_types=1);
namespace App\Exceptions;
use Exception;
class CustomerNotEmployedException extends Exception
class CustomerNotEmployedException extends \Exception
{
}

View file

@ -5,7 +5,6 @@ declare(strict_types=1);
namespace App\Http\Requests\Fo\Auth;
use App\Rules\Adult;
use DateTimeImmutable;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\Password;
@ -46,7 +45,7 @@ class RegisterRequest extends FormRequest
'email' => $this->string('email')->value(),
'password' => $this->string('password')->value(),
'optin' => $this->boolean('optin'),
'birth_date' => DateTimeImmutable::createFromFormat(
'birth_date' => \DateTimeImmutable::createFromFormat(
'Y-m-d',
$this->string('birth_date')->value()
) ?: throw new \InvalidArgumentException('Invalid birth date format'),

View file

@ -7,7 +7,6 @@ namespace App\Lib\Helpers;
use Sentry\Event;
use Sentry\ExceptionDataBag;
use Sentry\Stacktrace;
use Throwable;
/**
* Provides utilities to sanitize and anonymize exceptions before reporting to Sentry.
@ -111,7 +110,7 @@ class ExceptionsHelper
/**
* Anonymize standard PHP stack trace.
*/
public static function getAnonymizedStackTrace(Throwable $e): string
public static function getAnonymizedStackTrace(\Throwable $e): string
{
$projectPath = realpath(app_path('../')) ?: '';
$traceStr = '';

View file

@ -10,7 +10,6 @@ use App\Interfaces\ModelWithStatus;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\DB;
use Illuminate\Validation\ValidationException;
use Throwable;
use UnexpectedValueException;
/**
@ -85,7 +84,7 @@ trait HasMassActions
});
} catch (ValidationException $e) {
throw $e;
} catch (Throwable) {
} catch (\Throwable) {
return back()->with('error', trans('crud.messages.cannot_be_updated'));
}
}