Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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