File tree 4 files changed +14
-11
lines changed
4 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ protected function buildWebArguments(RouterInterface $router): void
117
117
protected function isJsonRequest (): bool
118
118
{
119
119
return isset ($ _SERVER ['CONTENT_TYPE ' ])
120
- && stripos (( string ) $ _SERVER ['CONTENT_TYPE ' ], 'application/json ' ) !== false ;
120
+ && stripos ($ _SERVER ['CONTENT_TYPE ' ], 'application/json ' ) !== false ;
121
121
}
122
122
123
123
protected function buildInitialArguments (RouterInterface $ router ): void
Original file line number Diff line number Diff line change @@ -912,7 +912,7 @@ private function getFilteredMethodName(string $methodName): string
912
912
*/
913
913
protected function getCurrentRequestMethod (): string
914
914
{
915
- return !empty ($ _SERVER ['REQUEST_METHOD ' ]) ? ( string ) $ _SERVER ['REQUEST_METHOD ' ] : RequestMethod::GET ->value ;
915
+ return !empty ($ _SERVER ['REQUEST_METHOD ' ]) ? $ _SERVER ['REQUEST_METHOD ' ] : RequestMethod::GET ->value ;
916
916
}
917
917
918
918
}
Original file line number Diff line number Diff line change @@ -65,14 +65,17 @@ public function __construct(ConfigInterface $config)
65
65
/** @var bool $strictIp */
66
66
$ strictIp = $ config ->getSetting ('session.strictIp ' , false );
67
67
if ($ strictIp ) {
68
- if (isset ($ Feast ->ipAddress ) && $ Feast ->ipAddress !== (string )$ _SERVER ['REMOTE_ADDR ' ]) {
68
+ /** @psalm-suppress PossiblyUndefinedArrayOffset */
69
+ if (isset ($ Feast ->ipAddress ) && $ Feast ->ipAddress !== $ _SERVER ['REMOTE_ADDR ' ]) {
69
70
session_destroy ();
70
71
$ response = di (ResponseInterface::class);
71
72
72
- $ response ->redirect ((string )$ _SERVER ['REQUEST_URI ' ]);
73
+ /** @psalm-suppress PossiblyUndefinedArrayOffset */
74
+ $ response ->redirect ($ _SERVER ['REQUEST_URI ' ]);
73
75
}
74
76
}
75
- $ Feast ->ipAddress = (string )$ _SERVER ['REMOTE_ADDR ' ];
77
+ /** @psalm-suppress PossiblyUndefinedArrayOffset */
78
+ $ Feast ->ipAddress = $ _SERVER ['REMOTE_ADDR ' ];
76
79
}
77
80
78
81
/**
You can’t perform that action at this time.
0 commit comments