| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | declare( strict_types=1 ); |
| 9 | 9 | |
| 10 | - | |
| 11 | 10 | namespace Packetery\Core\Log; |
| 12 | 11 | |
| 13 | 12 | /** |
| 14 | 13 | * Interface ILogger |
| @@ -15,15 +14,9 @@ | ||
| 15 | 14 | * |
| 16 | 15 | * @package Packetery\Log |
| 17 | 16 | */ |
| 18 | 17 | interface ILogger { |
| 19 | - | |
| 20 | 18 | /** |
| 21 | - * Registers log driver. | |
| 22 | - */ | |
| 23 | - public function register(): void; | |
| 24 | - | |
| 25 | - /** | |
| 26 | 19 | * Adds log record. |
| 27 | 20 | * |
| 28 | 21 | * @param Record $record Record. |
| 29 | 22 | */ |
| @@ -31,23 +24,23 @@ | ||
| 31 | 24 | |
| 32 | 25 | /** |
| 33 | 26 | * Get logs. |
| 34 | 27 | * |
| 35 | - * @param mixed $orderId Order ID. | |
| 36 | - * @param string|null $action Action. | |
| 37 | - * @param array $sorting Sorting config. | |
| 38 | - * @param int $limit Limit. | |
| 28 | + * @param int|null $orderId Order ID. | |
| 29 | + * @param string|null $action Action. | |
| 30 | + * @param array<string, string> $sorting Sorting config. | |
| 31 | + * @param int $limit Limit. | |
| 39 | 32 | * |
| 40 | - * @return iterable | |
| 33 | + * @return iterable<Record> | |
| 41 | 34 | */ |
| 42 | - public function getRecords( $orderId, ?string $action, array $sorting = [], int $limit = 100 ): iterable; | |
| 35 | + public function getRecords( ?int $orderId, ?string $action, array $sorting = [], int $limit = 100 ): iterable; | |
| 43 | 36 | |
| 44 | 37 | /** |
| 45 | 38 | * Counts records. |
| 46 | 39 | * |
| 47 | - * @param mixed $orderId Order ID. | |
| 40 | + * @param int|null $orderId Order ID. | |
| 48 | 41 | * @param string|null $action Action. |
| 49 | 42 | * |
| 50 | 43 | * @return int |
| 51 | 44 | */ |
| 52 | - public function countRecords( $orderId = null, ?string $action = null): int; | |
| 45 | + public function countRecords( ?int $orderId = null, ?string $action = null ): int; | |
| 53 | 46 | } |