File tree Expand file tree Collapse file tree 3 files changed +7
-248
lines changed
Expand file tree Collapse file tree 3 files changed +7
-248
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33namespace Odan \Validation \Test ;
44
5- use Odan \Validation \ServiceResult ;
65use Odan \Validation \ValidationException ;
76use 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 }
You can’t perform that action at this time.
0 commit comments