rector fixes + bug fixes

This commit is contained in:
Dennis Eichhorn 2023-05-27 03:06:46 +00:00
parent 4f50728503
commit 577f423c6a
3 changed files with 10 additions and 10 deletions

View File

@ -73,7 +73,7 @@ final class Installer extends InstallerAbstract
{
try {
$app->dbPool->get()->con->query('select 1 from `editor_doc`');
} catch (\Exception $e) {
} catch (\Exception $_) {
return []; // @codeCoverageIgnore
}

View File

@ -17,8 +17,8 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
/** @var \phpOMS\Views\View $this */
require_once $this->getData('defaultTemplates')
->findFile('.pdf.php')
->getAbsolutePath();
->findFile('.pdf.php')
->getAbsolutePath();
/** @var \Modules\Editor\Models\EditorDoc $doc */
$doc = $this->getData('doc') ?? new NullEditorDoc();

View File

@ -17,8 +17,8 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
/** @var \phpOMS\Views\View $this */
require_once $this->getData('defaultTemplates')
->findFile('.pdf.php')
->getAbsolutePath();
->findFile('.pdf.php')
->getAbsolutePath();
/** @var \Modules\Editor\Models\EditorDoc $doc */
$doc = $this->getData('doc') ?? new NullEditorDoc();
@ -28,9 +28,9 @@ $doc = $this->getData('doc') ?? new NullEditorDoc();
$pdf = new DefaultPdf();
$pdf->setHeaderData(
$this->getData('defaultTemplates')->findFile('logo.png')->getAbsolutePath(), 15,
$this->getData('logo_name') ?? 'Jingga',
$this->getData('slogan') ?? 'Business solutions made simple.'
$this->getData('defaultTemplates')->findFile('logo.png')->getAbsolutePath(), 15,
$this->getData('logo_name') ?? 'Jingga',
$this->getData('slogan') ?? 'Business solutions made simple.'
);
$pdf->setCreator($this->getData('creator') ?? 'Jingga');
$pdf->setAuthor($this->getData('creator') ?? 'Jingga');
@ -67,6 +67,6 @@ $pdf->writeHTML(Markdown::parse($doc->plain));
//Close and output PDF document
$pdf->Output(
$this->getData('path') ?? ($doc->createdAt->format('Y-m-d') . '_' . $doc->id . '.pdf'),
'I'
$this->getData('path') ?? ($doc->createdAt->format('Y-m-d') . '_' . $doc->id . '.pdf'),
'I'
);