Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #29023 [Console] Remove duplicate condition (xuanquynh)
This PR was merged into the 2.8 branch. Discussion ---------- [Console] Remove duplicate condition | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Inside the Command::mergeApplicationDefinition() method, the condition of $mergeArgs is checked twice now. Let's remove the second duplicate one. See the capture below to review quickly! ```php public function mergeApplicationDefinition($mergeArgs = true) { if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) { return; } $this->definition->addOptions($this->application->getDefinition()->getOptions()); if ($mergeArgs) { $currentArguments = $this->definition->getArguments(); $this->definition->setArguments($this->application->getDefinition()->getArguments()); $this->definition->addArguments($currentArguments); } $this->applicationDefinitionMerged = true; if ($mergeArgs) { $this->applicationDefinitionMergedWithArgs = true; } } ``` Commits ------- 925842a Remove duplicate condition
- Loading branch information