mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 19:28:51 +02:00
Return $this in Entitys setters, so that they can be chained.
This commit is contained in:
parent
7dbdb959b8
commit
ee29ad3e5a
9 changed files with 99 additions and 44 deletions
|
@ -106,9 +106,10 @@ abstract class NamedDBElement extends DBElement
|
|||
*
|
||||
* @param string $new_name the new name
|
||||
*/
|
||||
public function setName(string $new_name)
|
||||
public function setName(string $new_name) : self
|
||||
{
|
||||
$this->name = $new_name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue