Skip to content

Commit

Permalink
added doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-staab committed Nov 12, 2021
1 parent a5a689f commit 01be16a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
'phpdoc_no_alias_tag' => false, // Allow @link in addition to @see.
'phpdoc_separation' => false, // Don't put blank line between @params, @throws and @return.
'phpdoc_summary' => false, // Don't force terminating dot on the first line.
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
])
->setFinder($finder);
4 changes: 2 additions & 2 deletions samples/simple-report.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

$tex = new LatexRenderer(__DIR__, 'pdflatex', true);
$tex = new LatexRenderer(__DIR__, 'pdflatex', true); // <- debug true - files will not be deleted
$monolog = new \Monolog\Logger('Tex-Samples', [new \Monolog\Handler\RotatingFileHandler(ROOT . '/runtime/log/sample.log')]);
$tex->setLogger($monolog);
$tex->setTmpDir(ROOT . '/runtime/');
Expand Down Expand Up @@ -56,4 +56,4 @@
],
],
]);
echo $pdf !== null ? 'Success' .PHP_EOL : 'Failure' . PHP_EOL;
echo $pdf !== null ? 'Success' . PHP_EOL : 'Failure' . PHP_EOL;
4 changes: 3 additions & 1 deletion src/LatexRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public function setTmpDir(string $tmpDir): void
}

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

0 comments on commit 01be16a

Please sign in to comment.