Commit 0565704
refactor(FileService): extract signRequestId validation to private method
Extracted the signRequestId type casting and validation logic from
mapSignerDetailsToSummary() into a dedicated private method
extractValidSignRequestId(). This improves code readability by:
- Removing inline validation comment (code is now self-documenting)
- Centralizing validation logic in a named method that clearly explains
the operation (extracting a valid ID or returning null)
- Making the validation testable and reusable
- Simplifying the main loop by delegating validation concern
The method name clearly conveys intent without requiring explanatory
comments. All 178 FileServiceTest assertions pass with no regressions.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent f677f07 commit 0565704
1 file changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
| 643 | + | |
| 644 | + | |
650 | 645 | | |
651 | 646 | | |
652 | 647 | | |
653 | 648 | | |
654 | | - | |
| 649 | + | |
655 | 650 | | |
656 | 651 | | |
657 | 652 | | |
| |||
669 | 664 | | |
670 | 665 | | |
671 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
672 | 685 | | |
673 | 686 | | |
674 | 687 | | |
| |||
0 commit comments