Skip to content

Commit d541ba5

Browse files
author
Daniel Opitz
committed
Removed ServiceResult
1 parent 62f2b07 commit d541ba5

File tree

3 files changed

+7
-248
lines changed

3 files changed

+7
-248
lines changed

src/Validation/ServiceResult.php

Lines changed: 0 additions & 166 deletions
This file was deleted.

tests/ServiceResultTest.php

Lines changed: 0 additions & 74 deletions
This file was deleted.

tests/TestService.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Odan\Validation\Test;
44

5-
use Odan\Validation\ServiceResult;
65
use Odan\Validation\ValidationException;
76
use Odan\Validation\ValidationResult;
87

@@ -18,9 +17,9 @@ class TestService
1817
*
1918
* @throws ValidationException
2019
*
21-
* @return ServiceResult Result data
20+
* @return array Result data
2221
*/
23-
public function process(int $id): ServiceResult
22+
public function process(int $id): array
2423
{
2524
$validation = new ValidationResult();
2625

@@ -34,11 +33,11 @@ public function process(int $id): ServiceResult
3433
throw new ValidationException($validation);
3534
}
3635

37-
$result = new ServiceResult();
38-
$result->setSuccess(true);
39-
$result->setMessage('Successfully');
40-
$result->setCode(0);
41-
$result->setData(['foo' => 'value']);
36+
$result = [];
37+
$result['success'] = true;
38+
$result['message'] = 'Successfully';
39+
$result['code'] = 0;
40+
$result['data']['foo'] = 'value';
4241

4342
return $result;
4443
}

0 commit comments

Comments
 (0)