From ca4f27d3dd9b34fd6785d24057431a26ef6596ce Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 22:16:51 +0000 Subject: [PATCH] style(php-cs-fixer): fix coding standards --- src/Exception/Client/WorkflowException.php | 1 - src/Exception/Client/WorkflowQueryRejectedException.php | 1 - src/Exception/WorkflowExecutionFailedException.php | 2 -- src/Internal/Client/WorkflowStub.php | 1 + src/Internal/Declaration/Prototype/ActivityPrototype.php | 2 -- src/Internal/Declaration/Prototype/Prototype.php | 2 -- src/Internal/Declaration/Prototype/WorkflowPrototype.php | 2 -- src/Internal/Marshaller/Mapper/AttributeMapper.php | 2 -- src/Internal/Marshaller/Marshaller.php | 1 - src/Internal/Transport/CompletableResult.php | 4 ---- src/Internal/Transport/Router/GetWorkerInfo.php | 1 - src/Internal/Workflow/ActivityProxy.php | 2 -- src/Internal/Workflow/ContinueAsNewProxy.php | 4 ---- src/Internal/Workflow/ExternalWorkflowProxy.php | 1 - src/Promise.php | 2 ++ src/Worker/Transport/Codec/ProtoCodec.php | 1 - src/Worker/Transport/RPCConnectionInterface.php | 3 ++- src/Worker/Worker.php | 4 ---- src/WorkerFactory.php | 6 ------ 19 files changed, 5 insertions(+), 37 deletions(-) diff --git a/src/Exception/Client/WorkflowException.php b/src/Exception/Client/WorkflowException.php index e11e63bc..1b7850e4 100644 --- a/src/Exception/Client/WorkflowException.php +++ b/src/Exception/Client/WorkflowException.php @@ -17,7 +17,6 @@ class WorkflowException extends TemporalException { private WorkflowExecution $execution; - private ?string $type; public function __construct( diff --git a/src/Exception/Client/WorkflowQueryRejectedException.php b/src/Exception/Client/WorkflowQueryRejectedException.php index 8fade37a..efc59c9c 100644 --- a/src/Exception/Client/WorkflowQueryRejectedException.php +++ b/src/Exception/Client/WorkflowQueryRejectedException.php @@ -16,7 +16,6 @@ class WorkflowQueryRejectedException extends WorkflowQueryException { private int $queryRejectCondition; - private int $workflowExecutionStatus; public function __construct( diff --git a/src/Exception/WorkflowExecutionFailedException.php b/src/Exception/WorkflowExecutionFailedException.php index ad2865e7..73675d32 100644 --- a/src/Exception/WorkflowExecutionFailedException.php +++ b/src/Exception/WorkflowExecutionFailedException.php @@ -16,9 +16,7 @@ class WorkflowExecutionFailedException extends TemporalException { private Failure $failure; - private int $lastWorkflowTaskCompletedEventId; - private int $retryState; /** diff --git a/src/Internal/Client/WorkflowStub.php b/src/Internal/Client/WorkflowStub.php index 588d9390..40546226 100644 --- a/src/Internal/Client/WorkflowStub.php +++ b/src/Internal/Client/WorkflowStub.php @@ -455,6 +455,7 @@ static function (TerminateInput $input) use ($serviceClient, $clientOptions, $de /** * * + * @param null|mixed $type * @throws \Throwable */ public function getResult($type = null, int $timeout = null): mixed diff --git a/src/Internal/Declaration/Prototype/ActivityPrototype.php b/src/Internal/Declaration/Prototype/ActivityPrototype.php index 7e504109..066cbebf 100644 --- a/src/Internal/Declaration/Prototype/ActivityPrototype.php +++ b/src/Internal/Declaration/Prototype/ActivityPrototype.php @@ -19,9 +19,7 @@ final class ActivityPrototype extends Prototype { private ?MethodRetry $methodRetry = null; - private ?ActivityInstance $instance = null; - private ?\Closure $factory = null; private bool $isLocalActivity; diff --git a/src/Internal/Declaration/Prototype/Prototype.php b/src/Internal/Declaration/Prototype/Prototype.php index c1570994..8c026a11 100644 --- a/src/Internal/Declaration/Prototype/Prototype.php +++ b/src/Internal/Declaration/Prototype/Prototype.php @@ -16,9 +16,7 @@ abstract class Prototype implements PrototypeInterface { protected string $name; - protected ?\ReflectionMethod $handler; - private \ReflectionClass $class; public function __construct(string $name, ?\ReflectionMethod $handler, \ReflectionClass $class) diff --git a/src/Internal/Declaration/Prototype/WorkflowPrototype.php b/src/Internal/Declaration/Prototype/WorkflowPrototype.php index 554d21f6..02036359 100644 --- a/src/Internal/Declaration/Prototype/WorkflowPrototype.php +++ b/src/Internal/Declaration/Prototype/WorkflowPrototype.php @@ -38,9 +38,7 @@ final class WorkflowPrototype extends Prototype private array $updateValidators = []; private ?CronSchedule $cronSchedule = null; - private ?MethodRetry $methodRetry = null; - private ?ReturnType $returnType = null; public function getCronSchedule(): ?CronSchedule diff --git a/src/Internal/Marshaller/Mapper/AttributeMapper.php b/src/Internal/Marshaller/Mapper/AttributeMapper.php index 02d16503..7606f0cf 100644 --- a/src/Internal/Marshaller/Mapper/AttributeMapper.php +++ b/src/Internal/Marshaller/Mapper/AttributeMapper.php @@ -26,7 +26,6 @@ class AttributeMapper implements MapperInterface { private \ReflectionClass $class; - private ReaderInterface $reader; /** @@ -40,7 +39,6 @@ class AttributeMapper implements MapperInterface private array $setters = []; private Scope $scope; - private TypeFactoryInterface $factory; public function __construct(\ReflectionClass $class, TypeFactoryInterface $factory, ReaderInterface $reader) diff --git a/src/Internal/Marshaller/Marshaller.php b/src/Internal/Marshaller/Marshaller.php index 6fc67804..25d520d6 100644 --- a/src/Internal/Marshaller/Marshaller.php +++ b/src/Internal/Marshaller/Marshaller.php @@ -27,7 +27,6 @@ class Marshaller implements MarshallerInterface private array $mappers = []; private TypeFactory $type; - private MapperFactoryInterface $mapper; /** diff --git a/src/Internal/Transport/CompletableResult.php b/src/Internal/Transport/CompletableResult.php index e260b83b..b57a0dbb 100644 --- a/src/Internal/Transport/CompletableResult.php +++ b/src/Internal/Transport/CompletableResult.php @@ -31,13 +31,9 @@ class CompletableResult implements CompletableResultInterface private $value; private WorkflowContextInterface $context; - private LoopInterface $loop; - private PromiseInterface $promise; - private Deferred $deferred; - private string $layer; /** diff --git a/src/Internal/Transport/Router/GetWorkerInfo.php b/src/Internal/Transport/Router/GetWorkerInfo.php index ca26fbcc..8c1e86f8 100644 --- a/src/Internal/Transport/Router/GetWorkerInfo.php +++ b/src/Internal/Transport/Router/GetWorkerInfo.php @@ -24,7 +24,6 @@ final class GetWorkerInfo extends Route { private RepositoryInterface $queues; - private MarshallerInterface $marshaller; public function __construct(RepositoryInterface $queues, MarshallerInterface $marshaller) diff --git a/src/Internal/Workflow/ActivityProxy.php b/src/Internal/Workflow/ActivityProxy.php index e275bca6..22528988 100644 --- a/src/Internal/Workflow/ActivityProxy.php +++ b/src/Internal/Workflow/ActivityProxy.php @@ -36,9 +36,7 @@ final class ActivityProxy extends Proxy private array $activities; private string $class; - private ActivityOptionsInterface $options; - private WorkflowContextInterface $ctx; /** diff --git a/src/Internal/Workflow/ContinueAsNewProxy.php b/src/Internal/Workflow/ContinueAsNewProxy.php index 3d02d353..3f8c23f6 100644 --- a/src/Internal/Workflow/ContinueAsNewProxy.php +++ b/src/Internal/Workflow/ContinueAsNewProxy.php @@ -32,13 +32,9 @@ class ContinueAsNewProxy extends Proxy 'Workflow "%s" has already been called within this "continue as new" stub'; private string $class; - private WorkflowPrototype $workflow; - private ContinueAsNewOptions $options; - private WorkflowContextInterface $context; - private bool $isContinued = false; public function __construct( diff --git a/src/Internal/Workflow/ExternalWorkflowProxy.php b/src/Internal/Workflow/ExternalWorkflowProxy.php index 0c250af4..916e3391 100644 --- a/src/Internal/Workflow/ExternalWorkflowProxy.php +++ b/src/Internal/Workflow/ExternalWorkflowProxy.php @@ -32,7 +32,6 @@ class ExternalWorkflowProxy extends Proxy private string $class; private WorkflowPrototype $workflow; - private ExternalWorkflowStubInterface $stub; /** diff --git a/src/Promise.php b/src/Promise.php index 83aedbbd..15130369 100644 --- a/src/Promise.php +++ b/src/Promise.php @@ -273,6 +273,7 @@ static function (iterable $array) use ( * * If `$promiseOrValue` is a promise, it will be returned as is. * + * @param null|mixed $promiseOrValue */ public static function resolve($promiseOrValue = null): PromiseInterface { @@ -292,6 +293,7 @@ public static function resolve($promiseOrValue = null): PromiseInterface * throwing an exception. For example, it allows you to propagate a rejection with * the value of another promise. * + * @param null|mixed $promiseOrValue * @return PromiseInterface */ public static function reject($promiseOrValue = null): PromiseInterface diff --git a/src/Worker/Transport/Codec/ProtoCodec.php b/src/Worker/Transport/Codec/ProtoCodec.php index 2dfb2259..007da6b7 100644 --- a/src/Worker/Transport/Codec/ProtoCodec.php +++ b/src/Worker/Transport/Codec/ProtoCodec.php @@ -26,7 +26,6 @@ final class ProtoCodec implements CodecInterface { private Decoder $parser; - private Encoder $encoder; public function __construct(DataConverterInterface $dataConverter) diff --git a/src/Worker/Transport/RPCConnectionInterface.php b/src/Worker/Transport/RPCConnectionInterface.php index 560cca1d..f058c465 100644 --- a/src/Worker/Transport/RPCConnectionInterface.php +++ b/src/Worker/Transport/RPCConnectionInterface.php @@ -16,8 +16,9 @@ interface RPCConnectionInterface { /** - * @return mixed * + * @param mixed $payload + * @return mixed * @throws TransportException */ public function call(string $method, $payload); diff --git a/src/Worker/Worker.php b/src/Worker/Worker.php index 7800f9ac..32f736ff 100644 --- a/src/Worker/Worker.php +++ b/src/Worker/Worker.php @@ -30,13 +30,9 @@ class Worker implements WorkerInterface, EventListenerInterface, DispatcherInter use EventEmitterTrait; private string $name; - private WorkerOptions $options; - private RouterInterface $router; - private ServiceContainer $services; - private RPCConnectionInterface $rpc; public function __construct( diff --git a/src/WorkerFactory.php b/src/WorkerFactory.php index ea064a38..b5cbd3a0 100644 --- a/src/WorkerFactory.php +++ b/src/WorkerFactory.php @@ -100,9 +100,7 @@ class WorkerFactory implements WorkerFactoryInterface, LoopInterface private const HEADER_TASK_QUEUE = 'taskQueue'; protected DataConverterInterface $converter; - protected ReaderInterface $reader; - protected RouterInterface $router; /** @@ -111,13 +109,9 @@ class WorkerFactory implements WorkerFactoryInterface, LoopInterface protected RepositoryInterface $queues; protected CodecInterface $codec; - protected ClientInterface $client; - protected ServerInterface $server; - protected QueueInterface $responses; - protected RPCConnectionInterface $rpc; /**