Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Card implements Arrayable
* @param string|null $imageStyle Configure the avatar image style, one of IMAGE or AVATAR
* @return self
*/
public function header(string $title, string $subtitle = null, string $imageUrl = null, string $imageStyle = null): Card
public function header(string $title, ?string $subtitle = null, ?string $imageUrl = null, ?string $imageStyle = null): Card
{
$header = [
'title' => $title,
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Button/ImageButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setIconByUrl(string $url): ImageButton
* @param string|null $icon Either an icon name or URL to the icon image
* @return self
*/
public static function create(string $url = null, string $icon = null): ImageButton
public static function create(?string $url = null, ?string $icon = null): ImageButton
{
$button = new static;

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Button/TextButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function text(string $text): TextButton
* @param string|null $displayText
* @return self
*/
public static function create(string $url = null, string $displayText = null): TextButton
public static function create(?string $url = null, ?string $displayText = null): TextButton
{
$button = new static;

Expand Down
6 changes: 3 additions & 3 deletions src/GoogleChatMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function monospaceBlock(string $message): GoogleChatMessage
* @param string|null $displayText
* @return self
*/
public function link(string $link, string $displayText = null): GoogleChatMessage
public function link(string $link, ?string $displayText = null): GoogleChatMessage
{
if ($displayText) {
$link = "<{$link}|{$displayText}>";
Expand Down Expand Up @@ -188,7 +188,7 @@ public function mention(string $userId): GoogleChatMessage
* @param string|null $appendText
* @return self
*/
public function mentionAll(string $prependText = null, string $appendText = null): GoogleChatMessage
public function mentionAll(?string $prependText = null, ?string $appendText = null): GoogleChatMessage
{
$this->text("{$prependText}<users/all>{$appendText}");

Expand Down Expand Up @@ -262,7 +262,7 @@ private function castNestedArrayables($value)
* @param string|null $text
* @return self
*/
public static function create(string $text = null): GoogleChatMessage
public static function create(?string $text = null): GoogleChatMessage
{
$message = new static;

Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function onClick(string $url): Image
* @param string|null $onClickUrl
* @return self
*/
public static function create(string $imageUrl = null, string $onClickUrl = null): Image
public static function create(?string $imageUrl = null, ?string $onClickUrl = null): Image
{
$widget = new static;

Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/KeyValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function button(AbstractButton $button): KeyValue
* @param string|null $bottomLabel
* @return self
*/
public static function create(string $topLabel = null, string $content = null, string $bottomLabel = null): KeyValue
public static function create(?string $topLabel = null, ?string $content = null, ?string $bottomLabel = null): KeyValue
{
$widget = new static;

Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/TextParagraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function color(string $message, string $hex): TextParagraph
* @param string|null $displayText
* @return self
*/
public function link(string $link, string $displayText = null): TextParagraph
public function link(string $link, ?string $displayText = null): TextParagraph
{
return $this->text("<a href=\"{$link}\">".($displayText ?? $link).'</a>');
}
Expand All @@ -112,7 +112,7 @@ public function break(): TextParagraph
* @param string|null $message
* @return self
*/
public static function create(string $message = null): TextParagraph
public static function create(?string $message = null): TextParagraph
{
$widget = new static;

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestNotifiable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TestNotifiable

private $space;

public function __construct(string $space = null)
public function __construct(?string $space = null)
{
$this->space = $space;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/GoogleChatChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private function newNotification(): TestNotification
return new TestNotification;
}

private function newNotifiable(string $space = null): TestNotifiable
private function newNotifiable(?string $space = null): TestNotifiable
{
return new TestNotifiable($space);
}
Expand Down