diff --git a/src/Traits/ParamTrait.php b/src/Traits/ParamTrait.php index 749e659..10fda07 100644 --- a/src/Traits/ParamTrait.php +++ b/src/Traits/ParamTrait.php @@ -80,33 +80,8 @@ private function castOutputValues(array $outputs, array $result): array foreach ($outputs as $output) { $key = $output->getName(); $value = $output->cast($result[$key]); - $type = $output->getType(); - if ($type === IElement::TYPE_STRING - || $type === IStruct::TYPE_STRUCT - || $type === ITable::TYPE_TABLE - ) { - $value = $this->rtrimStrings($value); - } $return[$key] = $value; } return $return; } - - /** - * Trim all trailing spaces, newlines and null-bytes from strings. - * @param mixed $return - * @return mixed - */ - private function rtrimStrings($return) - { - if (is_string($return)) { - return rtrim($return); - } - if (is_array($return)) { - foreach ($return as $key => $value) { - $return[$key] = $this->rtrimStrings($value); - } - } - return $return; - } }