From 8758c8db3fab4ea0bed0facb760c46265de3a3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 6 Apr 2021 22:24:25 +0200 Subject: [PATCH] more php 7 changes --- app/Models/Tip.php | 2 +- app/Twitter/Tweet.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Tip.php b/app/Models/Tip.php index 9185114..663a41a 100644 --- a/app/Models/Tip.php +++ b/app/Models/Tip.php @@ -57,7 +57,7 @@ class Tip extends Model return $this->belongsTo(Author::class, 'author_username', 'username'); } - public function getTweetUrlAttribute(): string|null + public function getTweetUrlAttribute(): string { return "https://twitter.com/{$this->author_username}/status/{$this->tweet_id}"; } diff --git a/app/Twitter/Tweet.php b/app/Twitter/Tweet.php index 2aebc87..a9fce52 100644 --- a/app/Twitter/Tweet.php +++ b/app/Twitter/Tweet.php @@ -12,14 +12,14 @@ class Tweet public string $id; public string $text; public TwitterUser $author; - public string|null $threadId = null; + public ?string $threadId = null; public array $images = []; public function __construct( string $id, string $text, TwitterUser $author, - string|null $threadId = null, + ?string $threadId = null, array $images = [], ) { $this->id = $id;