mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 12:03:48 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -12,29 +12,25 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Export;
|
||||
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use LogicException;
|
||||
|
||||
use function in_array;
|
||||
|
||||
class AbstractAccompanyingPeriodExportElement
|
||||
{
|
||||
/**
|
||||
* Add the accompanying period alias to the query.
|
||||
*
|
||||
* @throws LogicException if the "person" alias is not present and attaching accompanying period is not possible
|
||||
* @throws \LogicException if the "person" alias is not present and attaching accompanying period is not possible
|
||||
*/
|
||||
protected function addJoinAccompanyingPeriod(QueryBuilder $query): void
|
||||
{
|
||||
if (false === in_array('person', $query->getAllAliases(), true)) {
|
||||
throw new LogicException("the alias 'person' does not exists in "
|
||||
. 'query builder');
|
||||
if (false === \in_array('person', $query->getAllAliases(), true)) {
|
||||
throw new \LogicException("the alias 'person' does not exists in ".'query builder');
|
||||
}
|
||||
|
||||
if (!in_array('acppart', $query->getAllAliases(), true)) {
|
||||
if (!\in_array('acppart', $query->getAllAliases(), true)) {
|
||||
$query->join('person.accompanyingPeriodParticipations', 'acppart');
|
||||
}
|
||||
|
||||
if (!in_array('acp', $query->getAllAliases(), true)) {
|
||||
if (!\in_array('acp', $query->getAllAliases(), true)) {
|
||||
$query->join('acppart.accompanyingPeriod', 'acp');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user