Resolve #3497013 "Refactor switch in"
2 unresolved threads
Closes #3497013
Merge request reports
Activity
added 255 commits
-
2caef8e6...616d1046 - 254 commits from branch
project:11.x
- b805cb1f - Merge branch '11.x' into '3497013-refactor-switch-in'
-
2caef8e6...616d1046 - 254 commits from branch
80 break; 81 82 case 'year': 83 $formula = $this->getDateFormat('Y'); 84 break; 57 $formula = match ($this->options['granularity']) { 58 'minute' => $this->getDateFormat('YmdHi'), 59 'hour' => $this->getDateFormat('YmdH'), 60 'day' => $this->getDateFormat('Ymd'), 61 'month' => $this->getDateFormat('Ym'), 62 'year' => $this->getDateFormat('Y'), 63 default => NULL, 64 }; 65 66 if ($formula) { 67 // Add the field. changed this line in version 7 of the diff
added 9 commits
-
4828a430...75ea9ab7 - 2 commits from branch
project:11.x
- b3c33ef0 - Change switch case to match construct.
- 75f4a1eb - Changing null to NULL.
- 1d2de267 - Fix PHPCS error.
- e6a412f9 - Fix PHPCS error.
- 9a0f56db - Fix PHPCS error.
- 05d86f6b - Updating to align joachim's pseudocode.
- 234784ad - Added comments.
Toggle commit list-
4828a430...75ea9ab7 - 2 commits from branch
85 } 57 // Determine whether to use a formula in the query. 58 $formula = match ($this->options['granularity']) { 59 'minute' => $this->getDateFormat('YmdHi'), 60 'hour' => $this->getDateFormat('YmdH'), 61 'day' => $this->getDateFormat('Ymd'), 62 'week' => $this->getDateFormat('W'), 63 'month' => $this->getDateFormat('Ym'), 64 'year' => $this->getDateFormat('Y'), 65 default => NULL, 66 }; 86 67 87 68 // Add the field. 88 $this->query->addOrderBy(NULL, $formula, $this->options['order'], $this->tableAlias . '_' . $this->field . '_' . $this->options['granularity']); 69 if ($formula) { 70 $this->query->addOrderBy(NULL, $formula, $this->options['order'], $this->tableAlias . '_' . $this->field . '_' . $this->options['granularity']); added 1 commit
- 221a0b81 - Reorder granularity options in ascending order
Please register or sign in to reply