cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,44 +1,32 @@
<?php
/*
* Chill is a suite of a modules, Chill is a software for social workers
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
/**
* Chill is a software for social workers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Chill\MainBundle\Entity\RoleScope;
use Symfony\Component\Serializer\Annotation\Groups;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity
* @ORM\Table(name="scopes")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="acl_cache_region")
* @DiscriminatorMap(typeProperty="type", mapping={
* "scope"=Scope::class
* "scope": Scope::class
* })
*/
class Scope
{
/**
* @var integer
* @var int
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
@@ -48,7 +36,7 @@ class Scope
private $id;
/**
* translatable names
* translatable names.
*
* @var array
*
@@ -62,12 +50,11 @@ class Scope
*
* @ORM\OneToMany(
* targetEntity="Chill\MainBundle\Entity\RoleScope",
* mappedBy="scope")
* mappedBy="scope")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
private $roleScopes;
/**
* Scope constructor.
*/
@@ -76,6 +63,11 @@ class Scope
$this->roleScopes = new ArrayCollection();
}
public function addRoleScope(RoleScope $roleScope)
{
$this->roleScopes->add($roleScope);
}
/**
* @return int
*/
@@ -92,16 +84,6 @@ class Scope
return $this->name;
}
/**
* @param $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* @return Collection
*/
@@ -111,10 +93,14 @@ class Scope
}
/**
* @param RoleScope $roleScope
* @param $name
*
* @return $this
*/
public function addRoleScope(RoleScope $roleScope)
public function setName($name)
{
$this->roleScopes->add($roleScope);
$this->name = $name;
return $this;
}
}