Skip to content
This repository was archived by the owner on Apr 11, 2022. It is now read-only.

Commit 25279c6

Browse files
committed
Fix PhpStan.
1 parent 55b7e7d commit 25279c6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ MJML PHP server
55

66
Imagine you want render your [MJML template](https://mjml.io) on your private PHP server, now you can.
77

8+
> **Please note:** This package is not officially supported as of 2021-04-01. Install MJML manually on the server, or use Docker.
9+
810
How to install
911
--------------
1012

src/MjmlServer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public function run(): void
2525
echo json_encode([
2626
'status' => 'ok',
2727
'content' => (new self)->process($_POST['template'] ?? ''),
28-
]);
28+
], JSON_THROW_ON_ERROR);
2929
} catch (\Throwable $e) {
3030
echo json_encode([
3131
'status' => 'error',
3232
'message' => $e->getMessage(),
33-
]);
33+
], JSON_THROW_ON_ERROR);
3434
}
3535
die;
3636
}
@@ -53,6 +53,7 @@ public function process(string $template): string
5353
throw new \RuntimeException('Function shell_exec() is disabled on this server.');
5454
}
5555

56+
/** @phpstan-ignore-next-line */
5657
shell_exec('/node_modules/.bin/mjml ' . escapeshellarg($sourceFile) . ' > ' . escapeshellarg($finalFile));
5758

5859
return $this->processReturn($finalFile);

0 commit comments

Comments
 (0)