From c958fd0f5021219012eb7ccbf60c0cc0b0a22a47 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:58:09 +0100 Subject: [PATCH] fix linting --- src/Core/Event/ConsumerTypeInterface.php | 11 ++--------- src/Core/Event/QueueConsumers.php | 4 ++-- src/Core/Event/SyncConsumer.php | 5 +++-- src/Entity/Project.php | 1 + 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/Core/Event/ConsumerTypeInterface.php b/src/Core/Event/ConsumerTypeInterface.php index 1d7fd7039..6775d1788 100644 --- a/src/Core/Event/ConsumerTypeInterface.php +++ b/src/Core/Event/ConsumerTypeInterface.php @@ -7,14 +7,7 @@ interface ConsumerTypeInterface const CONSUMER_TYPE_LIVE = 'live'; const CONSUMER_TYPE_TEST = 'test'; - /** - * @return string - */ - public function getType(); + public function getType(): string; - /** - * @param string $type - * @return QueueConsumers - */ - public function setType($type); + public function setType(string $type): ?QueueConsumers; } diff --git a/src/Core/Event/QueueConsumers.php b/src/Core/Event/QueueConsumers.php index 6349f6945..d69d2458c 100644 --- a/src/Core/Event/QueueConsumers.php +++ b/src/Core/Event/QueueConsumers.php @@ -38,12 +38,12 @@ public function __construct($type, $start = 0, $max = 100) $this->max = $max; } - public function getType() + public function getType(): string { return $this->type; } - public function setType($type) + public function setType(string $type): ?QueueConsumers { $this->type = $type; return $this; diff --git a/src/Core/Event/SyncConsumer.php b/src/Core/Event/SyncConsumer.php index 09abba6c8..dbf94774d 100644 --- a/src/Core/Event/SyncConsumer.php +++ b/src/Core/Event/SyncConsumer.php @@ -40,14 +40,15 @@ public function __construct($type, \CultureFeed_Consumer $consumer) $this->consumerData['groups'] = implode(",", $consumer->group); } - public function getType() + public function getType(): string { return $this->type; } - public function setType($type) + public function setType(string $type): ?QueueConsumers { $this->type = $type; + return null; } /** diff --git a/src/Entity/Project.php b/src/Entity/Project.php index fd135ed61..caa7b8fc6 100644 --- a/src/Entity/Project.php +++ b/src/Entity/Project.php @@ -583,6 +583,7 @@ public function getContentFilter() public function setContentFilter($contentFilter) { $this->contentFilter = $contentFilter; + return $this; } /**