mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-18 00:29:22 +02:00
Added an PHP CS fixer config file and applied it to files.
We now use the same the same style as the symfony project, and it allows us to simply fix the style by executing php_cs_fixer fix in the project root.
This commit is contained in:
parent
89258bc102
commit
e557bdedd5
210 changed files with 2099 additions and 2742 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony)
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
|
@ -17,18 +17,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\Parts\PartTraits;
|
||||
|
||||
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Security\Annotations\ColumnSecurity;
|
||||
|
||||
/**
|
||||
* Advanced properties of a part, not related to a more specific group.
|
||||
* @package App\Entity\Parts\PartTraits
|
||||
*/
|
||||
trait AdvancedPropertyTrait
|
||||
{
|
||||
|
@ -56,6 +53,7 @@ trait AdvancedPropertyTrait
|
|||
|
||||
/**
|
||||
* Checks if this part is marked, for that it needs further review.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isNeedsReview(): bool
|
||||
|
@ -65,18 +63,19 @@ trait AdvancedPropertyTrait
|
|||
|
||||
/**
|
||||
* Sets the "needs review" status of this part.
|
||||
* @param bool $needs_review
|
||||
*
|
||||
* @return Part|self
|
||||
*/
|
||||
public function setNeedsReview(bool $needs_review): self
|
||||
{
|
||||
$this->needs_review = $needs_review;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets a comma separated list, of tags, that are assigned to this part
|
||||
* Gets a comma separated list, of tags, that are assigned to this part.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTags(): string
|
||||
|
@ -86,18 +85,20 @@ trait AdvancedPropertyTrait
|
|||
|
||||
/**
|
||||
* Sets a comma separated list of tags, that are assigned to this part.
|
||||
* @param string $tags
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setTags(string $tags): self
|
||||
{
|
||||
$this->tags = $tags;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the mass of a single part unit.
|
||||
* Returns null, if the mass is unknown/not set yet
|
||||
* Returns null, if the mass is unknown/not set yet.
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getMass(): ?float
|
||||
|
@ -108,14 +109,13 @@ trait AdvancedPropertyTrait
|
|||
/**
|
||||
* Sets the mass of a single part unit.
|
||||
* Sett to null, if the mass is unknown.
|
||||
* @param float|null $mass
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setMass(?float $mass): self
|
||||
{
|
||||
$this->mass = $mass;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue