From af83b3c4316e2c414187ea385436fce28993ca4b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 15 Jun 2025 16:31:51 +0100 Subject: [PATCH] Configure phpcs, fix errors --- .../tests/src/Traits/DailyEmailTestTrait.php | 1 + .../tests/src/Kernel/PodcastTokenTest.php | 1 + modules/opd_presentations/src/Events.php | 2 +- .../src/Traits/PresentationCreationTrait.php | 2 +- phpcs.xml.dist | 33 +++++++++++++++++++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 phpcs.xml.dist diff --git a/modules/opd_daily_emails/tests/src/Traits/DailyEmailTestTrait.php b/modules/opd_daily_emails/tests/src/Traits/DailyEmailTestTrait.php index 5aa2f6c0e..181b47839 100644 --- a/modules/opd_daily_emails/tests/src/Traits/DailyEmailTestTrait.php +++ b/modules/opd_daily_emails/tests/src/Traits/DailyEmailTestTrait.php @@ -13,6 +13,7 @@ trait DailyEmailTestTrait { /** * @param non-empty-string $title + * @param bool $isPublished */ protected function createDailyEmailNode( string $title, diff --git a/modules/opd_podcast/tests/src/Kernel/PodcastTokenTest.php b/modules/opd_podcast/tests/src/Kernel/PodcastTokenTest.php index cad5cba00..189e5e012 100644 --- a/modules/opd_podcast/tests/src/Kernel/PodcastTokenTest.php +++ b/modules/opd_podcast/tests/src/Kernel/PodcastTokenTest.php @@ -75,4 +75,5 @@ class PodcastTokenTest extends BrowserTestBase { 'type' => Episode::NODE_TYPE, ]); } + } diff --git a/modules/opd_presentations/src/Events.php b/modules/opd_presentations/src/Events.php index a33142298..a0266724b 100644 --- a/modules/opd_presentations/src/Events.php +++ b/modules/opd_presentations/src/Events.php @@ -36,7 +36,7 @@ readonly final class Events implements \Countable, \IteratorAggregate { } /** - * @param non-empty-string[] $events + * @param non-empty-string[] $dates */ public static function fromDateStrings(string ...$dates): self { $events = array_map( diff --git a/modules/opd_presentations/tests/src/Traits/PresentationCreationTrait.php b/modules/opd_presentations/tests/src/Traits/PresentationCreationTrait.php index f425bc956..7dc5e1d77 100644 --- a/modules/opd_presentations/tests/src/Traits/PresentationCreationTrait.php +++ b/modules/opd_presentations/tests/src/Traits/PresentationCreationTrait.php @@ -18,6 +18,7 @@ trait PresentationCreationTrait { /** * @param Event[] $events + * @param bool $isPublished */ private function createPresentation(Events $events, bool $isPublished = TRUE): Presentation { $presentation = $this->createNode([ @@ -47,4 +48,3 @@ trait PresentationCreationTrait { } } - diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 000000000..6de7106c3 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,33 @@ + + + Codestyle ruleset for Drupal + + + + + + + + modules + themes + + + + + + + + + + + + + + + + + + + + +