refactor: people interfaces to unified design
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace KTXF\People\Provider;
|
||||
|
||||
use KTXF\Chrono\Service\ServiceMutableInterface;
|
||||
use KTXF\Mail\Service\ServiceBaseInterface;
|
||||
|
||||
/**
|
||||
@@ -20,6 +21,8 @@ use KTXF\Mail\Service\ServiceBaseInterface;
|
||||
*/
|
||||
interface ProviderServiceTestInterface {
|
||||
|
||||
public const CAPABILITY_SERVICE_TEST = 'ServiceTest';
|
||||
|
||||
/**
|
||||
* Test a service connection
|
||||
*
|
||||
@@ -27,7 +30,7 @@ interface ProviderServiceTestInterface {
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param ServiceBaseInterface $service Service to test (can be fresh/unsaved or existing)
|
||||
* @param ServiceBaseInterface|ServiceMutableInterface $service Service to test (can be fresh/unsaved or existing)
|
||||
* @param array $options Provider-specific test options:
|
||||
* - 'timeout' => int (seconds, default: 10)
|
||||
* - 'verify_ssl' => bool (default: true)
|
||||
@@ -36,10 +39,10 @@ interface ProviderServiceTestInterface {
|
||||
*
|
||||
* @return array Test results in the format:
|
||||
* [
|
||||
* 'success' => bool,
|
||||
* 'message' => 'Connection successful' | 'Error message'
|
||||
* 'disposition' => 'Success' | 'Failure' | 'Warning',
|
||||
* 'message' => 'Connection successful' | 'Error message',
|
||||
* ]
|
||||
*/
|
||||
public function serviceTest(ServiceBaseInterface $service, array $options = []): array;
|
||||
public function serviceTest(ServiceBaseInterface|ServiceMutableInterface $service, array $options = []): array;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user