Skip to content

Commit

Permalink
style(php-cs-fixer): fix coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions[bot] committed Oct 28, 2024
1 parent 14f69e9 commit 2fd17e6
Show file tree
Hide file tree
Showing 218 changed files with 3 additions and 2,575 deletions.
3 changes: 0 additions & 3 deletions src/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ final class Activity extends Facade
/**
* Returns information about current activity execution.
*
* @return ActivityInfo
* @throws OutOfContextException in the absence of the activity execution context.
*/
public static function getInfo(): ActivityInfo
Expand All @@ -53,7 +52,6 @@ public static function getInfo(): ActivityInfo
* }
* ```
*
* @return ValuesInterface
* @throws OutOfContextException in the absence of the activity execution context.
*/
public static function getInput(): ValuesInterface
Expand All @@ -69,7 +67,6 @@ public static function getInput(): ValuesInterface
*
* This method returns **true** if the first argument has been passed to the {@see Activity::heartbeat()} method.
*
* @return bool
* @throws OutOfContextException in the absence of the activity execution context.
*/
public static function hasHeartbeatDetails(): bool
Expand Down
4 changes: 0 additions & 4 deletions src/Activity/ActivityContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ interface ActivityContextInterface
*
* @see Activity::getInfo()
*
* @return ActivityInfo
*/
public function getInfo(): ActivityInfo;

Expand All @@ -31,7 +30,6 @@ public function getInfo(): ActivityInfo;
*
* @see Activity::getInput()
*
* @return ValuesInterface
*/
public function getInput(): ValuesInterface;

Expand All @@ -40,7 +38,6 @@ public function getInput(): ValuesInterface;
*
* @see Activity::hasHeartbeatDetails()
*
* @return bool
*/
public function hasHeartbeatDetails(): bool;

Expand All @@ -59,7 +56,6 @@ public function getHeartbeatDetails($type = null);
*
* @see Activity::doNotCompleteOnReturn()
*
* @return void
*/
public function doNotCompleteOnReturn(): void;

Expand Down
20 changes: 0 additions & 20 deletions src/Activity/ActivityInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,16 @@ final class ActivityInfo
*
* @see ActivityCompletionClientInterface::complete()
*
* @var string
*/
#[Marshal(name: 'TaskToken')]
public string $taskToken;

/**
* @var WorkflowType|null
*/
#[Marshal(name: 'WorkflowType', type: NullableType::class, of: WorkflowType::class)]
public ?WorkflowType $workflowType = null;

/**
* @var string
*/
#[Marshal(name: 'WorkflowNamespace')]
public string $workflowNamespace = 'default';

/**
* @var WorkflowExecution|null
*/
#[Marshal(name: 'WorkflowExecution', type: NullableType::class, of: WorkflowExecution::class)]
public ?WorkflowExecution $workflowExecution = null;

Expand All @@ -67,53 +57,44 @@ final class ActivityInfo
*
* @see ActivityCompletionClientInterface::complete()
*
* @var string
*/
#[Marshal(name: 'ActivityID')]
public string $id;

/**
* Type (name) of the activity.
*
* @var ActivityType
*/
#[Marshal(name: 'ActivityType', type: ObjectType::class, of: ActivityType::class)]
public ActivityType $type;

/**
* @var string
*/
#[Marshal(name: 'TaskQueue')]
public string $taskQueue = WorkerFactoryInterface::DEFAULT_TASK_QUEUE;

/**
* Maximum time between heartbeats. 0 means no heartbeat needed.
*
* @var \DateInterval
*/
#[Marshal(name: 'HeartbeatTimeout', type: DateIntervalType::class)]
public \DateInterval $heartbeatTimeout;

/**
* Time of activity scheduled by a workflow
*
* @var \DateTimeInterface
*/
#[Marshal(name: 'ScheduledTime', type: DateTimeType::class)]
public \DateTimeInterface $scheduledTime;

/**
* Time of activity start
*
* @var \DateTimeInterface
*/
#[Marshal(name: 'StartedTime', type: DateTimeType::class)]
public \DateTimeInterface $startedTime;

/**
* Time of activity timeout
*
* @var \DateTimeInterface
*/
#[Marshal(name: 'Deadline', type: DateTimeType::class)]
public \DateTimeInterface $deadline;
Expand All @@ -122,7 +103,6 @@ final class ActivityInfo
* Attempt starts from 1, and increased by 1 for every retry if
* retry policy is specified.
*
* @var int
*/
#[Marshal(name: 'Attempt')]
public int $attempt = 1;
Expand Down
3 changes: 0 additions & 3 deletions src/Activity/ActivityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ class ActivityInterface
#[Immutable]
public string $prefix = '';

/**
* @param string $prefix
*/
public function __construct(string $prefix = '')
{
$this->prefix = $prefix;
Expand Down
3 changes: 0 additions & 3 deletions src/Activity/ActivityMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ final class ActivityMethod
#[Immutable]
public ?string $name = null;

/**
* @param string|null $name
*/
public function __construct(string $name = null)
{
$this->name = $name;
Expand Down
4 changes: 0 additions & 4 deletions src/Activity/ActivityOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public function __construct()
}

/**
* @param MethodRetry|null $retry
* @return $this
*/
public function mergeWith(MethodRetry $retry = null): self
Expand All @@ -142,7 +141,6 @@ public function mergeWith(MethodRetry $retry = null): self
*
* By default, it is the same task list name the workflow was started with.
*
* @param string|null $taskQueue
* @return $this
*/
#[Pure]
Expand Down Expand Up @@ -269,7 +267,6 @@ public function withCancellationType(ActivityCancellationType|int $type): self
}

/**
* @param string $activityId
* @return $this
*/
#[Pure]
Expand All @@ -283,7 +280,6 @@ public function withActivityId(string $activityId): self
}

/**
* @param RetryOptions|null $options
* @return $this
*/
#[Pure]
Expand Down
1 change: 0 additions & 1 deletion src/Activity/ActivityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ActivityType
/**
* @psalm-readonly
* @psalm-allow-private-mutation
* @var string
*/
#[Marshal(name: 'Name')]
public string $name = '';
Expand Down
3 changes: 0 additions & 3 deletions src/Activity/LocalActivityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ final class LocalActivityInterface extends ActivityInterface
#[Immutable]
public string $prefix = '';

/**
* @param string $prefix
*/
public function __construct(string $prefix = '')
{
$this->prefix = $prefix;
Expand Down
2 changes: 0 additions & 2 deletions src/Activity/LocalActivityOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function __construct()
}

/**
* @param MethodRetry|null $retry
* @return $this
*/
public function mergeWith(MethodRetry $retry = null): self
Expand Down Expand Up @@ -142,7 +141,6 @@ public function withStartToCloseTimeout($timeout): self
}

/**
* @param RetryOptions|null $options
* @return $this
*/
#[Pure]
Expand Down
28 changes: 0 additions & 28 deletions src/Client/ActivityCompletionClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,61 +20,34 @@
interface ActivityCompletionClientInterface
{
/**
* @param string $workflowId
* @param string|null $runId
* @param string $activityId
* @param mixed $result
*/
public function complete(string $workflowId, ?string $runId, string $activityId, $result = null): void;

/**
* @param string $taskToken
* @param mixed $result
*/
public function completeByToken(string $taskToken, $result = null): void;

/**
* @param string $workflowId
* @param string|null $runId
* @param string $activityId
* @param \Throwable $error
*/
public function completeExceptionally(
string $workflowId,
?string $runId,
string $activityId,
\Throwable $error,
): void;

/**
* @param string $taskToken
* @param \Throwable $error
*/
public function completeExceptionallyByToken(string $taskToken, \Throwable $error): void;

/**
* @param string $workflowId
* @param string|null $runId
* @param string $activityId
* @param $details
*/
public function reportCancellation(
string $workflowId,
?string $runId,
string $activityId,
$details = null,
): void;

/**
* @param string $taskToken
* @param $details
*/
public function reportCancellationByToken(string $taskToken, $details = null): void;

/**
* @param string $workflowId
* @param string|null $runId
* @param string $activityId
* @param mixed $details
*
* @throw ActivityCanceledException
Expand All @@ -87,7 +60,6 @@ public function recordHeartbeat(
);

/**
* @param string $taskToken
* @param mixed $details
*
* @throw ActivityCanceledException
Expand Down
7 changes: 0 additions & 7 deletions src/Client/ClientOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ class ClientOptions
*/
public string $namespace = self::DEFAULT_NAMESPACE;

/**
* @var string
*/
public string $identity;

/**
* @var int
*/
#[ExpectedValues(valuesFromClass: QueryRejectCondition::class)]
public int $queryRejectionCondition = QueryRejectCondition::QUERY_REJECT_CONDITION_NONE;

Expand All @@ -65,7 +59,6 @@ public function withNamespace(string $namespace): self
}

/**
* @param string $identity
* @return $this
*/
#[Pure]
Expand Down
1 change: 0 additions & 1 deletion src/Client/Common/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public function getPageNumber(): int
* Note: the method may call yet another RPC to get total number of items.
* It means that the result may be different from the number of items at the moment of the pagination start.
*
* @return int
* @throws \LogicException If counter is not set.
*/
public function count(): int
Expand Down
3 changes: 0 additions & 3 deletions src/Client/Common/RpcRetryOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public static function fromRetryOptions(RetryOptions $options): self
* @param DateIntervalValue|null $interval Interval to wait on first retry, on congestion failures.
* Defaults to 1000ms, which is used if set to {@see null}.
*
* @return self
*
* @psalm-suppress ImpureMethodCall
*/
#[Pure]
Expand All @@ -76,7 +74,6 @@ public function withCongestionInitialInterval($interval): self
* @param null|float $coefficient Maximum amount of jitter.
* Default will be used if set to {@see null}.
*
* @return self
*/
#[Pure]
public function withMaximumJitterCoefficient(?float $coefficient): self
Expand Down
11 changes: 0 additions & 11 deletions src/Client/GRPC/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ final public function __construct(WorkflowServiceClient|\Closure $workflowServic

/**
* @param non-empty-string $address Temporal service address in format `host:port`
* @return static
* @psalm-suppress UndefinedClass
*/
public static function create(string $address): static
Expand All @@ -86,7 +85,6 @@ public static function create(string $address): static
* @param non-empty-string|null $clientKey Client private key string or file in PEM format.
* @param non-empty-string|null $clientPem Client certificate chain string or file in PEM format.
* @param non-empty-string|null $overrideServerName
* @return static
*
* @psalm-suppress UndefinedClass
* @psalm-suppress UnusedVariable
Expand Down Expand Up @@ -166,7 +164,6 @@ public function close(): void
/**
* @param null|Pipeline<GrpcClientInterceptor, object> $pipeline
*
* @return static
*/
final public function withInterceptorPipeline(?Pipeline $pipeline): static
{
Expand Down Expand Up @@ -233,10 +230,6 @@ public function getConnection(): ConnectionInterface

/**
* @param non-empty-string $method RPC method name
* @param object $arg
* @param ContextInterface|null $ctx
*
* @return mixed
*
* @throw ClientException
*/
Expand All @@ -262,10 +255,6 @@ protected function invoke(string $method, object $arg, ?ContextInterface $ctx =
* Used in {@see withInterceptorPipeline()}
*
* @param non-empty-string $method
* @param object $arg
* @param ContextInterface $ctx
*
* @return object
*
* @throws \Exception
*/
Expand Down
Loading

0 comments on commit 2fd17e6

Please sign in to comment.