mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-19 05:38:54 +01:00
Use Assert lib for value checking in setters
This commit is contained in:
@@ -150,6 +150,8 @@ abstract class Company extends StructuralDBElement
|
||||
/**
|
||||
* Set the addres
|
||||
* @param string $new_address the new address (with "\n" as line break)
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setAddress(string $new_address) : self
|
||||
{
|
||||
@@ -161,6 +163,8 @@ abstract class Company extends StructuralDBElement
|
||||
* Set the phone number
|
||||
*
|
||||
* @param string $new_phone_number the new phone number
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setPhoneNumber(string $new_phone_number) : self
|
||||
{
|
||||
@@ -172,6 +176,8 @@ abstract class Company extends StructuralDBElement
|
||||
* Set the fax number
|
||||
*
|
||||
* @param string $new_fax_number the new fax number
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFaxNumber(string $new_fax_number) : self
|
||||
{
|
||||
@@ -183,6 +189,8 @@ abstract class Company extends StructuralDBElement
|
||||
* Set the e-mail address
|
||||
*
|
||||
* @param string $new_email_address the new e-mail address
|
||||
*
|
||||
* @return self
|
||||
|
||||
*/
|
||||
public function setEmailAddress(string $new_email_address) : self
|
||||
@@ -195,6 +203,8 @@ abstract class Company extends StructuralDBElement
|
||||
* Set the website
|
||||
*
|
||||
* @param string $new_website the new website
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setWebsite(string $new_website) : self
|
||||
{
|
||||
@@ -207,6 +217,7 @@ abstract class Company extends StructuralDBElement
|
||||
*
|
||||
* @param string $new_url the new URL with the placeholder %PARTNUMBER% for the part number
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setAutoProductUrl(string $new_url) : self
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user