Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!8389
Convert code blocks in comments using array() syntax to @code/@endcode
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Convert code blocks in comments using array() syntax to @code/@endcode
issue/drupal-3454142:3454142-convert-code-blocks
into
11.x
Overview
0
Commits
3
Pipelines
5
Changes
6
Closed
quietone
requested to merge
issue/drupal-3454142:3454142-convert-code-blocks
into
11.x
1 year ago
Overview
0
Commits
3
Pipelines
5
Changes
6
Expand
Closes
#3454142
0
0
Merge request reports
Compare
11.x
version 4
bf9946e5
5 months ago
version 3
14464fa8
7 months ago
version 2
3e945e74
7 months ago
version 1
77b9fd36
1 year ago
11.x (base)
and
latest version
latest version
d4237a70
3 commits,
5 months ago
version 4
bf9946e5
2 commits,
5 months ago
version 3
14464fa8
2 commits,
7 months ago
version 2
3e945e74
1 commit,
7 months ago
version 1
77b9fd36
1 commit,
1 year ago
6 files
+
36
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Component/Gettext/PoHeader.php
+
12
−
6
Options
@@ -440,20 +440,24 @@ private function tokenizeFormula($formula) {
* An example of plural formula parting and evaluation:
* Plural formula: 'n!=1'
* This formula is parsed by parseArithmetic() to a stack (array) of elements:
* array(
* @code
* [
* 0 => '$n',
* 1 => '1',
* 2 => '!=',
* );
* ];
* @endcode
* The evaluatePlural() method evaluates the $element_stack using the plural
* value $n. Before the actual evaluation, the '$n' in the array is replaced
* by the value of $n.
* For example: $n = 2 results in:
* array(
* @code
* [
* 0 => '2',
* 1 => '1',
* 2 => '!=',
* );
* ]
* @endcode
* The stack is processed until only one element is (the result) is left. In
* every iteration the top elements of the stack, up until the first operator,
* are evaluated. After evaluation the arguments and the operator itself are
@@ -462,9 +466,11 @@ private function tokenizeFormula($formula) {
* Because the operator is '!=' the example stack is evaluated as:
* $f = (int) 2 != 1;
* The resulting stack is:
* array(
* @code
* [
* 0 => 1,
* );
* ]
* @endcode
* With only one element left in the stack (the final result) the loop is
* terminated and the result is returned.
*
Loading