Skip to content

Commit

Permalink
Update psalm baseline; trim comment blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Dec 9, 2024
1 parent 46fa6a8 commit 8cb243a
Show file tree
Hide file tree
Showing 41 changed files with 8 additions and 142 deletions.
30 changes: 7 additions & 23 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,6 @@
<code><![CDATA[new static(static::DEFAULT_ERROR_MESSAGE)]]></code>
</UnsafeInstantiation>
</file>
<file src="src/Exception/ExceptionInterceptor.php">
<LessSpecificReturnStatement>
<code><![CDATA[new self([\Error::class])]]></code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code><![CDATA[static]]></code>
</MoreSpecificReturnType>
</file>
<file src="src/Exception/Failure/FailureConverter.php">
<DocblockTypeContradiction>
<code><![CDATA[\is_array($frame)]]></code>
Expand Down Expand Up @@ -508,7 +500,6 @@
</file>
<file src="src/Internal/Declaration/Reader/WorkflowReader.php">
<ArgumentTypeCoercion>
<code><![CDATA[$class]]></code>
<code><![CDATA[$contextualRetry]]></code>
<code><![CDATA[$method]]></code>
<code><![CDATA[$name]]></code>
Expand Down Expand Up @@ -566,11 +557,9 @@
<PossiblyNullFunctionCall>
<code><![CDATA[$callback(...$arguments)]]></code>
</PossiblyNullFunctionCall>
</file>
<file src="src/Internal/Events/EventListenerInterface.php">
<InvalidTemplateParam>
<code><![CDATA[T]]></code>
</InvalidTemplateParam>
<PropertyTypeCoercion>
<code><![CDATA[$this->once]]></code>
</PropertyTypeCoercion>
</file>
<file src="src/Internal/Interceptor/Pipeline.php">
<ImpureFunctionCall>
Expand Down Expand Up @@ -878,6 +867,10 @@
</UndefinedInterfaceMethod>
</file>
<file src="src/Internal/Transport/CompletableResult.php">
<ArgumentTypeCoercion>
<code><![CDATA[$this->layer]]></code>
<code><![CDATA[$this->layer]]></code>
</ArgumentTypeCoercion>
<MoreSpecificImplementedParamType>
<code><![CDATA[$onFulfilled]]></code>
<code><![CDATA[$onRejected]]></code>
Expand Down Expand Up @@ -1218,10 +1211,6 @@
<InvalidOperand>
<code><![CDATA[$promisesOrValues]]></code>
</InvalidOperand>
<MissingParamType>
<code><![CDATA[$promiseOrValue]]></code>
<code><![CDATA[$promiseOrValue]]></code>
</MissingParamType>
<TooManyArguments>
<code><![CDATA[$reduce($c, $value, $i++, $total)]]></code>
</TooManyArguments>
Expand Down Expand Up @@ -1367,11 +1356,6 @@
<code><![CDATA[$method]]></code>
</ArgumentTypeCoercion>
</file>
<file src="src/Worker/Transport/RPCConnectionInterface.php">
<MissingParamType>
<code><![CDATA[$payload]]></code>
</MissingParamType>
</file>
<file src="src/Worker/Transport/RoadRunner.php">
<ArgumentTypeCoercion>
<code><![CDATA[$env->getRelayAddress()]]></code>
Expand Down
4 changes: 0 additions & 4 deletions src/Activity/ActivityContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,20 @@ interface ActivityContextInterface
* Returns information about current activity execution.
*
* @see Activity::getInfo()
*
*/
public function getInfo(): ActivityInfo;

/**
* Returns activity execution input arguments.
*
* @see Activity::getInput()
*
*/
public function getInput(): ValuesInterface;

/**
* Check if the heartbeat's first argument has been passed.
*
* @see Activity::hasHeartbeatDetails()
*
*/
public function hasHeartbeatDetails(): bool;

Expand All @@ -55,7 +52,6 @@ public function getHeartbeatDetails($type = null);
* Marks the activity as incomplete for asynchronous completion.
*
* @see Activity::doNotCompleteOnReturn()
*
*/
public function doNotCompleteOnReturn(): void;

Expand Down
8 changes: 0 additions & 8 deletions src/Activity/ActivityInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ final class ActivityInfo
* A correlation token that can be used to complete the activity through `complete` method.
*
* @see ActivityCompletionClientInterface::complete()
*
*/
#[Marshal(name: 'TaskToken')]
public string $taskToken;
Expand All @@ -56,14 +55,12 @@ final class ActivityInfo
* activity through `complete` method.
*
* @see ActivityCompletionClientInterface::complete()
*
*/
#[Marshal(name: 'ActivityID')]
public string $id;

/**
* Type (name) of the activity.
*
*/
#[Marshal(name: 'ActivityType', type: ObjectType::class, of: ActivityType::class)]
public ActivityType $type;
Expand All @@ -73,36 +70,31 @@ final class ActivityInfo

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

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

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

/**
* Time of activity timeout
*
*/
#[Marshal(name: 'Deadline', type: DateTimeType::class)]
public \DateTimeInterface $deadline;

/**
* Attempt starts from 1, and increased by 1 for every retry if
* retry policy is specified.
*
*/
#[Marshal(name: 'Attempt')]
public int $attempt = 1;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Common/RpcRetryOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function withCongestionInitialInterval($interval): self
*
* @param null|float $coefficient Maximum amount of jitter.
* Default will be used if set to {@see null}.
*
*/
#[Pure]
public function withMaximumJitterCoefficient(?float $coefficient): self
Expand Down
1 change: 0 additions & 1 deletion src/Client/GRPC/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ public function close(): void

/**
* @param null|Pipeline<GrpcClientInterceptor, object> $pipeline
*
*/
final public function withInterceptorPipeline(?Pipeline $pipeline): static
{
Expand Down
1 change: 0 additions & 1 deletion src/Client/Update/UpdateHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public function getId(): string

/**
* Check there is a cached accepted result or failure for this update request.
*
*/
public function hasResult(): bool
{
Expand Down
4 changes: 0 additions & 4 deletions src/Client/WorkflowClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function newWorkflowStub(
*
* IMPORTANT! Stub is per workflow instance. So new stub should be created
* for each new one.
*
*/
public function newUntypedWorkflowStub(
string $workflowType,
Expand All @@ -96,7 +95,6 @@ public function newRunningWorkflowStub(

/**
* Returns untyped workflow stub associated with running workflow.
*
*/
public function newUntypedRunningWorkflowStub(
string $workflowID,
Expand All @@ -111,7 +109,6 @@ public function newUntypedRunningWorkflowStub(
* Only relevant for activity implementations that called {@see ActivityContext::doNotCompleteOnReturn()}.
*
* @see ActivityCompletionClient
*
*/
public function newActivityCompletionClient(): ActivityCompletionClientInterface;

Expand Down Expand Up @@ -166,7 +163,6 @@ public function countWorkflowExecutions(
* Available values are {@see HistoryEventFilterType} constants.
* @param int<0, max> $pageSize Size of the pages to be requested. It affects internal queries only. Use it if you
* want to load limited number of events from the history.
*
*/
public function getWorkflowHistory(
WorkflowExecution $execution,
Expand Down
5 changes: 0 additions & 5 deletions src/Client/WorkflowStubInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function getWorkflowType(): ?string;
/**
* Returns associated workflow options. Empty for running workflows. Workflow options are immutable and can
* not be changed after the workflow was created.
*
*/
public function getOptions(): ?WorkflowOptions;

Expand All @@ -50,13 +49,11 @@ public function getExecution(): WorkflowExecution;

/**
* Check if workflow was started and has associated execution.
*
*/
public function hasExecution(): bool;

/**
* Attaches running workflow context to the workflow stub.
*
*/
public function setExecution(WorkflowExecution $execution): void;

Expand Down Expand Up @@ -119,7 +116,6 @@ public function getUpdateHandle(string $updateId, mixed $resultType = null): Upd
* Cancellation cancels {@see CancellationScopeInterface} that wraps the
* main workflow method. Note that workflow can take long time to get
* canceled or even completely ignore the cancellation request.
*
*/
public function cancel(): void;

Expand All @@ -128,7 +124,6 @@ public function cancel(): void;
*
* Termination is a hard stop of a workflow execution which doesn't give
* workflow code any chance to perform cleanup.
*
*/
public function terminate(string $reason, array $details = []): void;
}
1 change: 0 additions & 1 deletion src/Common/CronSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ final class CronSchedule implements \Stringable
* │ │ │ │ │
* * * * * *
* ```
*
*/
#[Immutable]
public string $interval;
Expand Down
2 changes: 0 additions & 2 deletions src/DataConverter/EncodedValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static function sliceValues(
* Decode promise response upon returning it to the domain layer.
*
* @param string|\ReflectionClass|\ReflectionType|Type|null $type
*
*/
public static function decodePromise(PromiseInterface $promise, $type = null): PromiseInterface
{
Expand All @@ -101,7 +100,6 @@ public static function fromValues(array $values, ?DataConverterInterface $dataCo

/**
* @param TPayloadsCollection $payloads
*
*/
public static function fromPayloadCollection(
\Traversable $payloads,
Expand Down
1 change: 0 additions & 1 deletion src/DataConverter/PayloadConverterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface PayloadConverterInterface
{
/**
* Returns associated encoding type.
*
*/
public function getEncodingType(): string;

Expand Down
2 changes: 0 additions & 2 deletions src/DataConverter/ValuesInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ interface ValuesInterface extends \Countable
{
/**
* Checks if any value present.
*
*/
public function isEmpty(): bool;

Expand All @@ -41,7 +40,6 @@ public function getValue(int $index, $type);

/**
* Returns associated payloads.
*
*/
public function toPayloads(): Payloads;
}
1 change: 0 additions & 1 deletion src/Exception/Failure/TemporalFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public function __toString(): string

/**
* Explain known types of key=>value pairs.
*
*/
protected static function buildMessage(array $values): string
{
Expand Down
1 change: 0 additions & 1 deletion src/Interceptor/ActivityInboundInterceptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ interface ActivityInboundInterceptor extends Interceptor
* Intercepts a call to the main activity entry method.
*
* @param callable(ActivityInput): mixed $next
*
*/
public function handleActivityInbound(ActivityInput $input, callable $next): mixed;
}
1 change: 0 additions & 1 deletion src/Interceptor/GrpcClientInterceptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ interface GrpcClientInterceptor extends Interceptor
*
* @param non-empty-string $method
* @param callable(non-empty-string, object, ContextInterface): object $next
*
*/
public function interceptCall(string $method, object $arg, ContextInterface $ctx, callable $next): object;
}
Loading

0 comments on commit 8cb243a

Please sign in to comment.