name = self::normalizeName($name); $this->typeSpecified = $type !== null; $this->setValue($value, $type); } /** * Retrieves the Parameter name. * * @return string */ public function getName() { return $this->name; } /** * Retrieves the Parameter value. * * @return mixed */ public function getValue() { return $this->value; } /** * Retrieves the Parameter type. * * @return mixed */ public function getType() { return $this->type; } /** * Defines the Parameter value. * * @param mixed $value Parameter value. * @param mixed $type Parameter type. * * @return void */ public function setValue($value, $type = null) { $this->value = $value; $this->type = $type ?: ParameterTypeInferer::inferType($value); } public function typeWasSpecified(): bool { return $this->typeSpecified; } }