Loading core/lib/Drupal/Component/Gettext/PoHeader.php +12 −6 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 core/lib/Drupal/Core/Database/Database.php +6 −5 Original line number Diff line number Diff line Loading @@ -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( * @code * [ * '$db_key' => DatabaseLog object. * ); * * @var array * ] * @endcode */ protected static $logs = []; Loading core/lib/Drupal/Core/Database/Log.php +9 −8 Original line number Diff line number Diff line Loading @@ -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 = []; Loading core/lib/Drupal/Core/Database/Query/Select.php +5 −5 Original line number Diff line number Diff line Loading @@ -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 = []; Loading core/lib/Drupal/Core/Datetime/DrupalDateTime.php +3 −1 Original line number Diff line number Diff line Loading @@ -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 */ Loading Loading
core/lib/Drupal/Component/Gettext/PoHeader.php +12 −6 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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
core/lib/Drupal/Core/Database/Database.php +6 −5 Original line number Diff line number Diff line Loading @@ -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( * @code * [ * '$db_key' => DatabaseLog object. * ); * * @var array * ] * @endcode */ protected static $logs = []; Loading
core/lib/Drupal/Core/Database/Log.php +9 −8 Original line number Diff line number Diff line Loading @@ -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 = []; Loading
core/lib/Drupal/Core/Database/Query/Select.php +5 −5 Original line number Diff line number Diff line Loading @@ -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 = []; Loading
core/lib/Drupal/Core/Datetime/DrupalDateTime.php +3 −1 Original line number Diff line number Diff line Loading @@ -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 */ Loading