Skip to content

Commit 851e691

Browse files
committed
test: add type definitions
1 parent e70edeb commit 851e691

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/system/Entity/EntityTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,19 +1113,19 @@ protected function getEntity()
11131113
'createdAt' => 'created_at',
11141114
];
11151115

1116-
public function setBar($value)
1116+
public function setBar(int|string $value): self
11171117
{
11181118
$this->attributes['bar'] = "bar:{$value}";
11191119

11201120
return $this;
11211121
}
11221122

1123-
public function getBar()
1123+
public function getBar(): string
11241124
{
11251125
return "{$this->attributes['bar']}:bar";
11261126
}
11271127

1128-
public function getFakeBar()
1128+
public function getFakeBar(): string
11291129
{
11301130
return "{$this->attributes['bar']}:bar";
11311131
}
@@ -1152,26 +1152,26 @@ protected function getNewSetterGetterEntity()
11521152
];
11531153
private string $bar;
11541154

1155-
public function setBar($value)
1155+
public function setBar(string $value): self
11561156
{
11571157
$this->bar = $value;
11581158

11591159
return $this;
11601160
}
11611161

1162-
public function getBar()
1162+
public function getBar(): string
11631163
{
11641164
return $this->bar;
11651165
}
11661166

1167-
public function _setBar($value)
1167+
public function _setBar(string $value): self
11681168
{
11691169
$this->attributes['bar'] = "bar:{$value}";
11701170

11711171
return $this;
11721172
}
11731173

1174-
public function _getBar()
1174+
public function _getBar(): string
11751175
{
11761176
return "{$this->attributes['bar']}:bar";
11771177
}
@@ -1201,7 +1201,7 @@ protected function setSimple(string $val): void
12011201
$this->attributes['simple'] = 'oo:' . $val;
12021202
}
12031203

1204-
protected function getSimple()
1204+
protected function getSimple(): string
12051205
{
12061206
return $this->attributes['simple'] . ':oo';
12071207
}
@@ -1296,7 +1296,7 @@ protected function getCastEntity($data = null): Entity
12961296
'thirteenth' => 'uri',
12971297
];
12981298

1299-
public function setSeventh($seventh): void
1299+
public function setSeventh(string $seventh): void
13001300
{
13011301
$this->attributes['seventh'] = $seventh;
13021302
}

0 commit comments

Comments
 (0)