File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments