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,18 +1,47 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\AMLI\BudgetBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\HasCenterInterface;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
/**
* Charge
* Charge.
*
* @ORM\Table(name="chill_budget.charge")
* @ORM\Entity(repositoryClass="Chill\AMLI\BudgetBundle\Repository\ChargeRepository")
*/
class Charge extends AbstractElement implements HasCenterInterface
{
public const HELP_ASKED = 'running';
public const HELP_NO = 'no';
public const HELP_NOT_RELEVANT = 'not-relevant';
public const HELP_YES = 'yes';
public const HELPS = [
self::HELP_ASKED,
self::HELP_NO,
self::HELP_YES,
self::HELP_NOT_RELEVANT,
];
/**
* @var string
* @ORM\Column(name="help", type="string", nullable=true)
*/
private $help = self::HELP_NOT_RELEVANT;
/**
* @var int
*
@@ -21,30 +50,20 @@ class Charge extends AbstractElement implements HasCenterInterface
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
*
* @var string
* @ORM\Column(name="help", type="string", nullable=true)
*/
private $help = self::HELP_NOT_RELEVANT;
const HELP_ASKED = 'running';
const HELP_NO = 'no';
const HELP_YES = 'yes';
const HELP_NOT_RELEVANT = 'not-relevant';
const HELPS = [
self::HELP_ASKED,
self::HELP_NO,
self::HELP_YES,
self::HELP_NOT_RELEVANT
];
public function __construct()
{
$this->setStartDate(new \DateTimeImmutable('today'));
$this->setStartDate(new DateTimeImmutable('today'));
}
public function getCenter(): \Chill\MainBundle\Entity\Center
{
return $this->getPerson()->getCenter();
}
public function getHelp()
{
return $this->help;
}
/**
@@ -56,23 +75,6 @@ class Charge extends AbstractElement implements HasCenterInterface
{
return $this->id;
}
public function getHelp()
{
return $this->help;
}
public function setHelp($help)
{
$this->help = $help;
return $this;
}
public function getCenter(): \Chill\MainBundle\Entity\Center
{
return $this->getPerson()->getCenter();
}
public function isCharge(): bool
{
@@ -83,4 +85,11 @@ class Charge extends AbstractElement implements HasCenterInterface
{
return false;
}
public function setHelp($help)
{
$this->help = $help;
return $this;
}
}