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

Update PccSiteViewQuery.php #32

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

Conversation

chx
Copy link

@chx chx commented Jan 16, 2025

I didn't want to file a PR for every tiny edit.

There's no reason to take an object by reference unless you want to replace the object itself.

getPublishingLevel already uses match so why not.

However, toRow collecting into a row key called index makes me wonder a little: is there a possible problem with a collision with a future field called index ? If yes what could be done to mitigate this? Is it possible to separate into $row['index'] and $row['data'] where the latter would be the field indexed data structure currently in $row? If not because this structure goes into core Views -- haven't stepped through the whole thing yes, just reading it -- then at least name thing much less likely to collide like __index maybe?

I didn't want to file a PR for every tiny edit.

There's no reason to take an object by reference unless you want to replace the object itself.

`getPublishingLevel` already uses `match` so why not.

However, `toRow` collecting into a row key called `index` makes me wonder a little: is there a possible problem with a collision with a future field called `index` ? If yes what could be done to mitigate this? Is it possible to separate into $row['index'] and $row['data'] where the latter would be the field indexed data structure currently in `$row`? If not because this structure goes into core Views then at least name thing much less likely to collide like `__index` maybe?
@chx chx requested a review from a team as a code owner January 16, 2025 02:58
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.

1 participant