-
Notifications
You must be signed in to change notification settings - Fork 7
HP-2134: add new location to mobile stock #178
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
Conversation
WalkthroughThe pull request introduces a new location entry to the response of the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
src/controllers/MobileController.php (1)
Line range hint
162-169
: LGTM! Consider extracting locations to a configuration file.The addition of the new location 'NL:AMS:DR:AMS3' is correct and aligns with the PR objective. The implementation is consistent with the existing structure and should not cause any backwards compatibility issues.
For improved maintainability, consider extracting the list of locations to a separate configuration file. This would make it easier to manage and update locations in the future without modifying the controller code. For example:
public function actionGetLocations(): Response { return $this->response(Yii::$app->params['mobileStockLocations']); }Then, define the locations in a configuration file:
return [ 'mobileStockLocations' => [ ['name' => 'NL:AMS:EQ:AM7'], ['name' => 'NL:AMS:EQ:AM11'], ['name' => 'NL:AMS:DR:AMS3'], ['name' => 'NL:AMS:DR:AMS17'], ['name' => 'USA:ASH:EQ:DC10'], ], ];This approach would centralize the location management and make it easier to add, remove, or modify locations in the future.
Summary by CodeRabbit
NL:AMS:DR:AMS3
to the locations response.These changes enhance the information available to users when retrieving location data.