Fixed inspection issues.

This commit is contained in:
Jan Böhmer 2020-02-02 14:05:36 +01:00
parent 16497b76c5
commit 96d7e4c9f4
45 changed files with 448 additions and 89 deletions

View file

@ -122,6 +122,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param string $partname_hint
* @return Category
*/
public function setPartnameHint(string $partname_hint): self
@ -137,6 +138,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param string $partname_regex
* @return Category
*/
public function setPartnameRegex(string $partname_regex): self
@ -152,6 +154,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param bool $disable_footprints
* @return Category
*/
public function setDisableFootprints(bool $disable_footprints): self
@ -167,6 +170,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param bool $disable_manufacturers
* @return Category
*/
public function setDisableManufacturers(bool $disable_manufacturers): self
@ -182,6 +186,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param bool $disable_autodatasheets
* @return Category
*/
public function setDisableAutodatasheets(bool $disable_autodatasheets): self
@ -197,6 +202,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param bool $disable_properties
* @return Category
*/
public function setDisableProperties(bool $disable_properties): self
@ -212,6 +218,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param string $default_description
* @return Category
*/
public function setDefaultDescription(string $default_description): self
@ -227,6 +234,7 @@ class Category extends AbstractPartsContainingDBElement
}
/**
* @param string $default_comment
* @return Category
*/
public function setDefaultComment(string $default_comment): self

View file

@ -121,6 +121,7 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
}
/**
* @param bool $isInteger
* @return MeasurementUnit
*/
public function setIsInteger(bool $isInteger): self
@ -136,6 +137,7 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
}
/**
* @param bool $usesSIPrefixes
* @return MeasurementUnit
*/
public function setUseSIPrefix(bool $usesSIPrefixes): self

View file

@ -26,7 +26,6 @@ namespace App\Entity\Parts;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\TimestampTrait;
use App\Entity\Parts\PartTraits\InstockTrait;
use App\Validator\Constraints\Selectable;
use App\Validator\Constraints\ValidPartLot;
use DateTime;
@ -143,6 +142,7 @@ class PartLot extends AbstractDBElement
/**
* Sets the description of the part lot.
*
* @param string $description
* @return PartLot
*/
public function setDescription(string $description): self
@ -165,6 +165,7 @@ class PartLot extends AbstractDBElement
/**
* Sets the comment for this part lot.
*
* @param string $comment
* @return PartLot
*/
public function setComment(string $comment): self
@ -211,6 +212,7 @@ class PartLot extends AbstractDBElement
/**
* Sets the storage location, where this part lot is stored.
*
* @param Storelocation|null $storage_location
* @return PartLot
*/
public function setStorageLocation(?Storelocation $storage_location): self
@ -257,6 +259,7 @@ class PartLot extends AbstractDBElement
/**
* Set the unknown instock status of this part lot.
*
* @param bool $instock_unknown
* @return PartLot
*/
public function setInstockUnknown(bool $instock_unknown): self
@ -294,6 +297,7 @@ class PartLot extends AbstractDBElement
}
/**
* @param bool $needs_refill
* @return PartLot
*/
public function setNeedsRefill(bool $needs_refill): self

View file

