Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/Console/Commands/Ping.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Ping extends Command

/**
* Execute the console command.
*
* @psalm-return 0|1
*/
public function handle(): int
{
Expand Down
2 changes: 2 additions & 0 deletions app/Exceptions/QuickBooksFault.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class QuickBooksFault extends Exception
{
/**
* Construct a new instance.
*
* @psalm-mutation-free
*/
public function __construct(IPPFault $fault)
{
Expand Down
5 changes: 5 additions & 0 deletions app/HorizonHealthCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class HorizonHealthCheck extends HealthCheck
*/
protected string $name = 'horizon';

/**
* Construct a new instance of this health check.
*
* @psalm-mutation-free
*/
public function __construct(private readonly MasterSupervisorRepository $supervisorRepository)
{
}
Expand Down
7 changes: 6 additions & 1 deletion app/Http/Controllers/EngagePurchaseRequestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public function update(EngagePurchaseRequest $purchaseRequest, UpdateEngagePurch
return response()->json($purchaseRequest);
}

/**
* Simplify the finance stage name.
*
* @psalm-pure
*/
private static function cleanFinanceStageName(string $input): string
{
if (str_contains($input, ':')) {
Expand Down Expand Up @@ -137,7 +142,7 @@ private static function getUserByEmailAddress(string $email): User

$result = Sentry::wrapWithChildSpan(
'ldap.get_user_by_username',
static fn (): array => Container::getDefaultConnection()
static fn (): array|\LdapRecord\Query\Collection => Container::getDefaultConnection()
->query()
->where('uid', '=', $parts[0])
->select('sn', 'givenName', 'primaryUid', 'mail')
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/WorkerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __invoke(UpsertWorker $request): JsonResponse
static function () use ($email): ?string {
$result = Sentry::wrapWithChildSpan(
'ldap.get_username_by_email',
static fn (): array => Container::getDefaultConnection()
static fn (): array|\LdapRecord\Query\Collection => Container::getDefaultConnection()
->query()
->where('mail', '=', $email)
->select('primaryUid')
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpdateEngagePurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UpdateEngagePurchaseRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpdateExpenseReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UpdateExpenseReport extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpdateExpenseReportLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UpdateExpenseReportLine extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UploadEngageAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UploadEngageAttachment extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UploadWorkdayAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UploadWorkdayAttachment extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpsertEngagePurchaseRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UpsertEngagePurchaseRequests extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpsertExpenseReports.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UpsertExpenseReports extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpsertExternalCommitteeMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ class UpsertExternalCommitteeMember extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -26,6 +28,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Requests/UpsertWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UpsertWorker extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @psalm-pure
*/
public function authorize(): bool
public function authorize(): true
{
return true;
}
Expand All @@ -20,6 +22,8 @@ public function authorize(): bool
* Get the validation rules that apply to the request.
*
* @return array<string, array<string>>
*
* @psalm-pure
*/
public function rules(): array
{
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/AttachAccessWorkdayPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class AttachAccessWorkdayPermission implements ShouldBeUnique, ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly User $user)
{
Expand Down Expand Up @@ -52,6 +54,8 @@ public function handle(): void

/**
* The unique ID of the job.
*
* @psalm-mutation-free
*/
public function uniqueId(): string
{
Expand Down
2 changes: 2 additions & 0 deletions app/Jobs/CancelExpensePayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class CancelExpensePayments implements ShouldBeUnique, ShouldQueue

/**
* Execute the job.
*
* @psalm-mutation-free
*/
public function handle(): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Jobs/GenerateThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class GenerateThumbnail implements ShouldBeUnique, ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly string $original_file_path)
{
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/MatchAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class MatchAttachment implements ShouldBeUnique, ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly Attachment $attachment)
{
Expand Down Expand Up @@ -73,6 +75,8 @@ public function handle(): void

/**
* The unique ID of the job.
*
* @psalm-mutation-free
*/
public function uniqueId(): string
{
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/MatchBankTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class MatchBankTransaction implements ShouldBeUnique, ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly BankTransaction $bankTransaction)
{
Expand Down Expand Up @@ -78,6 +80,8 @@ public function handle(): void

/**
* The unique ID of the job.
*
* @psalm-mutation-free
*/
public function uniqueId(): string
{
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/MatchExpenseReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class MatchExpenseReport implements ShouldBeUnique, ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly ExpenseReport $expenseReport)
{
Expand Down Expand Up @@ -106,6 +108,8 @@ static function (Attachment $attachment, int $key) use (&$engage_request_numbers

/**
* The unique ID of the job.
*
* @psalm-mutation-free
*/
public function uniqueId(): string
{
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/ProcessSensibleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class ProcessSensibleOutput implements ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly EmailRequest $emailRequest)
{
Expand Down Expand Up @@ -79,6 +81,8 @@ public function handle(): void
* Get a field value from Sensible or add a validation error to the array.
*
* @phan-suppress PhanTypeArraySuspiciousNullable
*
* @psalm-external-mutation-free
*/
private function getValueOrAddValidationError(string $field_name): string|float|int|null
{
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/SubmitEmailRequestToSensible.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class SubmitEmailRequestToSensible implements ShouldBeUnique, ShouldQueue

/**
* Create a new job instance.
*
* @psalm-mutation-free
*/
public function __construct(private readonly EmailRequest $emailRequest)
{
Expand Down Expand Up @@ -73,6 +75,8 @@ public function handle(): void

/**
* The unique ID of the job.
*
* @psalm-mutation-free
*/
public function uniqueId(): string
{
Expand Down
4 changes: 3 additions & 1 deletion app/Mail/EmailRequestProcessed.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class EmailRequestProcessed extends Mailable implements ShouldQueue
* Create a new message instance.
*
* @param array<string> $validation_errors
*
* @psalm-mutation-free
*/
public function __construct(public readonly EmailRequest $email, public readonly array $validation_errors)
{
Expand All @@ -33,7 +35,7 @@ public function __construct(public readonly EmailRequest $email, public readonly
/**
* Build the message.
*/
public function build(): self
public function build(): static
{
$this->to(config('services.treasurer_email_address'), config('services.treasurer_name'));

Expand Down
Loading