1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00

fmt, typings, typos

This commit is contained in:
Robin Appelman 2022-05-16 00:51:50 +02:00
commit 7de4c35ab4
34 changed files with 644 additions and 1048 deletions

View file

@ -40,8 +40,8 @@ class DemoController extends BaseController {
public function get(string $id): void {
$demo = $this->demoProvider->get(\intval($id, 10));
if ($demo === null) {
throw new NotFoundException("requested demo not found");
if (null === $demo) {
throw new NotFoundException('requested demo not found');
} else {
$this->json($demo);
}
@ -146,7 +146,7 @@ class DemoController extends BaseController {
$demo = $this->demoProvider->get((int) $id);
if (!$demo) {
throw new NotFoundException("Demo not found");
throw new NotFoundException('Demo not found');
}
$existingHash = $demo->getHash();