mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-09 18:04:33 +02:00
Fixed code style.
This commit is contained in:
parent
2853e471c4
commit
d0b1024d80
212 changed files with 495 additions and 1005 deletions
|
@ -111,7 +111,6 @@ class Category extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parameters;
|
||||
|
||||
|
||||
public function getPartnameHint(): string
|
||||
{
|
||||
return $this->partname_hint;
|
||||
|
|
|
@ -99,7 +99,6 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parameters;
|
||||
|
||||
|
||||
/****************************************
|
||||
* Getters
|
||||
****************************************/
|
||||
|
|
|
@ -109,7 +109,6 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parameters;
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
@ -176,7 +176,6 @@ class Part extends AttachmentContainingDBElement
|
|||
parent::__clone();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all devices which uses this part.
|
||||
*
|
||||
|
|
|
@ -73,7 +73,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
protected $description = '';
|
||||
|
||||
/**
|
||||
* @var string A comment stored with this lot.
|
||||
* @var string a comment stored with this lot
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
protected $comment = '';
|
||||
|
@ -107,7 +107,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
protected $amount = 0;
|
||||
|
||||
/**
|
||||
* @var bool Determines if this lot was manually marked for refilling.
|
||||
* @var bool determines if this lot was manually marked for refilling
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
protected $needs_refill = false;
|
||||
|
@ -128,7 +128,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
parent::__clone();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the current part lot is expired.
|
||||
* This is the case, if the expiration date is greater the the current date.
|
||||
|
@ -149,8 +148,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
|
||||
/**
|
||||
* Gets the description of the part lot. Similar to a "name" of the part lot.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -171,8 +168,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
|
||||
/**
|
||||
* Gets the comment for this part lot.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getComment(): string
|
||||
{
|
||||
|
@ -193,8 +188,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
|
||||
/**
|
||||
* Gets the expiration date for the part lot. Returns null, if no expiration date was set.
|
||||
*
|
||||
* @return DateTime|null
|
||||
*/
|
||||
public function getExpirationDate(): ?DateTime
|
||||
{
|
||||
|
@ -239,8 +232,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
|
||||
/**
|
||||
* Return the part that is stored in this part lot.
|
||||
*
|
||||
* @return Part
|
||||
*/
|
||||
public function getPart(): Part
|
||||
{
|
||||
|
@ -261,8 +252,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
|
||||
/**
|
||||
* Checks if the instock value in the part lot is unknown.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isInstockUnknown(): bool
|
||||
{
|
||||
|
@ -281,12 +270,9 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
public function getAmount(): float
|
||||
{
|
||||
if ($this->part instanceof Part && ! $this->part->useFloatAmount()) {
|
||||
if ($this->part instanceof Part && !$this->part->useFloatAmount()) {
|
||||
return round($this->amount);
|
||||
}
|
||||
|
||||
|
@ -312,9 +298,6 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isNeedsRefill(): bool
|
||||
{
|
||||
return $this->needs_refill;
|
||||
|
|
|
@ -162,7 +162,7 @@ trait InstockTrait
|
|||
public function useFloatAmount(): bool
|
||||
{
|
||||
if ($this->partUnit instanceof MeasurementUnit) {
|
||||
return ! $this->partUnit->isInteger();
|
||||
return !$this->partUnit->isInteger();
|
||||
}
|
||||
|
||||
//When no part unit is set, treat it as part count, and so use the integer value.
|
||||
|
|
|
@ -213,7 +213,7 @@ trait OrderTrait
|
|||
}
|
||||
|
||||
foreach ($all_orderdetails as $orderdetails) {
|
||||
if (! $orderdetails->getObsolete()) {
|
||||
if (!$orderdetails->getObsolete()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,8 +136,6 @@ class Storelocation extends AbstractPartsContainingDBElement
|
|||
|
||||
/**
|
||||
* When this property is set, only one part (but many instock) is allowed to be stored in this store location.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isOnlySinglePart(): bool
|
||||
{
|
||||
|
@ -156,8 +154,6 @@ class Storelocation extends AbstractPartsContainingDBElement
|
|||
|
||||
/**
|
||||
* When this property is set, it is only possible to increase the instock of parts, that are already stored here.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isLimitToExistingParts(): bool
|
||||
{
|
||||
|
@ -174,9 +170,6 @@ class Storelocation extends AbstractPartsContainingDBElement
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MeasurementUnit|null
|
||||
*/
|
||||
public function getStorageType(): ?MeasurementUnit
|
||||
{
|
||||
return $this->storage_type;
|
||||
|
|
|
@ -57,7 +57,6 @@ use App\Entity\PriceInformations\Currency;
|
|||
use App\Validator\Constraints\BigDecimal\BigDecimalPositiveOrZero;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Brick\Math\BigDecimal;
|
||||
use Brick\Math\BigNumber;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
@ -120,8 +119,6 @@ class Supplier extends AbstractCompany
|
|||
|
||||
/**
|
||||
* Gets the currency that should be used by default, when creating a orderdetail with this supplier.
|
||||
*
|
||||
* @return Currency|null
|
||||
*/
|
||||
public function getDefaultCurrency(): ?Currency
|
||||
{
|
||||
|
@ -159,7 +156,7 @@ class Supplier extends AbstractCompany
|
|||
*/
|
||||
public function setShippingCosts(?BigDecimal $shipping_costs): self
|
||||
{
|
||||
if ($shipping_costs === null) {
|
||||
if (null === $shipping_costs) {
|
||||
$this->shipping_costs = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue