Skip to content

Commit acda499

Browse files
committed
Add create methods to Messages
1 parent aace692 commit acda499

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/TwilioCallMessage.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ public function __construct($url = '')
2929
$this->url = $url;
3030
}
3131

32+
/**
33+
* @param string $url
34+
*
35+
* @return static
36+
*/
37+
public static function create($url = '')
38+
{
39+
return new static($url);
40+
}
41+
3242
/**
3343
* Set the message content.
3444
*

src/TwilioSmsMessage.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ public function __construct($content = '')
2929
$this->content = $content;
3030
}
3131

32+
/**
33+
* @param string $content
34+
*
35+
* @return static
36+
*/
37+
public static function create($content = '')
38+
{
39+
return new static($content);
40+
}
41+
3242
/**
3343
* Set the message content.
3444
*

0 commit comments

Comments
 (0)