Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented UserAgent #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implemented UserAgent #30

wants to merge 1 commit into from

Conversation

pimjansen
Copy link
Contributor

Implementation port of useragent extension from Faker main lib to Core

@pimjansen pimjansen requested a review from bram-pkg February 20, 2025 09:37
@pimjansen
Copy link
Contributor Author

There are no tests yet but this is the case in the full core package. Lets ensure we add them when we have a clear overview if all is in here.

Comment on lines +16 to +26
/** @var string[] */
private array $userAgents = ['firefox', 'chrome', 'internetExplorer', 'opera', 'safari', 'msedge'];

/** @var string[] */
private array $linuxProcessor = ['i686', 'x86_64'];

/** @var string[ */
private array $macProcessor = ['Intel', 'PPC', 'U; Intel', 'U; PPC'];

/** @var string[] */
private array $windowsPlatformTokens = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** @var string[] */
private array $userAgents = ['firefox', 'chrome', 'internetExplorer', 'opera', 'safari', 'msedge'];
/** @var string[] */
private array $linuxProcessor = ['i686', 'x86_64'];
/** @var string[ */
private array $macProcessor = ['Intel', 'PPC', 'U; Intel', 'U; PPC'];
/** @var string[] */
private array $windowsPlatformTokens = [
/** @var list<string> */
private array $userAgents = ['firefox', 'chrome', 'internetExplorer', 'opera', 'safari', 'msedge'];
/** @var list<string> */
private array $linuxProcessor = ['i686', 'x86_64'];
/** @var list<string> */
private array $macProcessor = ['Intel', 'PPC', 'U; Intel', 'U; PPC'];
/** @var list<string> */
private array $windowsPlatformTokens = [

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does exactly the same? What is the benefit of defining it as a list here?

@pimjansen pimjansen linked an issue Feb 20, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement UserAgentExtension
2 participants