From b02af503c575be15caecde318685a4ac31672b48 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Sun, 24 May 2026 16:30:29 +0200 Subject: [PATCH] Add rector and phpstan --- .github/workflows/ci.yml | 4 ++++ src/Entity/Elimination.php | 1 + src/Entity/QuizCandidate.php | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25bd701..85a4830 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,10 @@ jobs: run: docker compose exec -T php vendor/bin/php-cs-fixer check --diff --show-progress=none - name: Twig Coding Style run: docker compose exec -T php vendor/bin/twig-cs-fixer check + - name: Static Analysis (PHPStan) + run: docker compose exec -T php vendor/bin/phpstan analyse --no-progress --no-ansi + - name: Rector + run: docker compose exec -T php vendor/bin/rector process --dry-run - name: Check HTTP reachability run: curl -v --fail-with-body http://localhost - name: Check Mercure reachability diff --git a/src/Entity/Elimination.php b/src/Entity/Elimination.php index dc2e7fa..6a234c6 100644 --- a/src/Entity/Elimination.php +++ b/src/Entity/Elimination.php @@ -20,6 +20,7 @@ class Elimination { use SoftDeleteableEntity; use TimestampableEntity; + public const string SCREEN_GREEN = 'green'; public const string SCREEN_RED = 'red'; diff --git a/src/Entity/QuizCandidate.php b/src/Entity/QuizCandidate.php index fb1896c..2a8f16a 100644 --- a/src/Entity/QuizCandidate.php +++ b/src/Entity/QuizCandidate.php @@ -18,6 +18,7 @@ use Tvdt\Repository\QuizCandidateRepository; class QuizCandidate { use SoftDeleteableEntity; + #[ORM\Column(type: UuidType::NAME, unique: true)] #[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')] #[ORM\GeneratedValue(strategy: 'CUSTOM')]