Skip to content

Commit

Permalink
fixed builders phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
cappuc committed Jan 3, 2024
1 parent b7f6450 commit 60e27b9
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 5 deletions.
20 changes: 19 additions & 1 deletion src/Builder/ActivityBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,32 @@

namespace Keepsuit\LaravelTemporal\Builder;

use DateInterval;
use InvalidArgumentException;
use Keepsuit\LaravelTemporal\Facade\Temporal;
use Temporal\Activity\ActivityOptions;
use Temporal\Common\RetryOptions;
use Temporal\Internal\Workflow\ActivityProxy;
use Temporal\Workflow\ActivityStubInterface;

/**
* @mixin ActivityOptions
* @property string|null $taskQueue
* @property DateInterval $scheduleToCloseTimeout
* @property DateInterval $scheduleToStartTimeout
* @property DateInterval $startToCloseTimeout
* @property DateInterval $heartbeatTimeout
* @property int $cancellationType
* @property string $activityId
* @property ?RetryOptions $retryOptions
*
* @method self withTaskQueue(?string $taskQueue)
* @method self withScheduleToCloseTimeout(DateInterval $timeout)
* @method self withScheduleToStartTimeout(DateInterval $timeout)
* @method self withStartToCloseTimeout(DateInterval $timeout)
* @method self withHeartbeatTimeout(DateInterval $timeout)
* @method self withCancellationType(int $type)
* @method self withActivityId(string $activityId)
* @method self withRetryOptions(?RetryOptions $options)
*/
class ActivityBuilder
{
Expand Down
30 changes: 29 additions & 1 deletion src/Builder/ChildWorkflowBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,42 @@

namespace Keepsuit\LaravelTemporal\Builder;

use DateInterval;
use InvalidArgumentException;
use Keepsuit\LaravelTemporal\Facade\Temporal;
use Temporal\Common\RetryOptions;
use Temporal\Internal\Workflow\ChildWorkflowProxy;
use Temporal\Workflow\ChildWorkflowOptions;
use Temporal\Workflow\ChildWorkflowStubInterface;

/**
* @mixin ChildWorkflowOptions
* @property string $namespace
* @property ?string $workflowId
* @property string $taskQueue
* @property DateInterval $workflowExecutionTimeout
* @property DateInterval $workflowRunTimeout
* @property DateInterval $workflowTaskTimeout
* @property int $childWorkflowCancellationType
* @property int $workflowIdReusePolicy
* @property ?RetryOptions $retryOptions
* @property ?string $cronSchedule
* @property int $parentClosePolicy
* @property ?array $memo
* @property ?array $searchAttributes
*
* @method ChildWorkflowBuilder withNamespace(string $namespace)
* @method ChildWorkflowBuilder withWorkflowId(string $workflowId)
* @method ChildWorkflowBuilder withTaskQueue(string $taskQueue)
* @method ChildWorkflowBuilder withWorkflowExecutionTimeout(DateInterval $timeout)
* @method ChildWorkflowBuilder withWorkflowRunTimeout(DateInterval $timeout)
* @method ChildWorkflowBuilder withWorkflowTaskTimeout(DateInterval $timeout)
* @method ChildWorkflowBuilder withChildWorkflowCancellationType(int $type)
* @method ChildWorkflowBuilder withWorkflowIdReusePolicy(int $policy)
* @method ChildWorkflowBuilder withRetryOptions(?RetryOptions $options)
* @method ChildWorkflowBuilder withCronSchedule(?string $expression)
* @method ChildWorkflowBuilder withMemo(?array $memo)
* @method ChildWorkflowBuilder withSearchAttributes(?array $searchAttributes)
* @method ChildWorkflowBuilder withParentClosePolicy(int $policy)
*/
class ChildWorkflowBuilder
{
Expand Down
10 changes: 9 additions & 1 deletion src/Builder/LocalActivityBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

namespace Keepsuit\LaravelTemporal\Builder;

use DateInterval;
use InvalidArgumentException;
use Keepsuit\LaravelTemporal\Facade\Temporal;
use Temporal\Activity\LocalActivityOptions;
use Temporal\Common\RetryOptions;
use Temporal\Internal\Workflow\ActivityProxy;
use Temporal\Workflow\ActivityStubInterface;

/**
* @mixin LocalActivityOptions
* @property DateInterval $scheduleToCloseTimeout
* @property DateInterval $startToCloseTimeout
* @property ?RetryOptions $retryOptions
*
* @method self withScheduleToCloseTimeout(DateInterval $timeout)
* @method self withStartToCloseTimeout(DateInterval $timeout)
* @method self withRetryOptions(?RetryOptions $options)
*/
class LocalActivityBuilder
{
Expand Down
26 changes: 24 additions & 2 deletions src/Builder/WorkflowBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,38 @@

namespace Keepsuit\LaravelTemporal\Builder;

use DateInterval;
use InvalidArgumentException;
use Temporal\Client\WorkflowClientInterface;
use Temporal\Client\WorkflowOptions;
use Temporal\Client\WorkflowStubInterface;
use Temporal\Common\RetryOptions;
use Temporal\Internal\Client\WorkflowProxy;

/**
* @mixin WorkflowOptions
* @property string|null $runId
* @property string $workflowId
* @property string $taskQueue
* @property bool $eagerStart
* @property DateInterval $workflowExecutionTimeout
* @property DateInterval $workflowRunTimeout
* @property DateInterval $workflowTaskTimeout
* @property int $workflowIdReusePolicy
* @property ?RetryOptions $retryOptions
* @property ?string $cronSchedule
* @property ?array $memo
* @property ?array $searchAttributes
*
* @property string|null $runId
* @method self withWorkflowId(string $workflowId)
* @method self withTaskQueue(string $taskQueue)
* @method self withWorkflowExecutionTimeout(DateInterval $timeout)
* @method self withWorkflowRunTimeout(DateInterval $timeout)
* @method self withWorkflowTaskTimeout(DateInterval $timeout)
* @method self withWorkflowIdReusePolicy(int $policy)
* @method self withRetryOptions(?RetryOptions $options)
* @method self withCronSchedule(?string $expression)
* @method self withMemo(?array $memo)
* @method self withSearchAttributes(?array $searchAttributes)
*/
class WorkflowBuilder
{
Expand Down

0 comments on commit 60e27b9

Please sign in to comment.