value = $value; } /** * Return the data type the strategy handles. * * @return DataType */ public function type() : DataType { return is_string($this->value) ? DataType::categorical() : DataType::continuous(); } /** * Has the strategy been fitted? * * @internal * * @return bool */ public function fitted() : bool { return true; } /** * Fit the guessing strategy to a set of values. * * @internal * * @param list $values */ public function fit(array $values) : void { // } /** * Make a guess. * * @internal * * @return string|int|float */ public function guess() { return $this->value; } /** * Return the string representation of the object. * * @internal * * @return string */ public function __toString() : string { return "Constant (value: {$this->value})"; } }