Skip to content

Commit fe90c6a

Browse files
committed
Correct fixture
1 parent 877b466 commit fe90c6a

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

tests/fixtures/models/belongs-to-many-alias-customer.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ class Customer extends Model
2020
];
2121

2222
/**
23-
* The attributes that should be cast to native types.
23+
* Get the attributes that should be cast.
2424
*
25-
* @var array
25+
* @return array<string, string>
2626
*/
27-
protected $casts = [
28-
'id' => 'integer',
29-
];
27+
protected function casts(): array
28+
{
29+
return [
30+
'id' => 'integer',
31+
];
32+
}
3033

3134
public function pets(): BelongsToMany
3235
{

tests/fixtures/models/belongs-to-many-alias-pet.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ class Pet extends Model
2020
];
2121

2222
/**
23-
* The attributes that should be cast to native types.
23+
* Get the attributes that should be cast.
2424
*
25-
* @var array
25+
* @return array<string, string>
2626
*/
27-
protected $casts = [
28-
'id' => 'integer',
29-
];
27+
protected function casts(): array
28+
{
29+
return [
30+
'id' => 'integer',
31+
];
32+
}
3033

3134
public function owners(): BelongsToMany
3235
{

0 commit comments

Comments
 (0)