44
55namespace Temporal \Support \Factory ;
66
7- use DateInterval ;
87use Temporal \Activity \ActivityOptions ;
98use Temporal \Internal \Workflow \ActivityProxy ;
109use Temporal \Support \Attribute \RetryPolicy ;
1514use Temporal \Support \Internal \RetryOptions ;
1615use Temporal \Workflow ;
1716use Temporal \Workflow \ActivityStubInterface ;
18- use Throwable ;
1917
2018final class ActivityStub
2119{
@@ -29,29 +27,28 @@ final class ActivityStub
2927 * @param int<0, max>|null $retryAttempts Maximum number of attempts. When exceeded the retries stop even
3028 * if not expired yet. If not set or set to 0, it means unlimited, and rely on activity
3129 * {@see ActivityOptions::$scheduleToCloseTimeout} to stop.
32- * @param DateInterval|string|int|null $retryInitInterval Backoff interval for the first retry.
30+ * @param \ DateInterval|string|int|null $retryInitInterval Backoff interval for the first retry.
3331 * If $retryBackoff is 1.0 then it is used for all retries.
3432 * Int value in seconds.
35- * @param DateInterval|string|int|null $retryMaxInterval Maximum backoff interval between retries.
33+ * @param \ DateInterval|string|int|null $retryMaxInterval Maximum backoff interval between retries.
3634 * Exponential backoff leads to interval increase. This value is the cap of the interval.
3735 * Int value in seconds.
3836 * Default is 100x of $retryInitInterval.
3937 * @param float|null $retryBackoff Coefficient used to calculate the next retry backoff interval.
4038 * The next retry interval is previous interval multiplied by this coefficient.
4139 * Note: Must be greater than 1.0
42- * @param list<class-string<Throwable>> $nonRetryables Non-retriable errors. Temporal server will stop retry
40+ * @param list<class-string<\ Throwable>> $nonRetryables Non-retriable errors. Temporal server will stop retry
4341 * if error type matches this list.
44- * @param DateInterval|string|int $scheduleToStartTimeout Time activity can stay in task queue before it
42+ * @param \ DateInterval|string|int $scheduleToStartTimeout Time activity can stay in task queue before it
4543 * is picked up by a worker. If $scheduleToCloseTimeout is not provided then
4644 * both this and $startToCloseTimeout are required.
47- * @param DateInterval|string|int $startToCloseTimeout Maximum activity execution time after it was sent
45+ * @param \ DateInterval|string|int $startToCloseTimeout Maximum activity execution time after it was sent
4846 * to a worker. If $scheduleToCloseTimeout is not provided then both this
4947 * and $scheduleToStartTimeout are required.
50- * @param DateInterval|string|int $scheduleToCloseTimeout Overall timeout workflow is willing to wait for
48+ * @param \ DateInterval|string|int $scheduleToCloseTimeout Overall timeout workflow is willing to wait for
5149 * activity to complete. It includes time in a task queue ($scheduleToStartTimeout) plus activity
5250 * execution time ($startToCloseTimeout).
5351 * Either this option or both $scheduleToStartTimeout and $startToCloseTimeout are required.
54- * @param DateInterval|string|int $heartbeatTimeout
5552 * @param \Stringable|non-empty-string|null $activityId Business level activity ID, this is not needed
5653 * for most of the cases. If you have to specify this, then talk to the temporal team.
5754 * This is something will be done in the future.
@@ -99,7 +96,7 @@ public static function activity(
9996 $ scheduleToCloseTimeout === 0 or $ options = $ options ->withScheduleToCloseTimeout ($ scheduleToCloseTimeout );
10097 $ heartbeatTimeout === 0 or $ options = $ options ->withHeartbeatTimeout ($ heartbeatTimeout );
10198 // Activity ID
102- $ activityId === null or $ options = $ options ->withActivityId ((string )$ activityId );
99+ $ activityId === null or $ options = $ options ->withActivityId ((string ) $ activityId );
103100 $ cancellationType === 0 or $ options = $ options ->withCancellationType ($ cancellationType );
104101
105102 return $ class === null
0 commit comments