mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-28 13:59:32 +00:00
Fixed some inspection issues.
This commit is contained in:
parent
f7c2f1032f
commit
21a81486df
24 changed files with 64 additions and 84 deletions
|
|
@ -40,13 +40,6 @@ use App\Validator\Constraints\Selectable;
|
|||
|
||||
trait BasicPropertyTrait
|
||||
{
|
||||
/**
|
||||
* @var string The name of this part
|
||||
* @ORM\Column(type="string")
|
||||
* @ColumnSecurity(prefix="name")
|
||||
*/
|
||||
protected $name = '';
|
||||
|
||||
/**
|
||||
* @var string A text describing what this part does
|
||||
* @ORM\Column(type="text")
|
||||
|
|
@ -182,7 +175,7 @@ trait BasicPropertyTrait
|
|||
* @param Category $category The new category of this part
|
||||
* @return self
|
||||
*/
|
||||
public function setCategory(Category $category): Part
|
||||
public function setCategory(Category $category): self
|
||||
{
|
||||
$this->category = $category;
|
||||
return $this;
|
||||
|
|
@ -196,7 +189,7 @@ trait BasicPropertyTrait
|
|||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFootprint(?Footprint $new_footprint): Part
|
||||
public function setFootprint(?Footprint $new_footprint): self
|
||||
{
|
||||
$this->footprint = $new_footprint;
|
||||
return $this;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ namespace App\Entity\Parts\PartTraits;
|
|||
|
||||
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Entity\Parts\PartLot;
|
||||
use App\Security\Annotations\ColumnSecurity;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
|
@ -181,7 +180,7 @@ trait InstockTrait
|
|||
/**
|
||||
* Set the minimum amount of parts that have to be instock.
|
||||
* See getPartUnit() for the associated unit.
|
||||
* @param int $new_minamount the new count of parts which should be in stock at least
|
||||
* @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
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ trait ManufacturerTrait
|
|||
* @Assert\Choice({"announced", "active", "nrfnd", "eol", "discontinued", ""})
|
||||
* @ColumnSecurity(type="string", prefix="status", placeholder="")
|
||||
*/
|
||||
protected $manufacturing_status = "";
|
||||
protected $manufacturing_status = '';
|
||||
|
||||
/**
|
||||
* Get the link to the website of the article on the manufacturers website
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ trait OrderTrait
|
|||
*
|
||||
* @param bool $new_manual_order the new "manual_order" attribute
|
||||
* @param int $new_order_quantity the new order quantity
|
||||
* @param int|null $new_order_orderdetails_id * the ID of the new order orderdetails
|
||||
* @param Orderdetail|null $new_order_orderdetail * the ID of the new order orderdetails
|
||||
* * or Zero for "no order orderdetails"
|
||||
* * or NULL for automatic order orderdetails
|
||||
* (if the part has exactly one orderdetails,
|
||||
|
|
@ -167,7 +167,7 @@ trait OrderTrait
|
|||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setManualOrder(bool $new_manual_order, int $new_order_quantity = 1, ?Orderdetail $new_order_orderdetail = null): Part
|
||||
public function setManualOrder(bool $new_manual_order, int $new_order_quantity = 1, ?Orderdetail $new_order_orderdetail = null): self
|
||||
{
|
||||
//Assert::greaterThan($new_order_quantity, 0, 'The new order quantity must be greater zero. Got %s!');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue