mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
php csfixes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
@@ -41,7 +41,7 @@ class ByActivityNumberAggregator implements AggregatorInterface
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
return static function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
return '';
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
@@ -11,9 +11,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\ActivityBundle\Export\Aggregator;
|
||||
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\ActivityBundle\Export\Declarations;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use LogicException;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class SentReceivedAggregator implements AggregatorInterface
|
||||
@@ -41,10 +42,11 @@ class SentReceivedAggregator implements AggregatorInterface
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
return static function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
return '';
|
||||
}
|
||||
|
||||
switch ($value) {
|
||||
case 'sent':
|
||||
return 'is sent';
|
||||
@@ -53,7 +55,7 @@ class SentReceivedAggregator implements AggregatorInterface
|
||||
return 'is received';
|
||||
|
||||
default:
|
||||
throw new \LogicException(sprintf('The value %s is not valid', $value));
|
||||
throw new LogicException(sprintf('The value %s is not valid', $value));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -14,9 +14,10 @@ namespace Chill\ActivityBundle\Export\Filter\ACPFilters;
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
use function in_array;
|
||||
|
||||
class HasNoActivityFilter implements FilterInterface
|
||||
{
|
||||
@@ -36,7 +37,7 @@ class HasNoActivityFilter implements FilterInterface
|
||||
//TODO check this:
|
||||
->andWhere('
|
||||
NOT EXISTS (
|
||||
SELECT 1 FROM '. Activity::class .' activity
|
||||
SELECT 1 FROM ' . Activity::class . ' activity
|
||||
WHERE activity.accompanyingPeriod = acp
|
||||
)
|
||||
');
|
||||
@@ -61,4 +62,4 @@ class HasNoActivityFilter implements FilterInterface
|
||||
{
|
||||
return 'Filter acp which has no activity';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,9 +39,9 @@ class UsersJobFilter implements FilterInterface
|
||||
$qb
|
||||
->andWhere(
|
||||
$qb->expr()->exists(
|
||||
'SELECT 1 FROM ' . Activity::class . ' activity_users_job_filter_act
|
||||
'SELECT 1 FROM ' . Activity::class . ' activity_users_job_filter_act
|
||||
JOIN activity_users_job_filter_act.users users WHERE users.userJob IN (:activity_users_job_filter_jobs) AND activity_users_job_filter_act = activity '
|
||||
)
|
||||
)
|
||||
)
|
||||
->setParameter('activity_users_job_filter_jobs', $data['jobs']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user