You are here

public function FloatData::getCastedValue in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php \Drupal\Core\TypedData\Plugin\DataType\FloatData::getCastedValue()

Gets the primitive data value casted to the correct PHP type.

Return value

mixed

Overrides PrimitiveInterface::getCastedValue

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php, line 24

Class

FloatData
The float data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function getCastedValue() {
  return (double) $this->value;
}