public function getValue(string $field, $value) { $this->checkConstraints($field, $value); if ($this->transformer) { return $this->transformer->transform($value); } return $value; }
public function getValue(string $field, $value) { if ($this->allowNull() && $value === null) { return $value; } $this->checkConstraints($field, $value); if ($this->transformer) { return $this->transformer->transform($value); } return $value; }