Skip to content

Commit

Permalink
Fix Phan suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
kberzinch committed Feb 12, 2025
1 parent 2cb6cd0 commit 1e23e5d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
'PhanInvalidFQSENInCallable',
'PhanPartialTypeMismatchReturn',
'PhanPossiblyFalseTypeArgumentInternal',
'PhanPossiblyUndeclaredMethod',
'PhanReadOnlyProtectedProperty',
'PhanTypeSuspiciousStringExpression',
'PhanUndeclaredClassMethod',
'PhanUndeclaredFunctionInCallable',
'PhanUndeclaredMethod',
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/SyncController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function sync(Request $request): JsonResponse
$lastRequest['clickup_id'] === $request->clickup_id;

if ($same) {
// @phan-suppress-next-line PhanPartialTypeMismatchArgumentInternal
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
if (! in_array($request->model_event, config('apiary.whitelisted_events'), true)) {
Log::info(
self::class.': Not syncing '.$request->username.' as it is a duplicate of last seen event'
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/SyncClickUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function handle(): void
}

foreach ($this->teams as $team) {
// @phan-suppress-next-line PhanPartialTypeMismatchArgumentInternal
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
if (! array_key_exists($team, config('clickup.teams_to_spaces'))) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions app/Jobs/SyncGoogleGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
/**
* Execute the job.
*
* @phan-suppress PhanPartialTypeMismatchArgument
* @phan-suppress PhanTypeMismatchArgument
* @phan-suppress PhanUndeclaredClassProperty
*/
public function handle(): void
Expand Down Expand Up @@ -138,7 +138,7 @@ private function getAllGroups(): Collection

return $teams->filter(
static fn (object $team): bool => $team->google_group !== null
// @phan-suppress-next-line PhanPartialTypeMismatchArgumentInternal
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
&& ! in_array($team->google_group, config('google.manual_groups'), true)
)->mapWithKeys(
static fn (object $team): array => [$team->name => $team->google_group]
Expand Down
2 changes: 0 additions & 2 deletions app/Jobs/SyncKeycloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ protected function __construct(

/**
* Execute the job.
*
* @phan-suppress PhanTypeSuspiciousStringExpression
*/
public function handle(): void
{
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/SyncSUMS.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function __construct(
public function handle(): void
{
if (
// @phan-suppress-next-line PhanPartialTypeMismatchArgumentInternal
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
in_array($this->username, config('sums.whitelisted_accounts'), true) &&
($this->is_access_active === false)
) {
Expand Down
4 changes: 3 additions & 1 deletion app/Providers/HorizonServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function boot(): void
parent::boot();

if (config('horizon.master_supervisor_name') !== null) {
// @phan-suppress-next-line PhanTypeMismatchReturn
MasterSupervisor::determineNameUsing(static fn (): string => config('horizon.master_supervisor_name'));
}
}
Expand All @@ -36,10 +37,11 @@ protected function gate(): void

/**
* Register any application services.
*
* @phan-suppress PhanTypeMismatchArgument
*/
public function register(): void
{
// @phan-suppress-next-line PhanPartialTypeMismatchArgument
Horizon::routeSlackNotificationsTo(config('slack.endpoint'));
}
}
2 changes: 1 addition & 1 deletion app/Services/GitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ private static function getInstallationToken(): string
/**
* Generate a new JWT to authenticate to the API as the GitHub App.
*
* @phan-suppress PhanPartialTypeMismatchArgument
* @phan-suppress PhanTypeMismatchArgument
*/
private static function generateJWT(): string
{
Expand Down

0 comments on commit 1e23e5d

Please sign in to comment.