-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
TASK: Cosmetic followup for #3443 #3447
base: 8.4
Are you sure you want to change the base?
Conversation
we don't make a distinction inside the service from development, testing or production
after reflecting each class we sort classReflectionData which can also not be done instead :D but we still ensure that getAllClassNames returns all classes sorted. For using `array_diff` to get the $newClassNames we dont need sorting
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.
Fine by me, see one comment though
|
||
$propertyNames = []; | ||
foreach ($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] as $propertyName => $propertyData) { | ||
foreach ($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] ?? [] as $propertyName => $propertyData) { |
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.
Oh god, that is so much harder to read though, I wouldn't change that, shorter is not always better
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.
I'd say this combines short code with readability:
foreach ($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] ?? [] as $propertyName => $propertyData) { | |
$classProperties = $this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] ?? [] | |
foreach ($classProperties as $propertyName => $propertyData) { |
|
||
return array_keys($this->classReflectionData); | ||
$classNames = array_keys($this->classReflectionData); | ||
sort($classNames); |
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.
Why the sorting? Is that the central replacement for the removed sort calls later on?
|
||
$propertyNames = []; | ||
foreach ($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] as $propertyName => $propertyData) { | ||
foreach ($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] ?? [] as $propertyName => $propertyData) { |
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.
I'd say this combines short code with readability:
foreach ($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] ?? [] as $propertyName => $propertyData) { | |
$classProperties = $this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES] ?? [] | |
foreach ($classProperties as $propertyName => $propertyData) { |
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.
Please check the failure of aggregateRootAssignmentsInHierarchiesAreCorrect
During the review of #3443 I couldn't help to do a little cleaning myself :D 🧹
Checklist
The PR is created against the lowest maintained branchFEATURE|TASK|BUGFIX
Reviewer - Breaking Changes are marked with!!!
and have upgrade-instructions