Skip to content

Commit a791d58

Browse files
authored
Fix type mismatch on $userAgent parameters
1 parent 25dc2a9 commit a791d58

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Agent.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function languages($acceptLanguage = null)
170170
* Match a detection rule and return the matched key.
171171
*
172172
* @param array $rules
173-
* @param null $userAgent
173+
* @param string|null $userAgent
174174
* @return string
175175
*/
176176
protected function findDetectionRulesAgainstUA(array $rules, $userAgent = null)
@@ -193,7 +193,7 @@ protected function findDetectionRulesAgainstUA(array $rules, $userAgent = null)
193193
/**
194194
* Get the browser name.
195195
*
196-
* @param null $userAgent
196+
* @param string|null $userAgent
197197
* @return string
198198
*/
199199
public function browser($userAgent = null)
@@ -212,7 +212,7 @@ public function browser($userAgent = null)
212212
/**
213213
* Get the platform name.
214214
*
215-
* @param string $userAgent
215+
* @param string|null $userAgent
216216
* @return string
217217
*/
218218
public function platform($userAgent = null)
@@ -229,7 +229,7 @@ public function platform($userAgent = null)
229229
/**
230230
* Get the device name.
231231
*
232-
* @param string $userAgent
232+
* @param string|null $userAgent
233233
* @return string
234234
*/
235235
public function device($userAgent = null)
@@ -248,7 +248,7 @@ public function device($userAgent = null)
248248
/**
249249
* Check if the device is a desktop computer.
250250
*
251-
* @param string $userAgent deprecated
251+
* @param string|null $userAgent deprecated
252252
* @param array $httpHeaders deprecated
253253
* @return bool
254254
*/
@@ -260,7 +260,7 @@ public function isDesktop($userAgent = null, $httpHeaders = null)
260260
/**
261261
* Check if the device is a mobile phone.
262262
*
263-
* @param string $userAgent deprecated
263+
* @param string|null $userAgent deprecated
264264
* @param array $httpHeaders deprecated
265265
* @return bool
266266
*/
@@ -272,7 +272,7 @@ public function isPhone($userAgent = null, $httpHeaders = null)
272272
/**
273273
* Get the robot name.
274274
*
275-
* @param string $userAgent
275+
* @param string|null $userAgent
276276
* @return string|bool
277277
*/
278278
public function robot($userAgent = null)
@@ -287,7 +287,7 @@ public function robot($userAgent = null)
287287
/**
288288
* Check if device is a robot.
289289
*
290-
* @param string $userAgent
290+
* @param string|null $userAgent
291291
* @return bool
292292
*/
293293
public function isRobot($userAgent = null)

0 commit comments

Comments
 (0)