Commit b5c3c2d
authored
ext/date: reduce duplication in __wakeup() methods (php#15791)
The only difference between `DateTime::__wakeup()` and
`DateTimeImmutable::__wakeup()` is which class name is included in the error
message if the initialization from the data fails. Factor out a helper method
that is given the class name, and use it for both methods.1 parent b63db81 commit b5c3c2d
1 file changed
+12
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3021 | 3021 | | |
3022 | 3022 | | |
3023 | 3023 | | |
3024 | | - | |
3025 | | - | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
3026 | 3027 | | |
3027 | 3028 | | |
3028 | 3029 | | |
| |||
3035 | 3036 | | |
3036 | 3037 | | |
3037 | 3038 | | |
3038 | | - | |
| 3039 | + | |
3039 | 3040 | | |
3040 | 3041 | | |
3041 | 3042 | | |
3042 | 3043 | | |
3043 | 3044 | | |
3044 | 3045 | | |
3045 | | - | |
| 3046 | + | |
3046 | 3047 | | |
3047 | | - | |
3048 | | - | |
3049 | | - | |
3050 | | - | |
3051 | | - | |
3052 | | - | |
3053 | | - | |
3054 | | - | |
3055 | | - | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
3056 | 3051 | | |
3057 | | - | |
3058 | | - | |
3059 | | - | |
3060 | | - | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
3061 | 3056 | | |
3062 | 3057 | | |
3063 | 3058 | | |
| |||
0 commit comments