Skip to content

Commit

Permalink
Optim : 'for' loop can be replaced with 'str_repeat'
Browse files Browse the repository at this point in the history
  • Loading branch information
s-renier-taonix-fr authored and f3l1x committed Feb 13, 2023
1 parent b20c51e commit d4e82ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1986,11 +1986,9 @@ function typeToForm($name, $type)
// if array
} elseif ($typeDef['phpType'] == 'array') {
$buffer .= '<table>';
for ($i = 0; $i < 3; $i++) {
$buffer .= "
$buffer .= str_repeat ("
<tr><td align='right'>array item (type: $typeDef[arrayType]):</td>
<td><input type='text' name='parameters[" . $name . "][]'></td></tr>";
}
<td><input type='text' name='parameters[" . $name . "][]'></td></tr>", 3);
$buffer .= '</table>';
// if scalar
} else {
Expand Down

0 comments on commit d4e82ee

Please sign in to comment.