Fixed coding style.

This commit is contained in:
Jan Böhmer 2020-03-15 13:56:31 +01:00
parent 24939f2342
commit fd61c8d9e2
129 changed files with 962 additions and 1091 deletions

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/**
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -20,22 +23,22 @@
namespace App\Entity\Parameters;
use App\Entity\Parameters\AbstractParameter;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Validator\Constraints as Assert;
trait ParametersTrait
{
/**
* Mapping done in subclasses
* Mapping done in subclasses.
*
* @var AbstractParameter[]|Collection
* @Assert\Valid()
*/
protected $parameters;
/**
* Return all associated specifications
* Return all associated specifications.
*
* @return AbstractParameter[]|Collection
*/
public function getParameters(): Collection
@ -45,19 +48,21 @@ trait ParametersTrait
/**
* Add a new parameter information.
* @param AbstractParameter $parameter
*
* @return $this
*/
public function addParameter(AbstractParameter $parameter): self
{
$parameter->setElement($this);
$this->parameters->add($parameter);
return $this;
}
public function removeParameter(AbstractParameter $parameter): self
{
$this->parameters->removeElement($parameter);
return $this;
}
}
}