Lint PHP code psr-12, add GH action

This commit is contained in:
Julien Nahum
2024-02-23 11:54:12 +01:00
parent e85e4df7fe
commit 62971a2ef4
226 changed files with 2338 additions and 2144 deletions

View File

@@ -47,7 +47,7 @@ class Handler extends ExceptionHandler
public function report(Throwable $exception)
{
if ($this->shouldReport($exception) ) {
if ($this->shouldReport($exception)) {
if (app()->bound('sentry') && $this->sentryShouldReport($exception)) {
app('sentry')->captureException($exception);
Log::debug('Un-handled Exception: '.$exception->getMessage(), [
@@ -64,7 +64,7 @@ class Handler extends ExceptionHandler
public function render($request, Throwable $e)
{
if ($this->shouldReport($e) && !in_array(\App::environment(),['testing']) && config('logging.channels.slack.enabled')) {
if ($this->shouldReport($e) && ! in_array(\App::environment(), ['testing']) && config('logging.channels.slack.enabled')) {
Log::channel('slack')->error($e);
}
@@ -78,6 +78,7 @@ class Handler extends ExceptionHandler
return false;
}
}
return true;
}
}

View File

@@ -7,7 +7,7 @@ use Illuminate\Validation\ValidationException;
class VerifyEmailException extends ValidationException
{
/**
* @param \App\User $user
* @param \App\User $user
* @return static
*/
public static function forUser($user)

View File

@@ -14,7 +14,7 @@ class WorkspaceAlreadyExisting extends Exception
public function getErrorMessage()
{
$owner = $this->workspace->users()->first();
if (!$owner) {
if (! $owner) {
return 'A user already connected that workspace to another NotionForms account. You or the current workspace
owner must have a NotionForms Enterprise subscription for you to add this Notion workspace. Please upgrade
with an Enterprise subscription, or contact us to get help.';