apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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');
}
}