diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 490b3f4..92040f8 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -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); diff --git a/samples/simple-report.php b/samples/simple-report.php index b4d8ef1..7d800aa 100644 --- a/samples/simple-report.php +++ b/samples/simple-report.php @@ -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/'); @@ -56,4 +56,4 @@ ], ], ]); -echo $pdf !== null ? 'Success' .PHP_EOL : 'Failure' . PHP_EOL; +echo $pdf !== null ? 'Success' . PHP_EOL : 'Failure' . PHP_EOL; diff --git a/src/LatexRenderer.php b/src/LatexRenderer.php index ba2af10..7b26809 100644 --- a/src/LatexRenderer.php +++ b/src/LatexRenderer.php @@ -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/ - 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