Skip to content

Commit 109c17f

Browse files
committed
refactor: cleans up MessagePart static methods
1 parent ab0cc93 commit 109c17f

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

src/Messages/DTO/MessagePart.php

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -63,81 +63,6 @@ private function __construct(MessagePartTypeEnum $type)
6363
$this->type = $type;
6464
}
6565

66-
/**
67-
* Creates a text message part.
68-
*
69-
* @since n.e.x.t
70-
*
71-
* @param string $text The text content.
72-
* @return self
73-
*/
74-
public static function text(string $text): self
75-
{
76-
$part = new self(MessagePartTypeEnum::text());
77-
$part->text = $text;
78-
return $part;
79-
}
80-
81-
/**
82-
* Creates an inline file message part.
83-
*
84-
* @since n.e.x.t
85-
*
86-
* @param InlineFile $file The inline file.
87-
* @return self
88-
*/
89-
public static function inlineFile(InlineFile $file): self
90-
{
91-
$part = new self(MessagePartTypeEnum::inlineFile());
92-
$part->inlineFile = $file;
93-
return $part;
94-
}
95-
96-
/**
97-
* Creates a remote file message part.
98-
*
99-
* @since n.e.x.t
100-
*
101-
* @param RemoteFile $file The remote file.
102-
* @return self
103-
*/
104-
public static function remoteFile(RemoteFile $file): self
105-
{
106-
$part = new self(MessagePartTypeEnum::remoteFile());
107-
$part->remoteFile = $file;
108-
return $part;
109-
}
110-
111-
/**
112-
* Creates a function call message part.
113-
*
114-
* @since n.e.x.t
115-
*
116-
* @param FunctionCall $functionCall The function call.
117-
* @return self
118-
*/
119-
public static function functionCall(FunctionCall $functionCall): self
120-
{
121-
$part = new self(MessagePartTypeEnum::functionCall());
122-
$part->functionCall = $functionCall;
123-
return $part;
124-
}
125-
126-
/**
127-
* Creates a function response message part.
128-
*
129-
* @since n.e.x.t
130-
*
131-
* @param FunctionResponse $functionResponse The function response.
132-
* @return self
133-
*/
134-
public static function functionResponse(FunctionResponse $functionResponse): self
135-
{
136-
$part = new self(MessagePartTypeEnum::functionResponse());
137-
$part->functionResponse = $functionResponse;
138-
return $part;
139-
}
140-
14166
/**
14267
* Gets the type of this message part.
14368
*

0 commit comments

Comments
 (0)