mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
php cs fixer
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* 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\PersonBundle\Actions\Remove\Handler;
|
||||
|
||||
use Chill\PersonBundle\Actions\Remove\PersonMoveSqlHandlerInterface;
|
||||
@@ -15,7 +24,7 @@ class PersonMoveAccompanyingPeriodParticipationHandler implements PersonMoveSqlH
|
||||
|
||||
public function getSqls(string $className, string $field, Person $from, Person $to): array
|
||||
{
|
||||
$insertSql = sprintf(<<<SQL
|
||||
$insertSql = sprintf(<<<'SQL'
|
||||
INSERT INTO chill_person_accompanying_period_participation (person_id, accompanyingperiod_id, id, startdate, enddate)
|
||||
SELECT %d, accompanyingperiod_id, nextval('chill_person_accompanying_period_id_seq'), startdate, enddate
|
||||
FROM chill_person_accompanying_period_participation cpapp
|
||||
@@ -28,7 +37,7 @@ class PersonMoveAccompanyingPeriodParticipationHandler implements PersonMoveSqlH
|
||||
)
|
||||
SQL, $to->getId(), $from->getId(), $to->getId());
|
||||
|
||||
$deleteSql = sprintf(<<<SQL
|
||||
$deleteSql = sprintf(<<<'SQL'
|
||||
DELETE FROM chill_person_accompanying_period_participation WHERE person_id = %d
|
||||
SQL, $from->getId());
|
||||
|
||||
|
@@ -1,19 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* 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\PersonBundle\Actions\Remove\Handler;
|
||||
|
||||
use Chill\PersonBundle\Actions\Remove\PersonMoveSqlHandlerInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Repository\Person\PersonCenterHistoryRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
class PersonMoveCenterHistoryHandler implements PersonMoveSqlHandlerInterface
|
||||
{
|
||||
public function __construct(
|
||||
private PersonCenterHistoryRepository $centerHistoryRepository,
|
||||
private EntityManagerInterface $em
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
public function supports(string $className, string $field): bool
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* 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\PersonBundle\Actions\Remove\Handler;
|
||||
|
||||
use Chill\PersonBundle\Actions\Remove\PersonMoveSqlHandlerInterface;
|
||||
@@ -15,7 +24,7 @@ class PersonMoveHouseholdHandler implements PersonMoveSqlHandlerInterface
|
||||
|
||||
public function getSqls(string $className, string $field, Person $from, Person $to): array
|
||||
{
|
||||
$sqlInsert = sprintf(<<<SQL
|
||||
$sqlInsert = sprintf(<<<'SQL'
|
||||
INSERT INTO chill_person_household_members (id, person_id, household_id, startdate, enddate, comment, sharedhousehold, position_id, holder)
|
||||
SELECT nextval('chill_person_household_members_id_seq'), %d, household_id, startdate, enddate, comment, sharedhousehold, position_id, holder
|
||||
FROM chill_person_household_members cphm
|
||||
@@ -26,13 +35,13 @@ class PersonMoveHouseholdHandler implements PersonMoveSqlHandlerInterface
|
||||
person_id = %d
|
||||
AND daterange(cphm.startdate, cphm.enddate) && daterange(cphm_inner.startdate, cphm_inner.enddate)
|
||||
)
|
||||
SQL, $to->getId(), $from->getId(), $to->getId());
|
||||
SQL, $to->getId(), $from->getId(), $to->getId());
|
||||
|
||||
$deleteSql = sprintf(<<<SQL
|
||||
$deleteSql = sprintf(<<<'SQL'
|
||||
DELETE FROM chill_person_household_members WHERE person_id = %d
|
||||
SQL, $from->getId());
|
||||
|
||||
return [$sqlInsert, $deleteSql];
|
||||
return [$sqlInsert, $deleteSql];
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* 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\PersonBundle\Actions\Remove\Handler;
|
||||
|
||||
use Chill\PersonBundle\Actions\Remove\PersonMoveSqlHandlerInterface;
|
||||
@@ -15,7 +24,7 @@ class PersonMoveRelationHandler implements PersonMoveSqlHandlerInterface
|
||||
|
||||
public function getSqls(string $className, string $field, Person $from, Person $to): array
|
||||
{
|
||||
$insertSql = sprintf(<<<SQL
|
||||
$insertSql = sprintf(<<<'SQL'
|
||||
INSERT INTO chill_person_relationships (id, relation_id, reverse, fromperson_id, toperson_id)
|
||||
SELECT nextval('chill_person_relationships_id_seq'), relation_id, reverse, fromperson_id, toperson_id
|
||||
FROM chill_person_relationships cpr
|
||||
@@ -28,7 +37,7 @@ class PersonMoveRelationHandler implements PersonMoveSqlHandlerInterface
|
||||
)
|
||||
SQL, $from->getId(), $from->getId(), $to->getId(), $from->getId(), $from->getId(), $to->getId());
|
||||
|
||||
$deleteSql = sprintf(<<<SQL
|
||||
$deleteSql = sprintf(<<<'SQL'
|
||||
DELETE FROM chill_person_relationships WHERE fromperson_id = %d;
|
||||
DELETE FROM chill_person_relationships WHERE toperson_id = %d;
|
||||
SQL, $from->getId(), $from->getId());
|
||||
|
Reference in New Issue
Block a user