summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/DataDefinition.php
diff options
context:
space:
mode:
authorxjm2017-03-03 19:20:24 -0600
committerxjm2017-03-03 19:20:24 -0600
commit52e3eec616efab4d5201e30d085a09ba5c4817e6 (patch)
treed295cc8b862edc04018ba0e04ded752fd1a2f5c6 /core/lib/Drupal/Core/TypedData/DataDefinition.php
parent3aba956a39a4852f42cad8483e4e6e307bedbd0e (diff)
Issue #2776975 by joelpittet, dawehner, tim.plunkett, xjm, pfrenssen: March 3, 2017: Convert core to array syntax coding standards for Drupal 8.3.x RC phase
Diffstat (limited to 'core/lib/Drupal/Core/TypedData/DataDefinition.php')
-rw-r--r--core/lib/Drupal/Core/TypedData/DataDefinition.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/lib/Drupal/Core/TypedData/DataDefinition.php b/core/lib/Drupal/Core/TypedData/DataDefinition.php
index d0878ed..7eec1a9 100644
--- a/core/lib/Drupal/Core/TypedData/DataDefinition.php
+++ b/core/lib/Drupal/Core/TypedData/DataDefinition.php
@@ -12,7 +12,7 @@ class DataDefinition implements DataDefinitionInterface, \ArrayAccess {
*
* @var array
*/
- protected $definition = array();
+ protected $definition = [];
/**
* Creates a new data definition.
@@ -41,7 +41,7 @@ class DataDefinition implements DataDefinitionInterface, \ArrayAccess {
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
- public function __construct(array $values = array()) {
+ public function __construct(array $values = []) {
$this->definition = $values;
}
@@ -213,7 +213,7 @@ class DataDefinition implements DataDefinitionInterface, \ArrayAccess {
* {@inheritdoc}
*/
public function getSettings() {
- return isset($this->definition['settings']) ? $this->definition['settings'] : array();
+ return isset($this->definition['settings']) ? $this->definition['settings'] : [];
}
/**
@@ -257,7 +257,7 @@ class DataDefinition implements DataDefinitionInterface, \ArrayAccess {
* {@inheritdoc}
*/
public function getConstraints() {
- $constraints = isset($this->definition['constraints']) ? $this->definition['constraints'] : array();
+ $constraints = isset($this->definition['constraints']) ? $this->definition['constraints'] : [];
$constraints += \Drupal::typedDataManager()->getDefaultConstraints($this);
return $constraints;
}