mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 22:59:52 +02:00
Fixed code style.
This commit is contained in:
parent
1aed1d1d26
commit
9a7223a301
142 changed files with 534 additions and 716 deletions
|
@ -37,14 +37,14 @@ trait AdvancedPropertyTrait
|
|||
protected $needs_review = false;
|
||||
|
||||
/**
|
||||
* @var string A comma separated list of tags, associated with the part.
|
||||
* @var string a comma separated list of tags, associated with the part
|
||||
* @ORM\Column(type="text")
|
||||
* @ColumnSecurity(type="string", prefix="tags", placeholder="")
|
||||
*/
|
||||
protected $tags = '';
|
||||
|
||||
/**
|
||||
* @var float|null How much a single part unit weighs in grams.
|
||||
* @var float|null how much a single part unit weighs in grams
|
||||
* @ORM\Column(type="float", nullable=true)
|
||||
* @ColumnSecurity(type="float", placeholder=null)
|
||||
* @Assert\PositiveOrZero()
|
||||
|
@ -53,8 +53,6 @@ trait AdvancedPropertyTrait
|
|||
|
||||
/**
|
||||
* Checks if this part is marked, for that it needs further review.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isNeedsReview(): bool
|
||||
{
|
||||
|
@ -63,7 +61,9 @@ trait AdvancedPropertyTrait
|
|||
|
||||
/**
|
||||
* Sets the "needs review" status of this part.
|
||||
*
|
||||
* @param bool $needs_review The new status
|
||||
*
|
||||
* @return Part|self
|
||||
*/
|
||||
public function setNeedsReview(bool $needs_review): self
|
||||
|
@ -75,8 +75,6 @@ trait AdvancedPropertyTrait
|
|||
|
||||
/**
|
||||
* Gets a comma separated list, of tags, that are assigned to this part.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTags(): string
|
||||
{
|
||||
|
@ -87,7 +85,6 @@ trait AdvancedPropertyTrait
|
|||
* Sets a comma separated list of tags, that are assigned to this part.
|
||||
*
|
||||
* @param string $tags The new tags
|
||||
* @return self
|
||||
*/
|
||||
public function setTags(string $tags): self
|
||||
{
|
||||
|
@ -99,8 +96,6 @@ trait AdvancedPropertyTrait
|
|||
/**
|
||||
* Returns the mass of a single part unit.
|
||||
* Returns null, if the mass is unknown/not set yet.
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getMass(): ?float
|
||||
{
|
||||
|
@ -111,8 +106,7 @@ trait AdvancedPropertyTrait
|
|||
* Sets the mass of a single part unit.
|
||||
* Sett to null, if the mass is unknown.
|
||||
*
|
||||
* @param float|null $mass The new mass.
|
||||
* @return self
|
||||
* @param float|null $mass the new mass
|
||||
*/
|
||||
public function setMass(?float $mass): self
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ trait BasicPropertyTrait
|
|||
protected $visible = true;
|
||||
|
||||
/**
|
||||
* @var bool True, if the part is marked as favorite.
|
||||
* @var bool true, if the part is marked as favorite
|
||||
* @ORM\Column(type="boolean")
|
||||
* @ColumnSecurity(type="boolean")
|
||||
*/
|
||||
|
@ -111,7 +111,7 @@ trait BasicPropertyTrait
|
|||
* Check if this part is a favorite.
|
||||
*
|
||||
* @return bool * true if this part is a favorite
|
||||
* * false if this part is not a favorite.
|
||||
* * false if this part is not a favorite
|
||||
*/
|
||||
public function isFavorite(): bool
|
||||
{
|
||||
|
@ -143,8 +143,6 @@ trait BasicPropertyTrait
|
|||
* Sets the description of this part.
|
||||
*
|
||||
* @param string $new_description the new description
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDescription(?string $new_description): self
|
||||
{
|
||||
|
@ -157,8 +155,6 @@ trait BasicPropertyTrait
|
|||
* Sets the comment property of this part.
|
||||
*
|
||||
* @param string $new_comment the new comment
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setComment(string $new_comment): self
|
||||
{
|
||||
|
@ -172,8 +168,6 @@ 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 self
|
||||
*/
|
||||
public function setCategory(Category $category): self
|
||||
{
|
||||
|
@ -187,8 +181,6 @@ 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 self
|
||||
*/
|
||||
public function setFootprint(?Footprint $new_footprint): self
|
||||
{
|
||||
|
@ -202,8 +194,6 @@ trait BasicPropertyTrait
|
|||
*
|
||||
* @param $new_favorite_status bool The new favorite status, that should be applied on this part.
|
||||
* Set this to true, when the part should be a favorite.
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFavorite(bool $new_favorite_status): self
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ trait InstockTrait
|
|||
protected $minamount = 0;
|
||||
|
||||
/**
|
||||
* @var ?MeasurementUnit The unit in which the part's amount is measured.
|
||||
* @var ?MeasurementUnit the unit in which the part's amount is measured
|
||||
* @ORM\ManyToOne(targetEntity="MeasurementUnit", inversedBy="parts")
|
||||
* @ORM\JoinColumn(name="id_part_unit", referencedColumnName="id", nullable=true)
|
||||
* @ColumnSecurity(type="object", prefix="unit")
|
||||
|
@ -69,9 +69,6 @@ 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 self
|
||||
*/
|
||||
public function addPartLot(PartLot $lot): self
|
||||
{
|
||||
|
@ -84,9 +81,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 self
|
||||
* @param PartLot $lot the part lot that should be deleted
|
||||
*/
|
||||
public function removePartLot(PartLot $lot): self
|
||||
{
|
||||
|
@ -98,8 +93,6 @@ trait InstockTrait
|
|||
/**
|
||||
* Gets the measurement unit in which the part's amount should be measured.
|
||||
* Returns null if no specific unit was that. That means the parts are measured simply in quantity numbers.
|
||||
*
|
||||
* @return MeasurementUnit|null
|
||||
*/
|
||||
public function getPartUnit(): ?MeasurementUnit
|
||||
{
|
||||
|
@ -109,9 +102,6 @@ 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 self
|
||||
*/
|
||||
public function setPartUnit(?MeasurementUnit $partUnit): self
|
||||
{
|
||||
|
@ -182,8 +172,6 @@ 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 self
|
||||
*/
|
||||
public function setMinAmount(float $new_minamount): self
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ trait ManufacturerTrait
|
|||
protected $manufacturer;
|
||||
|
||||
/**
|
||||
* @var string The url to the part on the manufacturer's homepage.
|
||||
* @var string the url to the part on the manufacturer's homepage
|
||||
* @ORM\Column(type="string")
|
||||
* @Assert\Url()
|
||||
* @ColumnSecurity(prefix="mpn", type="string", placeholder="")
|
||||
|
@ -86,7 +86,7 @@ trait ManufacturerTrait
|
|||
/**
|
||||
* Similar to getManufacturerProductUrl, but here only the database value is returned.
|
||||
*
|
||||
* @return string The manufacturer url saved in DB for this part.
|
||||
* @return string the manufacturer url saved in DB for this part
|
||||
*/
|
||||
public function getCustomProductURL(): string
|
||||
{
|
||||
|
@ -115,7 +115,6 @@ 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
|
||||
|
@ -137,8 +136,6 @@ trait ManufacturerTrait
|
|||
|
||||
/**
|
||||
* Returns the assigned manufacturer product number (MPN) for this part.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getManufacturerProductNumber(): string
|
||||
{
|
||||
|
@ -148,7 +145,6 @@ 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
|
||||
|
@ -163,8 +159,6 @@ trait ManufacturerTrait
|
|||
* Set to "" if this part should use the automatically URL based on its manufacturer.
|
||||
*
|
||||
* @param string $new_url The new url
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setManufacturerProductURL(string $new_url): self
|
||||
{
|
||||
|
@ -178,8 +172,6 @@ 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 self
|
||||
*/
|
||||
public function setManufacturer(?Manufacturer $new_manufacturer): self
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ use Doctrine\Common\Collections\Collection;
|
|||
trait OrderTrait
|
||||
{
|
||||
/**
|
||||
* @var Orderdetail[]|Collection The details about how and where you can order this part.
|
||||
* @var Orderdetail[]|Collection the details about how and where you can order this part
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
* @ColumnSecurity(prefix="orderdetails", type="collection")
|
||||
|
@ -121,9 +121,7 @@ trait OrderTrait
|
|||
* Adds the given orderdetail to list of orderdetails.
|
||||
* The orderdetail is assigned to this part.
|
||||
*
|
||||
* @param Orderdetail $orderdetail The orderdetail that should be added.
|
||||
*
|
||||
* @return self
|
||||
* @param Orderdetail $orderdetail the orderdetail that should be added
|
||||
*/
|
||||
public function addOrderdetail(Orderdetail $orderdetail): self
|
||||
{
|
||||
|
@ -136,7 +134,6 @@ trait OrderTrait
|
|||
/**
|
||||
* Removes the given orderdetail from the list of orderdetails.
|
||||
*
|
||||
* @param Orderdetail $orderdetail
|
||||
* @return OrderTrait
|
||||
*/
|
||||
public function removeOrderdetail(Orderdetail $orderdetail): self
|
||||
|
@ -157,8 +154,6 @@ trait OrderTrait
|
|||
* (if the part has exactly one orderdetails,
|
||||
* set this orderdetails as order orderdetails.
|
||||
* Otherwise, set "no order orderdetails")
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setManualOrder(bool $new_manual_order, int $new_order_quantity = 1, ?Orderdetail $new_order_orderdetail = null): self
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue