diff --git a/core/lib/Drupal/Component/Gettext/PoHeader.php b/core/lib/Drupal/Component/Gettext/PoHeader.php index 362d098cb767cefea6158fb268796f3240a891df..5ba4f88eacd239db535872f32a6407ae2ba9c5fc 100644 --- a/core/lib/Drupal/Component/Gettext/PoHeader.php +++ b/core/lib/Drupal/Component/Gettext/PoHeader.php @@ -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. * diff --git a/core/lib/Drupal/Core/Database/Database.php b/core/lib/Drupal/Core/Database/Database.php index 92751cef43256067996b30b0674a63f836164b64..d4ce475bd9da9974a1676c36553b8f12c1068e13 100644 --- a/core/lib/Drupal/Core/Database/Database.php +++ b/core/lib/Drupal/Core/Database/Database.php @@ -47,14 +47,15 @@ abstract class Database { /** * An array of active query log objects. * + * @var array * Every connection has one and only one logger object for all targets and * logging keys. * - * array( - * '$db_key' => DatabaseLog object. - * ); - * - * @var array + * @code + * [ + * '$db_key' => DatabaseLog object. + * ] + * @endcode */ protected static $logs = []; diff --git a/core/lib/Drupal/Core/Database/Log.php b/core/lib/Drupal/Core/Database/Log.php index 79f2605020526078341cdf4a8203a433e64a0c67..62f1e1b8802509c4023331bcad32e0b243e08554 100644 --- a/core/lib/Drupal/Core/Database/Log.php +++ b/core/lib/Drupal/Core/Database/Log.php @@ -20,16 +20,17 @@ class Log { /** * Cache of logged queries. This will only be used if the query logger is enabled. * + * @var array * The structure for the logging array is as follows: * - * array( - * $logging_key = array( - * array('query' => '', 'args' => array(), 'caller' => '', 'target' => '', 'time' => 0, 'start' => 0), - * array('query' => '', 'args' => array(), 'caller' => '', 'target' => '', 'time' => 0, 'start' => 0), - * ), - * ); - * - * @var array + * @code + * [ + * $logging_key = [ + * ['query' => '', 'args' => [], 'caller' => '', 'target' => '', 'time' => 0, 'start' => 0], + * ['query' => '', 'args' => [], 'caller' => '', 'target' => '', 'time' => 0, 'start' => 0], + * ], + * ]; + * @endcode */ protected $queryLog = []; diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php index bf8414aebc3a2f90d7f148ee1fe7fec4a7b6f2dc..3632775f45bdf496cade1b513fc2642c7e560cc9 100644 --- a/core/lib/Drupal/Core/Database/Query/Select.php +++ b/core/lib/Drupal/Core/Database/Query/Select.php @@ -30,26 +30,26 @@ class Select extends Query implements SelectInterface { /** * The tables against which to JOIN. * + * @var array * This property is a nested array. Each entry is an array representing * a single table against which to join. The structure of each entry is: * - * array( + * @code + * [ * 'type' => $join_type (one of INNER, LEFT OUTER, RIGHT OUTER), * 'table' => $table, * 'alias' => $alias_of_the_table, * 'condition' => $join_condition (string or Condition object), * 'arguments' => $array_of_arguments_for_placeholders_in_the condition. * 'all_fields' => TRUE to SELECT $alias.*, FALSE or NULL otherwise. - * ) - * + * ] + * @endcode * If $table is a string, it is taken as the name of a table. If it is * a Select query object, it is taken as a subquery. * * If $join_condition is a Condition object, any arguments should be * incorporated into the object; a separate array of arguments does not * need to be provided. - * - * @var array */ protected $tables = []; diff --git a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php index be2ef7abee867d8e772ce7d61de529ed1f749441..6a5fe5abde53793a2e27c687ae7ca3fd70285d94 100644 --- a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php +++ b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php @@ -15,7 +15,9 @@ * Static methods in base class can also be used to create DrupalDateTime objects. * For example: * - * DrupalDateTime::createFromArray( array('year' => 2010, 'month' => 9, 'day' => 28) ) + * @code + * DrupalDateTime::createFromArray(['year' => 2010, 'month' => 9, 'day' => 28]) + * @endcode * * @see \Drupal\Component\Datetime\DateTimePlus */ diff --git a/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php b/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php index f0cce57c56cb569345fe98bbd56b3db97a13a64d..3cc65ac976ff4ba1add08781af402071684ffa8c 100644 --- a/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php +++ b/core/modules/system/tests/modules/common_test/src/Hook/CommonTestHooks.php @@ -49,7 +49,7 @@ public function drupalAlterAlter(&$data, &$arg2 = NULL, &$arg3 = NULL): void { * Implements hook_TYPE_alter(). * * This is to verify that - * \Drupal::moduleHandler()->alter(array(TYPE1, TYPE2), ...) allows + * \Drupal::moduleHandler()->alter([TYPE1, TYPE2], ...) allows * hook_module_implements_alter() to affect the order in which module * implementations are executed. */