Skip to content

Commit 5afff0c

Browse files
committed
Update dependencies and simplify class constructors
1 parent 113d52b commit 5afff0c

6 files changed

Lines changed: 15 additions & 16 deletions

File tree

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
"require": {
2121
"php": "^8.2",
2222
"spatie/laravel-package-tools": "^1.16",
23-
"illuminate/contracts": "^11.0|^12.0"
23+
"illuminate/contracts": "^13.0"
2424
},
2525
"require-dev": {
2626
"laravel/pint": "^1.14",
2727
"nunomaduro/collision": "^8.1.1",
28-
"larastan/larastan": "^2.9",
29-
"orchestra/testbench": "^9.0|^10.0",
30-
"pestphp/pest": "^3.0",
31-
"pestphp/pest-plugin-arch": "^3.0",
32-
"pestphp/pest-plugin-laravel": "^2.0||^3.0",
28+
"larastan/larastan": "^2.9|^3.0",
29+
"orchestra/testbench": "^9.0|^10.0|^11.0",
30+
"pestphp/pest": "^3.0|^4.0",
31+
"pestphp/pest-plugin-arch": "^3.0|^4.0|^5.0",
32+
"pestphp/pest-plugin-laravel": "^2.0|^3.0|^4.0|^5.0",
3333
"phpstan/extension-installer": "^1.3",
34-
"phpstan/phpstan-deprecation-rules": "^1.1",
35-
"phpstan/phpstan-phpunit": "^1.3"
34+
"phpstan/phpstan-deprecation-rules": "^1.1|^2.0",
35+
"phpstan/phpstan-phpunit": "^1.3|^2.0"
3636
},
3737
"autoload": {
3838
"psr-4": {

src/Fireable.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class Fireable
1010
public function __construct(
1111
protected readonly Model $model,
1212
protected readonly array $fireableAttributes = [],
13-
) {
14-
}
13+
) {}
1514

1615
/**
1716
* Match updated attributes with fireable ones and trigger events.

src/FireableAttributes.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
namespace BinaryCats\FireableAttributeEvents;
44

5+
use Illuminate\Database\Eloquent\Model;
6+
57
/**
6-
* @mixin \Illuminate\Database\Eloquent\Model
8+
* @mixin Model
79
*/
810
trait FireableAttributes
911
{

tests/stubs/StatusChangedToOpen.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ class StatusChangedToOpen
66
{
77
public function __construct(
88
public readonly TestModel $model,
9-
) {
10-
}
9+
) {}
1110
}

tests/stubs/TestModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestModel extends Model
1313
protected $guarded = [];
1414

1515
protected array $fireableAttributes = [
16-
'value' => ValueChanged::class,
16+
'value' => ValueChanged::class,
1717
'status' => [
1818
'open' => StatusChangedToOpen::class,
1919
],

tests/stubs/ValueChanged.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ class ValueChanged
66
{
77
public function __construct(
88
public readonly TestModel $model,
9-
) {
10-
}
9+
) {}
1110
}

0 commit comments

Comments
 (0)