-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix some incorrect PHPDoc return types for \Magento\Framework\View\Page\Config methods #39296
base: 2.4-develop
Are you sure you want to change the base?
Fix some incorrect PHPDoc return types for \Magento\Framework\View\Page\Config methods #39296
Conversation
Hi @spalewski. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@spalewski, could you please explain, when the return type doesn't match? |
because it returns value of \Magento\Framework\App\Config\ScopeConfigInterface::getValue and that is: @return mixed. For example could be null in some scenarios (like new store added). |
@spalewski, could you please provide use cases together with steps to reproduce when these methods don't return a string? It may be better to define a return type string explicitly. |
Just as I wrote above. Just add new website/store/storeview and use those methods in that scope, for ex. on the homepage (or any CMS page that was in db already). It returns null in that case. Also, values are assigned to $this->metadata array where initial values are: array<string, null>. |
Description (*)
This pull request fixes some incorrect PHPDoc return types for methods in the \Magento\Framework\View\Page\Config. Previously, some return types were inaccurately documented (@return string was marked instead of @return mixed). This update aligns the PHPDocs with the actual return values to improve code clarity and IDE support.
Contribution checklist (*)