@ -88,6 +88,7 @@ trait AdvancedPropertyTrait
* Sets a comma separated list of tags, that are assigned to this part.
*
* @param string $tags The new tags
* @return $this
*/
public function setTags(string $tags): self
{
@ -110,6 +111,7 @@ trait AdvancedPropertyTrait
* Sett to null, if the mass is unknown.
*
* @param float|null $mass the new mass
* @return $this
*/
public function setMass(?float $mass): self
{

View file

@ -146,6 +146,7 @@ trait BasicPropertyTrait
* Sets the description of this part.
*
* @param string $new_description the new description
* @return $this
*/
public function setDescription(?string $new_description): self
{
@ -158,6 +159,7 @@ trait BasicPropertyTrait
* Sets the comment property of this part.
*
* @param string $new_comment the new comment
* @return $this
*/
public function setComment(string $new_comment): self
{
@ -171,6 +173,7 @@ trait BasicPropertyTrait
* The category property is required for every part, so you can not pass null like the other properties (footprints).
*
* @param Category $category The new category of this part
* @return $this
*/
public function setCategory(Category $category): self
{
@ -184,6 +187,7 @@ trait BasicPropertyTrait
*
* @param Footprint|null $new_footprint The new footprint of this part. Set to null, if this part should not have
* a footprint.
* @return $this
*/
public function setFootprint(?Footprint $new_footprint): self
{
@ -197,6 +201,7 @@ trait BasicPropertyTrait
*
* @param bool $new_favorite_status The new favorite status, that should be applied on this part.
* Set this to true, when the part should be a favorite.
* @return $this
*/
public function setFavorite(bool $new_favorite_status): self
{

View file

@ -72,6 +72,8 @@ trait InstockTrait
/**
* Adds the given part lot, to the list of part lots.
* The part lot is assigned to this part.
* @param PartLot $lot
* @return $this
*/
public function addPartLot(PartLot $lot): self
{
@ -85,6 +87,7 @@ trait InstockTrait
* Removes the given part lot from the list of part lots.
*
* @param PartLot $lot the part lot that should be deleted
* @return $this
*/
public function removePartLot(PartLot $lot): self
{
@ -105,6 +108,8 @@ trait InstockTrait
/**
* Sets the measurement unit in which the part's amount should be measured.
* Set to null, if the part should be measured in quantities.
* @param MeasurementUnit|null $partUnit
* @return $this
*/
public function setPartUnit(?MeasurementUnit $partUnit): self
{
@ -149,6 +154,7 @@ trait InstockTrait
* Part Lots that have unknown value or are expired, are not used for this value.
*
* @return float The amount of parts given in partUnit
*
*/
public function getAmountSum(): float
{
@ -175,6 +181,7 @@ trait InstockTrait
* See getPartUnit() for the associated unit.
*
* @param float $new_minamount the new count of parts which should be in stock at least
* @return $this
*/
public function setMinAmount(float $new_minamount): self
{

View file

@ -118,6 +118,7 @@ trait ManufacturerTrait
* Sets the manufacturing status for this part
* See getManufacturingStatus() for valid values.
*
* @param string $manufacturing_status
* @return Part
*/
public function setManufacturingStatus(string $manufacturing_status): self
@ -148,6 +149,7 @@ trait ManufacturerTrait
/**
* Sets the manufacturer product number (MPN) for this part.
*
* @param string $manufacturer_product_number
* @return Part
*/
public function setManufacturerProductNumber(string $manufacturer_product_number): self
@ -162,6 +164,7 @@ trait ManufacturerTrait
* Set to "" if this part should use the automatically URL based on its manufacturer.
*
* @param string $new_url The new url
* @return $this
*/
public function setManufacturerProductURL(string $new_url): self
{
@ -175,6 +178,7 @@ trait ManufacturerTrait
*
* @param Manufacturer|null $new_manufacturer The new Manufacturer of this part. Set to null, if this part should
* not have a manufacturer.
* @return $this
*/
public function setManufacturer(?Manufacturer $new_manufacturer): self
{

View file

@ -144,6 +144,7 @@ class Storelocation extends AbstractPartsContainingDBElement
}
/**
* @param bool $only_single_part
* @return Storelocation
*/
public function setOnlySinglePart(bool $only_single_part): self
@ -164,6 +165,7 @@ class Storelocation extends AbstractPartsContainingDBElement
}
/**
* @param bool $limit_to_existing_parts
* @return Storelocation
*/
public function setLimitToExistingParts(bool $limit_to_existing_parts): self
@ -182,6 +184,7 @@ class Storelocation extends AbstractPartsContainingDBElement
}
/**
* @param MeasurementUnit|null $storage_type
* @return Storelocation
*/
public function setStorageType(?MeasurementUnit $storage_type): self

View file

@ -126,6 +126,7 @@ class Supplier extends AbstractCompany
/**
* Sets the default currency.
*
* @param Currency|null $default_currency
* @return Supplier
*/
public function setDefaultCurrency(?Currency $default_currency): self