matomo-org / matomo-org/device-detector
ClientHints::isMobile should have null value if no special headers provider
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 513
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 11
Description
-
\DeviceDetector\DeviceDetector::isMobile method can be improved if ClientHints::isMobile will return null if where is no headers like
sec-ch-ua-mobilerepresented in Request. -
\DeviceDetector\ClientHints::$mobile should be null by default
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading DeviceDetector::isMobile and ClientHints::$mobile to trace how missing sec-ch-ua-mobile headers are handled. Confirm the expected null behavior when no special headers provider is present, then run the relevant existing test suite and add coverage showing that ClientHints::isMobile remains null in that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100