Skip to content

Commit 01be16a

Browse files
committed
added doc
1 parent a5a689f commit 01be16a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
'phpdoc_no_alias_tag' => false, // Allow @link in addition to @see.
2828
'phpdoc_separation' => false, // Don't put blank line between @params, @throws and @return.
2929
'phpdoc_summary' => false, // Don't force terminating dot on the first line.
30+
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
3031
])
3132
->setFinder($finder);

samples/simple-report.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
require ROOT . '/vendor/autoload.php';
88

9-
$tex = new LatexRenderer(__DIR__, 'pdflatex', true);
9+
$tex = new LatexRenderer(__DIR__, 'pdflatex', true); // <- debug true - files will not be deleted
1010
$monolog = new \Monolog\Logger('Tex-Samples', [new \Monolog\Handler\RotatingFileHandler(ROOT . '/runtime/log/sample.log')]);
1111
$tex->setLogger($monolog);
1212
$tex->setTmpDir(ROOT . '/runtime/');
@@ -56,4 +56,4 @@
5656
],
5757
],
5858
]);
59-
echo $pdf !== null ? 'Success' .PHP_EOL : 'Failure' . PHP_EOL;
59+
echo $pdf !== null ? 'Success' . PHP_EOL : 'Failure' . PHP_EOL;

src/LatexRenderer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public function setTmpDir(string $tmpDir): void
7979
}
8080

8181
/**
82-
* @param array $files
82+
* @param string $templateName
83+
* @param array $variables
84+
* @param array $files additional files which will be saved to ./files/<name> - format: key=name, value=fileContent
8385
* @return string|null returns pdf as string or null on failure
8486
*/
8587
public function renderPdf(string $templateName, array $variables, array $files = []): ?string

0 commit comments

Comments
 (0)