It seems like $url can also be of type array and array; however, parameter $url of parse_url() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
The expression return $this->asJson(arr...hashData($redirectTo))) returns the type yii\web\Response which includes types incompatible with the type-hinted return craft\web\Response.