File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ public function jsonSerialize(): array
122
122
* {@inheritDoc}
123
123
*
124
124
* @since n.e.x.t
125
+ *
126
+ * @return self|UserMessage|ModelMessage|SystemMessage
125
127
*/
126
128
final public static function fromJson (array $ json ): Message
127
129
{
@@ -133,17 +135,13 @@ final public static function fromJson(array $json): Message
133
135
134
136
// Determine which concrete class to instantiate based on role
135
137
if ($ role ->isUser ()) {
136
- /** @phpstan-ignore-next-line */
137
138
return new UserMessage ($ parts );
138
139
} elseif ($ role ->isModel ()) {
139
- /** @phpstan-ignore-next-line */
140
140
return new ModelMessage ($ parts );
141
141
} elseif ($ role ->isSystem ()) {
142
- /** @phpstan-ignore-next-line */
143
142
return new SystemMessage ($ parts );
144
143
}
145
144
146
- /** @phpstan-ignore-next-line */
147
145
return new self ($ role , $ parts );
148
146
}
149
147
}
You can’t perform that action at this time.
0 commit comments