Commit 9ec1f42d authored by alexpott's avatar alexpott

Issue #2711537 by chgasparoto, kostyashupenko: Syntax errors (un-quoted or...

Issue #2711537 by chgasparoto, kostyashupenko: Syntax errors (un-quoted or mis-quoted strings) in various code examples in docs
parent 6ab5a3aa
......@@ -116,7 +116,7 @@ public static function createFromDateTime(\DateTime $datetime, $settings = array
* date even if some values are missing.
*
* @param array $date_parts
* An array of date parts, like ('year' => 2014, 'month => 4).
* An array of date parts, like ('year' => 2014, 'month' => 4).
* @param mixed $timezone
* (optional) \DateTimeZone object, time zone string or NULL. NULL uses the
* default system time zone. Defaults to NULL.
......
......@@ -163,9 +163,9 @@ public function jsonSerialize() {
* wrapped in quotes:
* @code
* // Secure (with quotes):
* $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, @variable => $variable]);
* $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]);
* // Insecure (without quotes):
* $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, @variable => $variable]);
* $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]);
* @endcode
* When ":variable" comes from arbitrary user input, the result is secure,
* but not guaranteed to be a valid URL (which means the resulting output
......
......@@ -17,10 +17,10 @@
* The configuration dependency value is structured like this:
* @code
* array(
* 'config => array(
* 'config' => array(
* // An array of configuration entity object names. Recalculated on save.
* ),
* 'content => array(
* 'content' => array(
* // An array of content entity configuration dependency names. The default
* // format is "ENTITY_TYPE_ID:BUNDLE:UUID". Recalculated on save.
* ),
......@@ -291,10 +291,10 @@ public function setData(array $data) {
* The configuration dependencies. The array is structured like this:
* @code
* array(
* 'config => array(
* 'config' => array(
* // An array of configuration entity object names.
* ),
* 'content => array(
* 'content' => array(
* // An array of content entity configuration dependency names. The default
* // format is "ENTITY_TYPE_ID:BUNDLE:UUID".
* ),
......
......@@ -22,8 +22,8 @@ class Log {
*
* array(
* $logging_key = array(
* array(query => '', args => array(), caller => '', target => '', time => 0),
* array(query => '', args => array(), caller => '', target => '', time => 0),
* array('query' => '', 'args' => array(), 'caller' => '', 'target' => '', 'time' => 0),
* array('query' => '', 'args' => array(), 'caller' => '', 'target' => '', 'time' => 0),
* ),
* );
*
......
......@@ -55,7 +55,7 @@ interface EntityFormDisplayInterface extends EntityDisplayInterface {
* // For 'single-value' widgets:
* '#theme' => 'field_multiple_value_form',
* '#cardinality' => The field cardinality,
* '#cardinality_multiple => TRUE if the field can contain multiple
* '#cardinality_multiple' => TRUE if the field can contain multiple
* items, FALSE otherwise.
* // One sub-array per copy of the widget, keyed by delta.
* 0 => array(
......
......@@ -12,7 +12,7 @@
* @code
* $form['pass'] = array(
* '#type' => 'password',
* '#title => $this->t('Password'),
* '#title' => $this->t('Password'),
* '#size' => 25,
* );
* @endcode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment