@@ -249,6 +249,7 @@ discard block |
||
| 249 | 249 | * </code> |
| 250 | 250 | * |
| 251 | 251 | * @param string ...$suffix <p>The string to append.</p> |
| 252 | + * @param string[] $suffix |
|
| 252 | 253 | * |
| 253 | 254 | * @psalm-mutation-free |
| 254 | 255 | * |
@@ -3048,6 +3049,7 @@ discard block |
||
| 3048 | 3049 | * </code> |
| 3049 | 3050 | * |
| 3050 | 3051 | * @param string ...$prefix <p>The string to append.</p> |
| 3052 | + * @param string[] $prefix |
|
| 3051 | 3053 | * |
| 3052 | 3054 | * @psalm-mutation-free |
| 3053 | 3055 | * |
@@ -3322,7 +3324,7 @@ discard block |
||
| 3322 | 3324 | * </code> |
| 3323 | 3325 | * |
| 3324 | 3326 | * @param string[] $search <p>The elements to search for.</p> |
| 3325 | - * @param string|string[] $replacement <p>The string to replace with.</p> |
|
| 3327 | + * @param string $replacement <p>The string to replace with.</p> |
|
| 3326 | 3328 | * @param bool $caseSensitive [optional] <p>Whether or not to enforce case-sensitivity. Default: true</p> |
| 3327 | 3329 | * |
| 3328 | 3330 | * @psalm-mutation-free |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * @return $this |
| 40 | 40 | */ |
| 41 | 41 | public function append(string $var, string $value): self { |
| 42 | - $this->vars[$var] = ($this->vars[$var] ?? '') . $value; |
|
| 42 | + $this->vars[$var] = ($this->vars[$var] ?? '').$value; |
|
| 43 | 43 | |
| 44 | 44 | return $this; |
| 45 | 45 | } |
@@ -6,16 +6,16 @@ discard block |
||
| 6 | 6 | use voku\build\Template\TemplateFormatter; |
| 7 | 7 | use voku\helper\UTF8; |
| 8 | 8 | |
| 9 | -require __DIR__ . '/../vendor/autoload.php'; |
|
| 10 | -require __DIR__ . '/vendor/autoload.php'; |
|
| 9 | +require __DIR__.'/../vendor/autoload.php'; |
|
| 10 | +require __DIR__.'/vendor/autoload.php'; |
|
| 11 | 11 | |
| 12 | -$phpFiles = \voku\SimplePhpParser\Parsers\PhpCodeParser::getPhpFiles(__DIR__ . '/../src/Stringy.php'); |
|
| 12 | +$phpFiles = \voku\SimplePhpParser\Parsers\PhpCodeParser::getPhpFiles(__DIR__.'/../src/Stringy.php'); |
|
| 13 | 13 | $phpClasses = $phpFiles->getClasses(); |
| 14 | 14 | $phpUtf8Class = $phpClasses[Stringy::class]; |
| 15 | 15 | |
| 16 | 16 | // ------------------------------------- |
| 17 | 17 | |
| 18 | -$templateDocument = file_get_contents(__DIR__ . '/docs/base.md'); |
|
| 18 | +$templateDocument = file_get_contents(__DIR__.'/docs/base.md'); |
|
| 19 | 19 | |
| 20 | 20 | $templateMethodParam = <<<RAW |
| 21 | 21 | - `%param%` |
@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | $paramsTypes = []; |
| 71 | 71 | foreach ($method->parameters as $param) { |
| 72 | 72 | $paramsTemplate = new TemplateFormatter($templateMethodParam); |
| 73 | - $paramsTemplate->set('param', ($param->typeFromPhpDocPslam ?: $param->typeFromPhpDoc) . UTF8::str_replace_beginning($param->typeMaybeWithComment, $param->typeFromPhpDoc, '')); |
|
| 73 | + $paramsTemplate->set('param', ($param->typeFromPhpDocPslam ?: $param->typeFromPhpDoc).UTF8::str_replace_beginning($param->typeMaybeWithComment, $param->typeFromPhpDoc, '')); |
|
| 74 | 74 | $params[] = $paramsTemplate->format(); |
| 75 | - $paramsTypes[] = $param->typeFromPhpDoc . ' ' . '$' . $param->name; |
|
| 75 | + $paramsTypes[] = $param->typeFromPhpDoc.' '.'$'.$param->name; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | if (count($params) !== 0) { |
@@ -83,16 +83,16 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | // -- return |
| 85 | 85 | |
| 86 | - $methodWithType = $method->name . '(' . implode(', ', $paramsTypes) . '): ' . $method->returnTypeFromPhpDoc; |
|
| 86 | + $methodWithType = $method->name.'('.implode(', ', $paramsTypes).'): '.$method->returnTypeFromPhpDoc; |
|
| 87 | 87 | |
| 88 | - $description = trim($method->summary . "\n\n" . $method->description); |
|
| 88 | + $description = trim($method->summary."\n\n".$method->description); |
|
| 89 | 89 | |
| 90 | 90 | $methodTemplate->set('name', $methodWithType); |
| 91 | 91 | $methodTemplate->set('description', $description); |
| 92 | 92 | $methodTemplate->set('return', $method->returnTypeMaybeWithComment); |
| 93 | 93 | |
| 94 | 94 | $methodIndexTemplate->set('title', $method->name); |
| 95 | - $methodIndexTemplate->set('href', '#' . UTF8::css_identifier($methodWithType)); |
|
| 95 | + $methodIndexTemplate->set('href', '#'.UTF8::css_identifier($methodWithType)); |
|
| 96 | 96 | |
| 97 | 97 | $functionsDocumentation[$method->name] = $methodTemplate->format(); |
| 98 | 98 | $functionsIndex[$method->name] = $methodIndexTemplate->format(); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $indexStrResult .= '<tr>'; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - $indexStrResult .= '<td>' . sprintf("%s\n", $_template) . '</td>'; |
|
| 121 | + $indexStrResult .= '<td>'.sprintf("%s\n", $_template).'</td>'; |
|
| 122 | 122 | |
| 123 | 123 | if ($counterTmp === 4) { |
| 124 | 124 | $counterTmp = 0; |
@@ -130,10 +130,10 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | $indexStrResult = ' |
| 132 | 132 | <table> |
| 133 | - ' . $indexStrResult . ' |
|
| 133 | + ' . $indexStrResult.' |
|
| 134 | 134 | </table> |
| 135 | 135 | '; |
| 136 | 136 | |
| 137 | 137 | $documentTemplate->set('__functions_index__', $indexStrResult); |
| 138 | 138 | |
| 139 | -file_put_contents(__DIR__ . '/../README.md', $documentTemplate->format()); |
|
| 139 | +file_put_contents(__DIR__.'/../README.md', $documentTemplate->format()); |
|