Skip to content

Commit

Permalink
Added reason argument into the reject méthode
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Oct 30, 2023
1 parent 7d114fc commit 6cf4983
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
7 changes: 1 addition & 6 deletions src/NullRejection.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ public function initialize(): void
}

/** @param non-empty-array<mixed>|object $rejection */
public function reject(object|array $rejection, null|\Throwable $exception = null): void
{
// NOOP
}

public function rejectWithReason(Rejection $rejection): void
public function reject(object|array $rejection, null|\Throwable $exception = null, null|string $reason = null): void
{
// NOOP
}
Expand Down
12 changes: 0 additions & 12 deletions src/Rejection.php

This file was deleted.

4 changes: 1 addition & 3 deletions src/RejectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ interface RejectionInterface
public function initialize(): void;

/** @param non-empty-array<mixed>|object $rejection */
public function reject(object|array $rejection, null|\Throwable $exception = null): void;

public function rejectWithReason(Rejection $rejection): void;
public function reject(object|array $rejection, null|\Throwable $exception = null, null|string $reason = null): void;

public function teardown(): void;
}

0 comments on commit 6cf4983

Please sign in to comment.