Commit ea8bca51 authored by alexpott's avatar alexpott

Issue #2202401 by Berdir: Make getPropertyDefinition() return NULL instead of FALSE.

parent b0fb47f3
......@@ -103,16 +103,13 @@ public function toArray() {
* @param string $name
* The name of property.
*
* @return array|FALSE
* The definition of the property or FALSE if the property does not exist.
* @return array|null
* The definition of the property or NULL if the property does not exist.
*/
public function getPropertyDefinition($name) {
if (isset($this->definition['mapping'][$name])) {
return $this->definition['mapping'][$name];
}
else {
return FALSE;
}
}
/**
......
......@@ -478,9 +478,6 @@ public function getFieldDefinition($name) {
if (isset($this->fieldDefinitions[$name])) {
return $this->fieldDefinitions[$name];
}
else {
return FALSE;
}
}
/**
......
......@@ -109,8 +109,8 @@ public function hasField($field_name);
* @param string $name
* The name of the field.
*
* @return \Drupal\Core\Field\FieldDefinitionInterface|false
* The definition of the field or FALSE if the field does not exist.
* @return \Drupal\Core\Field\FieldDefinitionInterface|null
* The definition of the field or null if the field does not exist.
*/
public function getFieldDefinition($name);
......
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