Skip to content

Commit

Permalink
Merge pull request #42 from mikebronner/patch-2
Browse files Browse the repository at this point in the history
Fixed signature compatibility warnings for Laravel 9, 10, and 11
  • Loading branch information
jenssegers authored Jul 24, 2024
2 parents 907f956 + af6e08c commit 0584999
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.1, 7.2, 7.3, 8.0, 8.1]
php: [8.1,8.2,8.3]
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
Expand Down
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 8.0
- 8.1
- 8.2
- 8.3

sudo: false

Expand Down
13 changes: 6 additions & 7 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Collection as BaseCollection;
use Illuminate\Support\Str;
use JsonSerializable;

abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable
Expand Down Expand Up @@ -863,7 +863,7 @@ public function __set($key, $value)
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset): bool
public function offsetExists(mixed $offset): bool
{
return isset($this->$offset);
}
Expand All @@ -872,9 +872,8 @@ public function offsetExists($offset): bool
* Get the value for a given offset.
*
* @param mixed $offset
* @return mixed
*/
public function offsetGet($offset): mixed
* @return mix
public function offsetGet(mixed $offset): mixed
{
return $this->$offset;
}
Expand All @@ -886,7 +885,7 @@ public function offsetGet($offset): mixed
* @param mixed $value
* @return void
*/
public function offsetSet($offset, $value): void
public function offsetSet(mixed $offset, mixed $value): void
{
$this->$offset = $value;
}
Expand All @@ -897,7 +896,7 @@ public function offsetSet($offset, $value): void
* @param mixed $offset
* @return void
*/
public function offsetUnset($offset): void
public function offsetUnset(mixed $offset): void
{
unset($this->$offset);
}
Expand Down

0 comments on commit 0584999

Please sign in to comment.