Skip to content

Commit cdced73

Browse files
authored
Merge branch 'main' into feature/boost-guidelines
2 parents 50aff75 + 6aac342 commit cdced73

31 files changed

+412
-322
lines changed

.github/workflows/php-cs-fixer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v5
11+
uses: actions/checkout@v6
1212
with:
1313
ref: ${{ github.head_ref }}
1414

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: phpstan
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v5
14+
- uses: actions/checkout@v6
1515

1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3333

3434
- name: Setup PHP
3535
uses: shivammathur/setup-php@v2

.github/workflows/update-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@v6
1414
with:
1515
ref: main
1616

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
],
1919
"require": {
2020
"php": "^8.0",
21+
"driftingly/rector-laravel": "^2.1",
2122
"illuminate/contracts": "^11.0|^12.0",
2223
"spatie/laravel-package-tools": "^1.9.2"
2324
},

database/factories/PostFactory.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44

55
use Oddvalue\LaravelDrafts\Tests\app\Models\Post;
66

7+
/**
8+
* @extends \Illuminate\Database\Eloquent\Factories\Factory<Post>
9+
*/
710
class PostFactory extends \Illuminate\Database\Eloquent\Factories\Factory
811
{
912
protected $model = Post::class;
1013

1114
/**
12-
* @inheritDoc
15+
* @return array<string, mixed>
16+
* @phpstan-ignore method.childReturnType
1317
*/
14-
public function definition()
18+
public function definition(): array
1519
{
1620
return [
1721
'title' => $this->faker->sentence,
1822
'is_current' => true,
1923
];
2024
}
2125

22-
public function draft()
26+
public function draft(): static
2327
{
2428
return $this->state(function () {
2529
return [
@@ -29,7 +33,7 @@ public function draft()
2933
});
3034
}
3135

32-
public function published()
36+
public function published(): static
3337
{
3438
return $this->state(function () {
3539
return [

database/factories/PostSectionFactory.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44

55
use Oddvalue\LaravelDrafts\Tests\app\Models\PostSection;
66

7+
/**
8+
* @extends \Illuminate\Database\Eloquent\Factories\Factory<PostSection>
9+
*/
710
class PostSectionFactory extends \Illuminate\Database\Eloquent\Factories\Factory
811
{
912
protected $model = PostSection::class;
1013

1114
/**
12-
* @inheritDoc
15+
* @return array<string, mixed>
16+
* @phpstan-ignore method.childReturnType
1317
*/
14-
public function definition()
18+
public function definition(): array
1519
{
1620
return [
1721
'content' => $this->faker->paragraph,

database/factories/SoftDeletingPostFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ class SoftDeletingPostFactory extends PostFactory
99
protected $model = SoftDeletingPost::class;
1010

1111
/**
12-
* @inheritDoc
12+
* @return array<string, mixed>
1313
*/
14-
public function definition()
14+
public function definition(): array
1515
{
1616
return [
1717
'title' => $this->faker->sentence,
1818
];
1919
}
2020

21-
public function draft()
21+
public function draft(): static
2222
{
2323
return $this->state(function () {
2424
return [
@@ -28,7 +28,7 @@ public function draft()
2828
});
2929
}
3030

31-
public function published()
31+
public function published(): static
3232
{
3333
return $this->state(function () {
3434
return [

database/factories/TagFactory.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44

55
use Oddvalue\LaravelDrafts\Tests\app\Models\Tag;
66

7+
/**
8+
* @extends \Illuminate\Database\Eloquent\Factories\Factory<Tag>
9+
*/
710
class TagFactory extends \Illuminate\Database\Eloquent\Factories\Factory
811
{
912
protected $model = Tag::class;
1013

1114
/**
12-
* @inheritDoc
15+
* @return array<string, mixed>
16+
* @phpstan-ignore method.childReturnType
1317
*/
14-
public function definition()
18+
public function definition(): array
1519
{
1620
return [
1721
'name' => $this->faker->word(),

phpstan-baseline.neon

Lines changed: 0 additions & 193 deletions
This file was deleted.

0 commit comments

Comments
 (0)