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:
Jan Böhmer 2019-11-09 00:47:20 +01:00
parent 89258bc102
commit e557bdedd5
210 changed files with 2099 additions and 2742 deletions

View file

@ -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,20 +17,16 @@
* 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\Base;
use App\Entity\Attachments\Attachment;
use App\Entity\Parts\Part;
use App\Security\Annotations\ColumnSecurity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* A entity with this class has a master attachment, which is used as a preview image for this object.
* @package App\Entity\Parts\PartTraits
*/
trait MasterAttachmentTrait
{
@ -42,10 +38,10 @@ trait MasterAttachmentTrait
*/
protected $master_picture_attachment;
/**
* Get the master picture "Attachment"-object of this part (if there is one).
* The master picture should be used as a visual description/representation of this part.
*
* @return Attachment the master picture Attachement of this part (if there is one)
*/
public function getMasterPictureAttachment(): ?Attachment
@ -55,14 +51,13 @@ trait MasterAttachmentTrait
/**
* Sets the new master picture for this part.
* @param Attachment|null $new_master_attachment
*
* @return Part
*/
public function setMasterPictureAttachment(?Attachment $new_master_attachment): self
{
$this->master_picture_attachment = $new_master_attachment;
return $this;
}
}
}