Skip to content

Commit 5903c24

Browse files
committed
test: Fix PHPStan missing type in callObjectToRawArray
1 parent 3676271 commit 5903c24

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎tests/system/Models/ObjectToRawArrayModelTest.php‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public function __construct()
4141

4242
/**
4343
* Call protected objectToRawArray via reflection.
44+
*
45+
* @return array<string, mixed>
4446
*/
4547
private function callObjectToRawArray(Model $model, object $object, bool $onlyChanged, bool $recursive): array
4648
{
@@ -53,12 +55,12 @@ public function testObjectToRawArrayPassesRecursiveTrue(): void
5355
{
5456
$model = $this->createModel();
5557

56-
$inner = new class () extends Entity {
58+
$inner = new class () extends Entity {
5759
protected $attributes = ['name' => 'inner'];
5860
protected $original = ['name' => 'inner'];
5961
};
6062

61-
$outer = new class () extends Entity {
63+
$outer = new class () extends Entity {
6264
protected $attributes = ['name' => 'outer', 'nested' => null];
6365
protected $original = ['name' => 'outer', 'nested' => null];
6466
};
@@ -77,12 +79,12 @@ public function testObjectToRawArrayPassesRecursiveFalse(): void
7779
{
7880
$model = $this->createModel();
7981

80-
$inner = new class () extends Entity {
82+
$inner = new class () extends Entity {
8183
protected $attributes = ['name' => 'inner'];
8284
protected $original = ['name' => 'inner'];
8385
};
8486

85-
$outer = new class () extends Entity {
87+
$outer = new class () extends Entity {
8688
protected $attributes = ['name' => 'outer', 'nested' => null];
8789
protected $original = ['name' => 'outer', 'nested' => null];
8890
};
@@ -113,8 +115,7 @@ public function testObjectToRawArrayNonEntity(): void
113115

114116
public function testObjectToRawArrayOnlyChanged(): void
115117
{
116-
$model = $this->createModel();
117-
118+
$model = $this->createModel();
118119
$entity = new class () extends Entity {
119120
protected $attributes = ['name' => 'original', 'value' => 'keep'];
120121
protected $original = ['name' => 'original', 'value' => 'keep'];

0 commit comments

Comments
 (0)