diff --git a/.travis.yml b/.travis.yml index 84acabe..578e324 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ before_install: - git submodule update --init --recursive language: php php: - - 7.1 - - 7.2 - - 7.3 + - 7.x + - 8.x script: phpunit tests/AllTests.php diff --git a/lib/model/Tweet.php b/lib/model/Tweet.php index 7f48c19..42ab626 100644 --- a/lib/model/Tweet.php +++ b/lib/model/Tweet.php @@ -35,7 +35,7 @@ public function __construct(array $array) { $this->user = new User($array); } - function jsonSerialize() { + function jsonSerialize(): array { return [ 'id' => $this->id, 'createdAt' => $this->createdAt, @@ -165,4 +165,4 @@ public function getUser() { public function setUser(User $user) { $this->user = $user; } -} \ No newline at end of file +} diff --git a/lib/model/User.php b/lib/model/User.php index 3165654..d5c81bc 100644 --- a/lib/model/User.php +++ b/lib/model/User.php @@ -15,7 +15,7 @@ public function __construct(array $array) { $this->screenName = $array['screen_name']; } - public function jsonSerialize() { + public function jsonSerialize(): array { return [ 'id' => $this->id, 'name' => $this->name, @@ -56,4 +56,4 @@ public function setScreenName($screenName) { $this->screenName = $screenName; } -} \ No newline at end of file +}