Skip to content

Commit 87ed495

Browse files
committed
test: add type definitions
1 parent dda004a commit 87ed495

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
@@ -1092,19 +1092,19 @@ protected function getEntity()
10921092
'createdAt' => 'created_at',
10931093
];
10941094

1095-
public function setBar($value)
1095+
public function setBar(int|string $value): self
10961096
{
10971097
$this->attributes['bar'] = "bar:{$value}";
10981098

10991099
return $this;
11001100
}
11011101

1102-
public function getBar()
1102+
public function getBar(): string
11031103
{
11041104
return "{$this->attributes['bar']}:bar";
11051105
}
11061106

1107-
public function getFakeBar()
1107+
public function getFakeBar(): string
11081108
{
11091109
return "{$this->attributes['bar']}:bar";
11101110
}
@@ -1131,26 +1131,26 @@ protected function getNewSetterGetterEntity()
11311131
];
11321132
private string $bar;
11331133

1134-
public function setBar($value)
1134+
public function setBar(string $value): self
11351135
{
11361136
$this->bar = $value;
11371137

11381138
return $this;
11391139
}
11401140

1141-
public function getBar()
1141+
public function getBar(): string
11421142
{
11431143
return $this->bar;
11441144
}
11451145

1146-
public function _setBar($value)
1146+
public function _setBar(string $value): self
11471147
{
11481148
$this->attributes['bar'] = "bar:{$value}";
11491149

11501150
return $this;
11511151
}
11521152

1153-
public function _getBar()
1153+
public function _getBar(): string
11541154
{
11551155
return "{$this->attributes['bar']}:bar";
11561156
}
@@ -1180,7 +1180,7 @@ protected function setSimple(string $val): void
11801180
$this->attributes['simple'] = 'oo:' . $val;
11811181
}
11821182

1183-
protected function getSimple()
1183+
protected function getSimple(): string
11841184
{
11851185
return $this->attributes['simple'] . ':oo';
11861186
}
@@ -1275,7 +1275,7 @@ protected function getCastEntity($data = null): Entity
12751275
'thirteenth' => 'uri',
12761276
];
12771277

1278-
public function setSeventh($seventh): void
1278+
public function setSeventh(string $seventh): void
12791279
{
12801280
$this->attributes['seventh'] = $seventh;
12811281
}

0 commit comments

Comments
 (0)