Skip to content

Commit 2948d79

Browse files
committed
remove string trimmer from execute
1 parent 69467b7 commit 2948d79

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/SapRfcFunction.php

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,14 @@ public function __destruct()
5757
protected function execute()
5858
{
5959
try {
60-
$result = $this->function->invoke($this->params);
60+
return $this->function->invoke($this->params);
6161
} catch (\Exception $exception) {
6262
throw new FunctionCallException(sprintf(
6363
'Function call %s failed: %s',
6464
$this->getName(),
6565
$exception->getMessage()
6666
), 0, $exception);
6767
}
68-
return $this->trimStrings($result);
6968
}
7069

7170
/**
@@ -85,22 +84,4 @@ protected function getFunction()
8584
), 0, $exception);
8685
}
8786
}
88-
89-
/**
90-
* Trim the strings of a given data structure.
91-
* @param mixed $return
92-
* @return mixed
93-
*/
94-
protected function trimStrings($return)
95-
{
96-
if (is_string($return)) {
97-
return rtrim($return);
98-
}
99-
if (is_array($return)) {
100-
foreach ($return as $key => $value) {
101-
$return[$key] = $this->trimStrings($value);
102-
}
103-
}
104-
return $return;
105-
}
10687
}

0 commit comments

Comments
 (0)