File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,23 @@ public function __construct(
2727 ) {
2828 if ($ problemDetail instanceof \SimpleAsFuck \ApiToolkit \DataObject \Common \ProblemDetail) {
2929 $ problemDetail = new ProblemDetail (
30+ /** @phpstan-ignore-next-line */
3031 $ problemDetail ->type ,
32+ /** @phpstan-ignore-next-line */
3133 $ problemDetail ->status ,
34+ /** @phpstan-ignore-next-line */
3235 $ problemDetail ->title ,
36+ /** @phpstan-ignore-next-line */
3337 $ problemDetail ->detail ,
38+ /** @phpstan-ignore-next-line */
3439 $ problemDetail ->instance ,
3540 );
3641 }
3742
3843 if (is_int ($ problemDetail )) {
3944 $ code = $ problemDetail ;
4045 } else {
46+ /** @phpstan-ignore-next-line */
4147 $ code = $ problemDetail ->status ?? HttpCodes::HTTP_INTERNAL_SERVER_ERROR ;
4248 }
4349 $ this ->problemDetail = $ problemDetail ;
Original file line number Diff line number Diff line change @@ -21,19 +21,29 @@ public function toApi($transformed): \stdClass
2121 if ($ transformed ->getMessage () !== '' ) {
2222 $ responseData ['message ' ] = $ transformed ->getMessage ();
2323 }
24+ /** @phpstan-ignore-next-line */
2425 if ($ transformed ->getProblemDetail ()?->type !== null ) {
26+ /** @phpstan-ignore-next-line */
2527 $ responseData ['type ' ] = $ transformed ->getProblemDetail ()->type ;
2628 }
29+ /** @phpstan-ignore-next-line */
2730 if ($ transformed ->getProblemDetail ()?->title !== null ) {
31+ /** @phpstan-ignore-next-line */
2832 $ responseData ['title ' ] = $ transformed ->getProblemDetail ()->title ;
2933 }
34+ /** @phpstan-ignore-next-line */
3035 if ($ transformed ->getProblemDetail ()?->status !== null ) {
36+ /** @phpstan-ignore-next-line */
3137 $ responseData ['status ' ] = $ transformed ->getProblemDetail ()->status ;
3238 }
39+ /** @phpstan-ignore-next-line */
3340 if ($ transformed ->getProblemDetail ()?->detail !== null ) {
41+ /** @phpstan-ignore-next-line */
3442 $ responseData ['detail ' ] = $ transformed ->getProblemDetail ()->detail ;
3543 }
44+ /** @phpstan-ignore-next-line */
3645 if ($ transformed ->getProblemDetail ()?->instance !== null ) {
46+ /** @phpstan-ignore-next-line */
3747 $ responseData ['instance ' ] = $ transformed ->getProblemDetail ()->instance ;
3848 }
3949
You can’t perform that action at this time.
0 commit comments