Skip to content

Commit

Permalink
test: add type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Aug 7, 2024
1 parent e70edeb commit 851e691
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/system/Entity/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1113,19 +1113,19 @@ protected function getEntity()
'createdAt' => 'created_at',
];

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

return $this;
}

public function getBar()
public function getBar(): string
{
return "{$this->attributes['bar']}:bar";
}

public function getFakeBar()
public function getFakeBar(): string
{
return "{$this->attributes['bar']}:bar";
}
Expand All @@ -1152,26 +1152,26 @@ protected function getNewSetterGetterEntity()
];
private string $bar;

public function setBar($value)
public function setBar(string $value): self
{
$this->bar = $value;

return $this;
}

public function getBar()
public function getBar(): string
{
return $this->bar;
}

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

return $this;
}

public function _getBar()
public function _getBar(): string
{
return "{$this->attributes['bar']}:bar";
}
Expand Down Expand Up @@ -1201,7 +1201,7 @@ protected function setSimple(string $val): void
$this->attributes['simple'] = 'oo:' . $val;
}

protected function getSimple()
protected function getSimple(): string
{
return $this->attributes['simple'] . ':oo';
}
Expand Down Expand Up @@ -1296,7 +1296,7 @@ protected function getCastEntity($data = null): Entity
'thirteenth' => 'uri',
];

public function setSeventh($seventh): void
public function setSeventh(string $seventh): void
{
$this->attributes['seventh'] = $seventh;
}
Expand Down

0 comments on commit 851e691

Please sign in to comment.