Used PHP_CS_Fixer with symfony preset on codebase.

This commit is contained in:
Jan Böhmer 2019-03-20 23:16:07 +01:00
parent 0f3ba9b6a8
commit e2f7aafa2d
43 changed files with 971 additions and 1068 deletions

View file

@ -1,9 +1,10 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
*
* Part-DB Version 0.4+ "nextgen"
* Copyright (C) 2016 - 2019 Jan Böhmer
* https://github.com/jbtronics
* https://github.com/jbtronics.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -18,16 +19,15 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* This abstract class is used for companies like suppliers or manufacturers.
*
* @ORM\MappedSuperclass()
*/
abstract class Company extends StructuralDBElement
@ -68,7 +68,6 @@ abstract class Company extends StructuralDBElement
*/
protected $auto_product_url;
/********************************************************************************
*
* Getters
@ -76,68 +75,69 @@ abstract class Company extends StructuralDBElement
*********************************************************************************/
/**
* Get the address
* Get the address.
*
* @return string the address of the company (with "\n" as line break)
* @return string the address of the company (with "\n" as line break)
*/
public function getAddress() : string
public function getAddress(): string
{
return $this->address;
}
/**
* Get the phone number
* Get the phone number.
*
* @return string the phone number of the company
* @return string the phone number of the company
*/
public function getPhoneNumber() : string
public function getPhoneNumber(): string
{
return $this->phone_number;
}
/**
* Get the fax number
* Get the fax number.
*
* @return string the fax number of the company
* @return string the fax number of the company
*/
public function getFaxNumber() : string
public function getFaxNumber(): string
{
return $this->fax_number;
}
/**
* Get the e-mail address
* Get the e-mail address.
*
* @return string the e-mail address of the company
* @return string the e-mail address of the company
*/
public function getEmailAddress() : string
public function getEmailAddress(): string
{
return $this->email_address;
}
/**
* Get the website
* Get the website.
*
* @return string the website of the company
* @return string the website of the company
*/
public function getWebsite() : string
public function getWebsite(): string
{
return $this->website;
}
/**
* Get the link to the website of an article
* Get the link to the website of an article.
*
* @param string $partnr * NULL for returning the URL with a placeholder for the part number
* * or the part number for returning the direct URL to the article
* @param string $partnr * NULL for returning the URL with a placeholder for the part number
* * or the part number for returning the direct URL to the article
*
* @return string the link to the article
* @return string the link to the article
*/
public function getAutoProductUrl($partnr = null) : string
public function getAutoProductUrl($partnr = null): string
{
if (\is_string($partnr)) {
return str_replace('%PARTNUMBER%', $partnr, $this->auto_product_url);
}
return $this->auto_product_url;
}
@ -148,81 +148,86 @@ abstract class Company extends StructuralDBElement
*********************************************************************************/
/**
* Set the addres
* @param string $new_address the new address (with "\n" as line break)
* Set the addres.
*
* @param string $new_address the new address (with "\n" as line break)
*
* @return self
*/
public function setAddress(string $new_address) : self
public function setAddress(string $new_address): self
{
$this->address = $new_address;
return $this;
}
/**
* Set the phone number
* Set the phone number.
*
* @param string $new_phone_number the new phone number
* @param string $new_phone_number the new phone number
*
* @return self
*/
public function setPhoneNumber(string $new_phone_number) : self
public function setPhoneNumber(string $new_phone_number): self
{
$this->phone_number = $new_phone_number;
return $this;
}
/**
* Set the fax number
* Set the fax number.
*
* @param string $new_fax_number the new fax number
* @param string $new_fax_number the new fax number
*
* @return self
*/
public function setFaxNumber(string $new_fax_number) : self
public function setFaxNumber(string $new_fax_number): self
{
$this->fax_number = $new_fax_number;
return $this;
}
/**
* Set the e-mail address
* Set the e-mail address.
*
* @param string $new_email_address the new e-mail address
* @param string $new_email_address the new e-mail address
*
* @return self
*/
public function setEmailAddress(string $new_email_address) : self
public function setEmailAddress(string $new_email_address): self
{
$this->email_address = $new_email_address;
return $this;
}
/**
* Set the website
* Set the website.
*
* @param string $new_website the new website
* @param string $new_website the new website
*
* @return self
*/
public function setWebsite(string $new_website) : self
public function setWebsite(string $new_website): self
{
$this->website = $new_website;
return $this;
}
/**
* Set the link to the website of an article
* Set the link to the website of an article.
*
* @param string $new_url the new URL with the placeholder %PARTNUMBER% for the part number
* @param string $new_url the new URL with the placeholder %PARTNUMBER% for the part number
*
* @return self
*/
public function setAutoProductUrl(string $new_url) : self
public function setAutoProductUrl(string $new_url): self
{
$this->auto_product_url = $new_url;
return $this;
}
}
}