File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -183,23 +183,17 @@ private function getServerVariables(InputInterface $input): ServerVariables
183183 {
184184 $ serverVariables = ServerVariables::default ();
185185 if ($ referrer = $ input ->getOption ('referrer ' )) {
186- if (!is_string ($ referrer )) {
187- throw new InvalidArgumentException ('Referrer should be a string ' );
188- }
186+ /** @var string $referrer */
189187 $ serverVariables = $ serverVariables ->with ('HTTP_REFERER ' , $ referrer );
190188 }
191189
192190 if ($ serverName = $ input ->getOption ('server-name ' )) {
193- if (!is_string ($ serverName )) {
194- throw new InvalidArgumentException ('Server name should be a string ' );
195- }
191+ /** @var string $serverName */
196192 $ serverVariables = $ serverVariables ->with ('SERVER_NAME ' , $ serverName );
197193 }
198194
199195 if ($ httpUserAgent = $ input ->getOption ('http-user-agent ' )) {
200- if (!is_string ($ httpUserAgent )) {
201- throw new InvalidArgumentException ('Http user agent should be a string ' );
202- }
196+ /** @var string $httpUserAgent */
203197 $ serverVariables = $ serverVariables ->with ('HTTP_USER_AGENT ' , $ httpUserAgent );
204198 }
205199
You can’t perform that action at this time.
0 commit comments