Skip to content

Commit ca79d75

Browse files
committed
Update code style; fix PHP8.4 nullable types deprecations
1 parent 942885c commit ca79d75

File tree

240 files changed

+234
-2822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+234
-2822
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"jetbrains/phpstorm-attributes": "dev-master@dev",
6060
"laminas/laminas-code": "^4.0",
6161
"phpunit/phpunit": "^10.5",
62-
"spiral/code-style": "~2.1.2",
62+
"spiral/code-style": "~2.2.1",
6363
"spiral/core": "^3.13",
6464
"symfony/var-dumper": "^6.0 || ^7.0",
6565
"vimeo/psalm": "^4.30 || ^5.4"
@@ -91,7 +91,7 @@
9191
},
9292
"extra": {
9393
"branch-alias": {
94-
"dev-master": "2.11.x-dev"
94+
"dev-master": "2.12.x-dev"
9595
}
9696
},
9797
"config": {

src/Activity.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ final class Activity extends Facade
2626
/**
2727
* Returns information about current activity execution.
2828
*
29-
* @return ActivityInfo
3029
* @throws OutOfContextException in the absence of the activity execution context.
3130
*/
3231
public static function getInfo(): ActivityInfo
@@ -53,7 +52,6 @@ public static function getInfo(): ActivityInfo
5352
* }
5453
* ```
5554
*
56-
* @return ValuesInterface
5755
* @throws OutOfContextException in the absence of the activity execution context.
5856
*/
5957
public static function getInput(): ValuesInterface
@@ -69,7 +67,6 @@ public static function getInput(): ValuesInterface
6967
*
7068
* This method returns **true** if the first argument has been passed to the {@see Activity::heartbeat()} method.
7169
*
72-
* @return bool
7370
* @throws OutOfContextException in the absence of the activity execution context.
7471
*/
7572
public static function hasHeartbeatDetails(): bool

src/Activity/ActivityContextInterface.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ interface ActivityContextInterface
2222
*
2323
* @see Activity::getInfo()
2424
*
25-
* @return ActivityInfo
2625
*/
2726
public function getInfo(): ActivityInfo;
2827

@@ -31,7 +30,6 @@ public function getInfo(): ActivityInfo;
3130
*
3231
* @see Activity::getInput()
3332
*
34-
* @return ValuesInterface
3533
*/
3634
public function getInput(): ValuesInterface;
3735

@@ -40,7 +38,6 @@ public function getInput(): ValuesInterface;
4038
*
4139
* @see Activity::hasHeartbeatDetails()
4240
*
43-
* @return bool
4441
*/
4542
public function hasHeartbeatDetails(): bool;
4643

@@ -59,7 +56,6 @@ public function getHeartbeatDetails($type = null);
5956
*
6057
* @see Activity::doNotCompleteOnReturn()
6158
*
62-
* @return void
6359
*/
6460
public function doNotCompleteOnReturn(): void;
6561

src/Activity/ActivityInfo.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,16 @@ final class ActivityInfo
3838
*
3939
* @see ActivityCompletionClientInterface::complete()
4040
*
41-
* @var string
4241
*/
4342
#[Marshal(name: 'TaskToken')]
4443
public string $taskToken;
4544

46-
/**
47-
* @var WorkflowType|null
48-
*/
4945
#[Marshal(name: 'WorkflowType', type: NullableType::class, of: WorkflowType::class)]
5046
public ?WorkflowType $workflowType = null;
5147

52-
/**
53-
* @var string
54-
*/
5548
#[Marshal(name: 'WorkflowNamespace')]
5649
public string $workflowNamespace = 'default';
5750

58-
/**
59-
* @var WorkflowExecution|null
60-
*/
6151
#[Marshal(name: 'WorkflowExecution', type: NullableType::class, of: WorkflowExecution::class)]
6252
public ?WorkflowExecution $workflowExecution = null;
6353

@@ -67,53 +57,44 @@ final class ActivityInfo
6757
*
6858
* @see ActivityCompletionClientInterface::complete()
6959
*
70-
* @var string
7160
*/
7261
#[Marshal(name: 'ActivityID')]
7362
public string $id;
7463

7564
/**
7665
* Type (name) of the activity.
7766
*
78-
* @var ActivityType
7967
*/
8068
#[Marshal(name: 'ActivityType', type: ObjectType::class, of: ActivityType::class)]
8169
public ActivityType $type;
8270

83-
/**
84-
* @var string
85-
*/
8671
#[Marshal(name: 'TaskQueue')]
8772
public string $taskQueue = WorkerFactoryInterface::DEFAULT_TASK_QUEUE;
8873

8974
/**
9075
* Maximum time between heartbeats. 0 means no heartbeat needed.
9176
*
92-
* @var \DateInterval
9377
*/
9478
#[Marshal(name: 'HeartbeatTimeout', type: DateIntervalType::class)]
9579
public \DateInterval $heartbeatTimeout;
9680

9781
/**
9882
* Time of activity scheduled by a workflow
9983
*
100-
* @var \DateTimeInterface
10184
*/
10285
#[Marshal(name: 'ScheduledTime', type: DateTimeType::class)]
10386
public \DateTimeInterface $scheduledTime;
10487

10588
/**
10689
* Time of activity start
10790
*
108-
* @var \DateTimeInterface
10991
*/
11092
#[Marshal(name: 'StartedTime', type: DateTimeType::class)]
11193
public \DateTimeInterface $startedTime;
11294

11395
/**
11496
* Time of activity timeout
11597
*
116-
* @var \DateTimeInterface
11798
*/
11899
#[Marshal(name: 'Deadline', type: DateTimeType::class)]
119100
public \DateTimeInterface $deadline;
@@ -122,7 +103,6 @@ final class ActivityInfo
122103
* Attempt starts from 1, and increased by 1 for every retry if
123104
* retry policy is specified.
124105
*
125-
* @var int
126106
*/
127107
#[Marshal(name: 'Attempt')]
128108
public int $attempt = 1;

src/Activity/ActivityInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ class ActivityInterface
4949
#[Immutable]
5050
public string $prefix = '';
5151

52-
/**
53-
* @param string $prefix
54-
*/
5552
public function __construct(string $prefix = '')
5653
{
5754
$this->prefix = $prefix;

src/Activity/ActivityMethod.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ final class ActivityMethod
3333
#[Immutable]
3434
public ?string $name = null;
3535

36-
/**
37-
* @param string|null $name
38-
*/
39-
public function __construct(string $name = null)
36+
public function __construct(?string $name = null)
4037
{
4138
$this->name = $name;
4239
}

src/Activity/ActivityOptions.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,9 @@ public function __construct()
123123
}
124124

125125
/**
126-
* @param MethodRetry|null $retry
127126
* @return $this
128127
*/
129-
public function mergeWith(MethodRetry $retry = null): self
128+
public function mergeWith(?MethodRetry $retry = null): self
130129
{
131130
$self = clone $this;
132131

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

271269
/**
272-
* @param string $activityId
273270
* @return $this
274271
*/
275272
#[Pure]
@@ -283,7 +280,6 @@ public function withActivityId(string $activityId): self
283280
}
284281

285282
/**
286-
* @param RetryOptions|null $options
287283
* @return $this
288284
*/
289285
#[Pure]

src/Activity/ActivityOptionsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
*/
1212
interface ActivityOptionsInterface
1313
{
14-
public function mergeWith(MethodRetry $retry = null): self;
14+
public function mergeWith(?MethodRetry $retry = null): self;
1515
}

src/Activity/ActivityType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class ActivityType
2121
/**
2222
* @psalm-readonly
2323
* @psalm-allow-private-mutation
24-
* @var string
2524
*/
2625
#[Marshal(name: 'Name')]
2726
public string $name = '';

src/Activity/LocalActivityInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ final class LocalActivityInterface extends ActivityInterface
4949
#[Immutable]
5050
public string $prefix = '';
5151

52-
/**
53-
* @param string $prefix
54-
*/
5552
public function __construct(string $prefix = '')
5653
{
5754
$this->prefix = $prefix;

0 commit comments

Comments
 (0)