@@ -5,16 +5,16 @@ discard block |
||
5 | 5 | use voku\build\Template\TemplateFormatter; |
6 | 6 | use voku\helper\UTF8; |
7 | 7 | |
8 | -require __DIR__ . '/../vendor/autoload.php'; |
|
9 | -require __DIR__ . '/vendor/autoload.php'; |
|
8 | +require __DIR__.'/../vendor/autoload.php'; |
|
9 | +require __DIR__.'/vendor/autoload.php'; |
|
10 | 10 | |
11 | -$phpFiles = \voku\SimplePhpParser\Parsers\PhpCodeParser::getPhpFiles(__DIR__ . '/../src/voku/helper/UTF8.php'); |
|
11 | +$phpFiles = \voku\SimplePhpParser\Parsers\PhpCodeParser::getPhpFiles(__DIR__.'/../src/voku/helper/UTF8.php'); |
|
12 | 12 | $phpClasses = $phpFiles->getClasses(); |
13 | 13 | $phpUtf8Class = $phpClasses[UTF8::class]; |
14 | 14 | |
15 | 15 | // ------------------------------------- |
16 | 16 | |
17 | -$templateDocument = file_get_contents(__DIR__ . '/docs/base.md'); |
|
17 | +$templateDocument = file_get_contents(__DIR__.'/docs/base.md'); |
|
18 | 18 | |
19 | 19 | $templateMethodParam = <<<RAW |
20 | 20 | - `%param%` |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | $paramsTypes = []; |
70 | 70 | foreach ($method->parameters as $param) { |
71 | 71 | $paramsTemplate = new TemplateFormatter($templateMethodParam); |
72 | - $paramsTemplate->set('param', ($param->typeFromPhpDocPslam ?: $param->typeFromPhpDoc) . UTF8::str_replace_beginning($param->typeMaybeWithComment, $param->typeFromPhpDoc, '')); |
|
72 | + $paramsTemplate->set('param', ($param->typeFromPhpDocPslam ?: $param->typeFromPhpDoc).UTF8::str_replace_beginning($param->typeMaybeWithComment, $param->typeFromPhpDoc, '')); |
|
73 | 73 | $params[] = $paramsTemplate->format(); |
74 | - $paramsTypes[] = $param->typeFromPhpDoc . ' ' . '$' . $param->name; |
|
74 | + $paramsTypes[] = $param->typeFromPhpDoc.' '.'$'.$param->name; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | if (count($params) !== 0) { |
@@ -82,16 +82,16 @@ discard block |
||
82 | 82 | |
83 | 83 | // -- return |
84 | 84 | |
85 | - $methodWithType = $method->name . '(' . implode(', ', $paramsTypes) . '): ' . $method->returnTypeFromPhpDoc; |
|
85 | + $methodWithType = $method->name.'('.implode(', ', $paramsTypes).'): '.$method->returnTypeFromPhpDoc; |
|
86 | 86 | |
87 | - $description = trim($method->summary . "\n\n" . $method->description); |
|
87 | + $description = trim($method->summary."\n\n".$method->description); |
|
88 | 88 | |
89 | 89 | $methodTemplate->set('name', $methodWithType); |
90 | 90 | $methodTemplate->set('description', $description); |
91 | 91 | $methodTemplate->set('return', $method->returnTypeMaybeWithComment); |
92 | 92 | |
93 | 93 | $methodIndexTemplate->set('title', $method->name); |
94 | - $methodIndexTemplate->set('href', '#' . UTF8::css_identifier($methodWithType)); |
|
94 | + $methodIndexTemplate->set('href', '#'.UTF8::css_identifier($methodWithType)); |
|
95 | 95 | |
96 | 96 | $functionsDocumentation[$method->name] = $methodTemplate->format(); |
97 | 97 | $functionsIndex[$method->name] = $methodIndexTemplate->format(); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $indexStrResult .= '<tr>'; |
118 | 118 | } |
119 | 119 | |
120 | - $indexStrResult .= '<td>' . sprintf("%s\n", $_template) . '</td>'; |
|
120 | + $indexStrResult .= '<td>'.sprintf("%s\n", $_template).'</td>'; |
|
121 | 121 | |
122 | 122 | if ($counterTmp === 4) { |
123 | 123 | $counterTmp = 0; |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | } |
130 | 130 | $indexStrResult = ' |
131 | 131 | <table> |
132 | - ' . $indexStrResult . ' |
|
132 | + ' . $indexStrResult.' |
|
133 | 133 | </table> |
134 | 134 | '; |
135 | 135 | |
136 | 136 | $documentTemplate->set('__functions_index__', $indexStrResult); |
137 | 137 | |
138 | -file_put_contents(__DIR__ . '/../README.md', $documentTemplate->format()); |
|
138 | +file_put_contents(__DIR__.'/../README.md', $documentTemplate->format()); |
@@ -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 | } |