From 99b261b1d76e10e32564a32e52d2b656a0a0e8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 30 Sep 2022 17:31:30 +0200 Subject: [PATCH 01/13] [person][relations] Fixed: GET request had a body, this prevented to load files --- .../Resources/public/vuejs/VisGraph/api.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/api.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/api.js index 01c335436..afa3d933e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/api.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/api.js @@ -5,8 +5,10 @@ import {makeFetch} from 'ChillMainAssets/lib/api/apiMethods.js'; * @function getFetch * @param url * @returns {Promise} + * @deprecated use makeFetch instead */ const getFetch = (url) => { + console.error('deprecated method'); return makeFetch('GET', url, null) } @@ -51,8 +53,10 @@ const getHouseholdByPerson = (person) => { if (person.current_household_id === null) { throw 'Currently the person has not household!' } - return getFetch( - `/api/1.0/person/household/${person.current_household_id}.json`) + return makeFetch( + 'GET', + `/api/1.0/person/household/${person.current_household_id}.json` + ); } /** @@ -62,8 +66,10 @@ const getHouseholdByPerson = (person) => { */ const getCoursesByPerson = (person) => { //console.log('getCoursesByPerson', person._id) - return getFetch( - `/api/1.0/person/accompanying-course/by-person/${person._id}.json`) + return makeFetch( + 'GET', + `/api/1.0/person/accompanying-course/by-person/${person._id}.json` + ); } /** @@ -73,8 +79,10 @@ const getCoursesByPerson = (person) => { */ const getRelationshipsByPerson = (person) => { //console.log('getRelationshipsByPerson', person.id) - return getFetch( - `/api/1.0/relations/relationship/by-person/${person._id}.json`) + return makeFetch( + 'GET', + `/api/1.0/relations/relationship/by-person/${person._id}.json` + ); } /** @@ -82,7 +90,7 @@ const getRelationshipsByPerson = (person) => { * @returns {Promise} */ const getRelationsList = () => { - return getFetch(`/api/1.0/relations/relation.json`) + return makeFetch('GET', `/api/1.0/relations/relation.json`); } /** From 58a1af0c78d1c64831c082f0ad2316f513007661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 5 Oct 2022 09:58:18 +0200 Subject: [PATCH 02/13] installation instructions --- docs/source/installation/index.rst | 113 +++++++++++++++++++---------- 1 file changed, 73 insertions(+), 40 deletions(-) diff --git a/docs/source/installation/index.rst b/docs/source/installation/index.rst index 8d84b795f..9c44d81dd 100644 --- a/docs/source/installation/index.rst +++ b/docs/source/installation/index.rst @@ -21,31 +21,45 @@ Requirements - This project use `docker `_ to be run. As a developer, use `docker-compose `_ to bootstrap a dev environment in a glance. You do not need any other dependencies ; - Make is used to automate scripts. -Installation in development mode -******************************** +Installation +************ + +If you plan to run chill in production: + +1. install it locally first, and check if everything is ok on your local machine; +2. once ready, build the image from your local machine, and deploy them. + +If you want to develop some bundles, the first step is sufficient (until you deploy on production). + 1. Get the code =============== -Clone or download the chill-app project and `cd` into the main directory. +Clone or download the chill-skeleton project and `cd` into the main directory. .. code-block:: bash - git clone https://gitlab.com/Chill-Projet/chill-app.git + git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git cd chill-app As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts. -2. Prepare your variables -========================= +2. Prepare your variables and docker-compose +============================================ -Have a look at the variable in ``.env.dist`` and in ``app/config/parameters.yml.dist`` and check if you need to adapt them. If they do not adapt with your need, or if some are missing: +Have a look at the variable in ``.env`` and check if you need to adapt them. If they do not adapt with your need, or if some are missing: -1. copy the file as ``.env``: ``cp .env.dist .env`` +1. copy the file as ``.env.local``: ``cp .env .env.local`` 2. you may replace some variables inside ``.env`` +Prepare also you docker-compose installation, and adapt it to your needs: + +1. If you plan to deploy on dev, copy the file ``docker-compose.override.dev.template.yml`` to ``docker-compose.override.yml``. +2. adapt to your needs. + + **Note**: If you intend to use the bundle ``Chill-Doc-Store``, you will need to configure and install an openstack object storage container with temporary url middleware. You will have to configure `secret keys `_. 3. Run the bootstrap script @@ -64,6 +78,17 @@ This script will : 3. install the php dependencies 4. build assets +.. warning:: + + The script will work only if the binary ``docker-compose`` is located into your ``PATH``. If you use ``compose`` as a docker plugin, + you can simulate this binary by creating this file at (for instance), ``/usr/local/bin/docker-compose`` (and run ``chmod +x /usr/local/bin/docker-compose``): + + .. code-block:: bash + + #!/bin/bash + + /usr/bin/docker compose "$@" + .. note:: @@ -87,13 +112,20 @@ This script will : .. code-block:: bash - make migrate + # mount into to container + ./docker-php.sh + # and load fixtures + bin/console doctrine:migrations:migrate + Chill will be available at ``http://localhost:8001.`` Currently, there isn't any user or data. To add fixtures, run .. code-block:: bash - docker-compose exec --user $(id -u) php bin/console doctrine:fixtures:load --purge-with-truncate + # mount into to container + ./docker-php.sh + # and load fixtures + bin/console doctrine:fixtures:load --purge-with-truncate There are several users available: @@ -112,16 +144,18 @@ Add a Gitlab token to ensure that you get always the source code: 1. generate a gitlab token there: https://gitlab.com/oauth/token 2. run this command (in php container, at the app's root): :code:`composer config gitlab-token.gitlab.com ` -The auth token should appears now in the directory :code:`.composer`: + The auth token should appears now in the directory :code:`.composer`: -.. code-block: bash + .. code-block: bash + + $ cat .composer/auth.json + { + "gitlab-token": { + "gitlab.com": "" + } + } +3. run ``composer update`` again (into the php container) - $ cat .composer/auth.json - { - "gitlab-token": { - "gitlab.com": "" - } - } See also "how to switch branch and get new dependencies". @@ -145,7 +179,7 @@ How to execute the console ? .. code-block:: bash # if a container is running - docker-compose exec --user $(id -u) php bin/console + ./docker-php.sh # if not docker-compose run --user $(id -u) php bin/console @@ -155,7 +189,8 @@ How to create the database schema (= run migrations) ? .. code-block:: bash # if a container is running - docker-compose exec --user $(id -u) php bin/console doctrine:migrations:migrate + ./docker-php.sh + bin/console doctrine:migrations:migrate # if not docker-compose run --user $(id -u) php bin/console doctrine:migrations:migrate @@ -173,7 +208,8 @@ How to load fixtures ? (development mode only) .. code-block:: bash # if a container is running - docker-compose exec --user $(id -u) php bin/console doctrine:fixtures:load + ./docker-php.sh + bin/console doctrine:fixtures:load # if not docker-compose run --user $(id -u) php bin/console doctrine:fixtures:load @@ -183,7 +219,7 @@ How to open a terminal in the project .. code-block:: bash # if a container is running - docker-compose exec --user $(id -u) php /bin/bash + ./docker-php.sh # if not docker-compose run --user $(id -u) php /bin/bash @@ -193,21 +229,22 @@ How to run composer ? .. code-block:: bash # if a container is running - docker-compose exec --user $(id -u) php ./composer.phar + ./docker-php.sh + composer # if not - docker-compose run --user $(id -u) php ./composer.phar + docker-compose run --user $(id -u) php composer How to access to PGADMIN ? ========================== -Pgadmin is installed with docker-compose. +Pgadmin is installed with docker-compose, and is available **only if you uncomment the appropriate lines into ``docker-compose.override.yml``. You can access it at ``http://localhost:8002``. Credentials: -- login: admin@chill.social -- password: password +- login: from the variable you set into ``docker-composer.override.yml`` +- password: same :-) How to run tests ? ================== @@ -221,13 +258,15 @@ Exemple, for running test inside `main` bundle: .. code-block:: bash # mount into the php image - docker-compose run --user $(id -u) php /bin/bash + ./docker-php.sh # cd into main directory - cd vendor/chill-project/main + cd vendor/chill-project/chill-bundles # download deps - php ../../../composer.phar install + git submodule init + git submodule update + composer install # run tests - /vendor/bin/phpunit + bin/phpunit src/Bundle/path/to/your/test How to run webpack interactively ================================ @@ -253,13 +292,6 @@ In order to do that without pain, use those steps: 2. mount into the php container, and run `composer update` -Build the documentation API -=========================== - -A basic configuration of `sami `_ is embedded within the project. - -A configuration file for `phpDocumentor `_ is present. - Error `An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/app/web/build/manifest.json" does not exist.").` on first run ==================================================================================================================================================================== @@ -273,7 +305,8 @@ Currently, to run this software in production, the *state of the art* is the fol 1. Run the software locally and tweak the configuration to your needs ; 2. Build the image and store them into a private container registry. This can be done using :code:`make build-and-push-image`. - To be sure to target the correct container registry, you have to adapt the values ``IMAGE_NGINX`` and ``IMAGE_PHP`` date in the ``.env`` file. + To be sure to target the correct container registry, you have to adapt the image names into your ``docker-compose.override.yml`` file. +3. Push the image on your registry, or upload them to the destination machine using ``docker image save`` and ``docker image load``. 3. Run the image on your production server, using docker-compose or eventually docker stack. You have to customize the variable set in docker-compose. See also the :ref:`running-production-tips-and-tricks` below. @@ -305,7 +338,7 @@ It is worth having an eye on the configuration of logstash container. Design principles ***************** -Why the DB URL is set in environment, and not in parameters.yml ? +Why the DB URL is also set in environment, and not in .env file ? ================================================================= Because, at startup, a script does check the db is up and, if not, wait for a couple of seconds before running ``entrypoint.sh``. For avoiding double configuration, the configuration of the PHP app takes his configuration from environment also (and it will be standard in future releases, with symfony 4.0). From a90e87b1be8f278113b191816e88ad6619bf3101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 5 Oct 2022 10:22:30 +0200 Subject: [PATCH 03/13] more explanation for installation instructions --- docs/source/installation/index.rst | 86 ++++++++++++++++++------------ 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/docs/source/installation/index.rst b/docs/source/installation/index.rst index 9c44d81dd..00f27ed69 100644 --- a/docs/source/installation/index.rst +++ b/docs/source/installation/index.rst @@ -14,6 +14,13 @@ Installation & Usage #################### +.. toctree:: + :maxdepth: 2 + + prod.rst + prod-calendar-sms-sending.rst + msgraph-configure.rst + Requirements ************ @@ -46,6 +53,35 @@ Clone or download the chill-skeleton project and `cd` into the main directory. As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts. +2. Prepare composer to download the sources +=========================================== + +As you are running in dev, you must configure an auth token for getting the source code. + +.. warning + + If you skip this part, the code will be downloaded from dist instead of source (with git repository). You will probably replace the source manually, but the next time you will run ```composer update```, your repository will be replaced and you might loose something. + +1. Create a personal access token from https://gitlab.com/-/profile/personal_access_tokens, with the `read_api` scope. +2. add a file called ```.composer/auth.json``` with this content: + + .. code-block:: json + + { + "gitlab-token": { + "gitlab.com": "glXXX-XXXXXXXXXXXXXXXXXXXX" + } + } + +2. Prepare your variables and environment +========================================= + +Copy ```docker-compose.override.dev.yml``` into ```docker-compose.override.yml``` + +.. code-block:: bash + + cp docker-compose.override.dev.template.yml docker-compose.override.yml + 2. Prepare your variables and docker-compose ============================================ @@ -74,7 +110,7 @@ This script can be run using `make` This script will : 1. force docker-compose to, eventually, pull the base images and build the image used by this project ; -2. run an install script to download `composer `_ ; +2. run an install script to download `composer `_ ; 3. install the php dependencies 4. build assets @@ -136,30 +172,6 @@ The password is always ``password``. Now, read `Operations` below. -Prepare for development -*********************** - -Add a Gitlab token to ensure that you get always the source code: - -1. generate a gitlab token there: https://gitlab.com/oauth/token -2. run this command (in php container, at the app's root): :code:`composer config gitlab-token.gitlab.com ` - - The auth token should appears now in the directory :code:`.composer`: - - .. code-block: bash - - $ cat .composer/auth.json - { - "gitlab-token": { - "gitlab.com": "" - } - } -3. run ``composer update`` again (into the php container) - - - -See also "how to switch branch and get new dependencies". - Operations ********** @@ -167,7 +179,7 @@ Operations Build assets ============ -run those commands: +run those commands: .. code-block:: bash @@ -180,7 +192,7 @@ How to execute the console ? # if a container is running ./docker-php.sh - # if not + # if not docker-compose run --user $(id -u) php bin/console How to create the database schema (= run migrations) ? @@ -191,7 +203,7 @@ How to create the database schema (= run migrations) ? # if a container is running ./docker-php.sh bin/console doctrine:migrations:migrate - # if not + # if not docker-compose run --user $(id -u) php bin/console doctrine:migrations:migrate @@ -210,7 +222,7 @@ How to load fixtures ? (development mode only) # if a container is running ./docker-php.sh bin/console doctrine:fixtures:load - # if not + # if not docker-compose run --user $(id -u) php bin/console doctrine:fixtures:load How to open a terminal in the project @@ -220,7 +232,7 @@ How to open a terminal in the project # if a container is running ./docker-php.sh - # if not + # if not docker-compose run --user $(id -u) php /bin/bash How to run composer ? @@ -231,7 +243,7 @@ How to run composer ? # if a container is running ./docker-php.sh composer - # if not + # if not docker-compose run --user $(id -u) php composer How to access to PGADMIN ? @@ -253,7 +265,7 @@ Tests reside inside the installed bundles. You must `cd` into that directory, do **Note**: some bundle require the fixture to be executed. See the dedicated _how-tos_. -Exemple, for running test inside `main` bundle: +Exemple, for running test inside `main` bundle: .. code-block:: bash @@ -278,10 +290,14 @@ How to switch the branch for chill-bundles, and get new dependencies During development, you will switch to new branches for chill-bundles. As long as the dependencies are equals, this does not cause any problem. But sometimes, a new branch introduces a new dependency, and you must download it. +.. warning:: + + Ensure that you have gitlab-token ready before updating your branches. See above. + In order to do that without pain, use those steps: 0. Ensuire you have a token, set -1. at the app's root, update the `composer.json` to your current branch: +1. at the app's root, update the ``composer.json`` to your current branch: .. code-block:: json @@ -290,7 +306,7 @@ In order to do that without pain, use those steps: "chill-bundles": "dev-@dev" } -2. mount into the php container, and run `composer update` +2. mount into the php container (``./docker-php.sh``), and run ``composer update`` Error `An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/app/web/build/manifest.json" does not exist.").` on first run ==================================================================================================================================================================== @@ -304,7 +320,7 @@ Currently, to run this software in production, the *state of the art* is the fol 1. Run the software locally and tweak the configuration to your needs ; 2. Build the image and store them into a private container registry. This can be done using :code:`make build-and-push-image`. - + To be sure to target the correct container registry, you have to adapt the image names into your ``docker-compose.override.yml`` file. 3. Push the image on your registry, or upload them to the destination machine using ``docker image save`` and ``docker image load``. 3. Run the image on your production server, using docker-compose or eventually docker stack. You have to customize the variable set in docker-compose. From c1d96af85f89a50c3b8a3f24f1871b9217f561e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 5 Oct 2022 15:08:53 +0200 Subject: [PATCH 04/13] fix cs --- .../BySocialActionAggregator.php | 69 +++---- .../BySocialIssueAggregator.php | 74 ++++---- .../ACPAggregators/ByThirdpartyAggregator.php | 73 ++++---- .../ACPAggregators/ByUserAggregator.php | 73 ++++---- .../ACPAggregators/DateAggregator.php | 122 +++++++------ .../ACPAggregators/LocationTypeAggregator.php | 72 ++++---- .../ACPAggregators/UserScopeAggregator.php | 72 ++++---- .../Aggregator/ActivityTypeAggregator.php | 3 +- .../Aggregator/ActivityUserAggregator.php | 4 +- .../Export/Declarations.php | 4 +- .../LinkedToACP/AvgActivityDuration.php | 37 ++-- .../LinkedToACP/AvgActivityVisitDuration.php | 37 ++-- .../Export/LinkedToACP/CountActivity.php | 17 +- .../LinkedToACP/SumActivityDuration.php | 37 ++-- .../LinkedToACP/SumActivityVisitDuration.php | 36 ++-- .../Export/LinkedToPerson/CountActivity.php | 18 +- .../Export/LinkedToPerson/ListActivity.php | 14 +- .../LinkedToPerson/StatActivityDuration.php | 12 +- .../ACPFilters/BySocialActionFilter.php | 77 ++++---- .../Filter/ACPFilters/BySocialIssueFilter.php | 75 ++++---- .../Export/Filter/ACPFilters/ByUserFilter.php | 78 ++++---- .../Filter/ACPFilters/EmergencyFilter.php | 74 ++++---- .../Filter/ACPFilters/LocationTypeFilter.php | 82 +++++---- .../Filter/ACPFilters/SentReceivedFilter.php | 67 +++---- .../Export/Filter/ACPFilters/UserFilter.php | 76 ++++---- .../Filter/ACPFilters/UserScopeFilter.php | 85 +++++---- .../Export/Filter/ActivityDateFilter.php | 3 +- .../Config/ConfigRepository.php | 4 +- .../Export/Aggregator/AgentAggregator.php | 19 +- .../Aggregator/CancelReasonAggregator.php | 72 ++++---- .../Export/Aggregator/JobAggregator.php | 72 ++++---- .../Export/Aggregator/LocationAggregator.php | 68 +++---- .../Aggregator/LocationTypeAggregator.php | 71 ++++---- .../Export/Aggregator/MonthYearAggregator.php | 70 ++++---- .../Export/Aggregator/ScopeAggregator.php | 72 ++++---- .../Export/Export/CountAppointments.php | 29 +-- .../Export/StatAppointmentAvgDuration.php | 38 ++-- .../Export/StatAppointmentSumDuration.php | 37 ++-- .../Export/Filter/AgentFilter.php | 74 ++++---- .../Export/Filter/BetweenDatesFilter.php | 68 +++---- .../Export/Filter/JobFilter.php | 57 +++--- .../Export/Filter/ScopeFilter.php | 59 +++--- .../Controller/ExportController.php | 32 ++-- .../ChillMainBundle/Doctrine/DQL/Extract.php | 15 +- .../ChillMainBundle/Doctrine/DQL/ToChar.php | 14 +- .../ChillMainBundle/Export/ExportManager.php | 4 +- .../Import/AddressReferenceBaseImporter.php | 5 +- .../AddressReferenceBaseImporterTest.php | 34 +++- .../Import/PostalCodeBaseImporterTest.php | 36 ++-- .../NotificationOnTransitionTest.php | 34 ++-- ...ntityWorkflowTransitionEventSubscriber.php | 35 ++-- .../NotificationOnTransition.php | 8 +- .../migrations/Version20220730204216.php | 17 +- .../migrations/Version20220829132409.php | 21 ++- .../HouseholdCompositionTypeController.php | 2 +- .../ChillPersonExtension.php | 1 + .../Entity/MaritalStatus.php | 1 - .../AdministrativeLocationAggregator.php | 89 ++++------ .../ClosingMotiveAggregator.php | 93 +++++----- .../ConfidentialAggregator.php | 105 +++++------ .../DurationAggregator.php | 118 ++++++------ .../EmergencyAggregator.php | 105 +++++------ .../EvaluationAggregator.php | 95 +++++----- .../IntensityAggregator.php | 99 +++++------ .../JobAggregator.php | 94 +++++----- .../OriginAggregator.php | 96 +++++----- .../ReferrerAggregator.php | 6 +- .../ScopeAggregator.php | 94 +++++----- .../SocialActionAggregator.php | 91 +++++----- .../SocialIssueAggregator.php | 92 ++++------ .../StepAggregator.php | 114 ++++++------ .../EvaluationTypeAggregator.php | 88 ++++----- .../ChildrenNumberAggregator.php | 101 +++++------ .../CompositionAggregator.php | 104 +++++------ .../HouseholdPositionAggregator.php | 6 +- .../MaritalStatusAggregator.php | 1 - .../NationalityAggregator.php | 7 +- .../ActionTypeAggregator.php | 1 - .../SocialWorkAggregators/GoalAggregator.php | 1 - .../SocialWorkAggregators/JobAggregator.php | 94 +++++----- .../ReferrerAggregator.php | 6 +- .../ResultAggregator.php | 1 - .../SocialWorkAggregators/ScopeAggregator.php | 94 +++++----- .../ChillPersonBundle/Export/Declarations.php | 12 +- .../Export/Export/CountAccompanyingCourse.php | 24 +-- .../Export/Export/CountEvaluation.php | 68 +++---- .../Export/Export/CountHousehold.php | 67 +++---- .../Export/Export/CountPerson.php | 11 +- .../CountPersonWithAccompanyingCourse.php | 69 +++---- .../Export/Export/CountSocialWorkActions.php | 27 ++- .../Export/Export/ListPerson.php | 13 +- .../Export/Export/ListPersonDuplicate.php | 10 +- .../Export/StatAccompanyingCourseDuration.php | 66 ++----- .../ActiveOnDateFilter.php | 73 ++++---- .../ActiveOneDayBetweenDatesFilter.php | 81 ++++----- .../ActivityTypeFilter.php | 95 +++++----- .../AdministrativeLocationFilter.php | 92 +++++----- .../ClosingMotiveFilter.php | 96 +++++----- .../ConfidentialFilter.php | 84 +++++---- .../CurrentUserJobFilter.php | 26 +-- .../CurrentUserScopeFilter.php | 31 ++-- .../EmergencyFilter.php | 80 +++++---- .../EvaluationFilter.php | 95 +++++----- .../GeographicalUnitStatFilter.php | 89 +++++----- .../IntensityFilter.php | 80 +++++---- .../OpenBetweenDatesFilter.php | 81 ++++----- .../OriginFilter.php | 93 +++++----- .../ReferrerFilter.php | 93 +++++----- .../RequestorFilter.php | 101 +++++------ .../SocialActionFilter.php | 84 ++++----- .../SocialIssueFilter.php | 168 +++++++++--------- .../AccompanyingCourseFilters/StepFilter.php | 66 +++---- .../EvaluationTypeFilter.php | 93 +++++----- .../EvaluationFilters/MaxDateFilter.php | 85 ++++----- .../HouseholdFilters/CompositionFilter.php | 112 ++++++------ .../Export/Filter/PersonFilters/AgeFilter.php | 8 +- .../Filter/PersonFilters/BirthdateFilter.php | 5 +- .../PersonFilters/DeadOrAliveFilter.php | 10 +- .../PersonFilters/FamilySituationFilter.php | 2 - .../ResidentialAddressAtThirdpartyFilter.php | 41 +++-- .../ResidentialAddressAtUserFilter.php | 6 +- .../Filter/SocialWorkFilters/JobFilter.php | 60 +++---- .../SocialWorkFilters/ReferrerFilter.php | 93 +++++----- .../Filter/SocialWorkFilters/ScopeFilter.php | 59 +++--- .../SocialWorkTypeFilter.php | 168 +++++++++--------- .../Form/HouseholdCompositionTypeType.php | 3 +- .../AccompanyingPeriodWorkRepository.php | 10 +- .../Repository/PersonRepository.php | 10 +- .../Authorization/AccompanyingPeriodVoter.php | 15 +- .../Export/CountAccompanyingCourseTest.php | 24 +-- .../Export/CountSocialWorkActionsTest.php | 25 +-- .../StatAccompanyingCourseDurationTest.php | 18 +- .../Export/Filter/ActiveOnDateFilterTest.php | 29 +-- .../ActiveOneDayBetweenDatesFilterTest.php | 31 ++-- .../Export/Filter/ActivityTypeFilterTest.php | 29 +-- .../AdministrativeLocationFilterTest.php | 28 +-- .../Export/Filter/ClosingMotiveFilterTest.php | 29 +-- .../Export/Filter/ConfidentialFilterTest.php | 29 +-- .../Export/Filter/EmergencyFilterTest.php | 20 ++- .../Export/Filter/EvaluationFilterTest.php | 28 +-- .../Filter/GeographicalUnitStatFilterTest.php | 31 ++-- .../Export/Filter/IntensityFilterTest.php | 29 +-- .../Tests/Export/Filter/JobFilterTest.php | 28 +-- .../Filter/OpenBetweenDatesFilterTest.php | 31 ++-- .../Tests/Export/Filter/OriginFilterTest.php | 29 +-- .../Export/Filter/ReferrerFilterTest.php | 28 +-- .../Export/Filter/RequestorFilterTest.php | 27 +-- .../Tests/Export/Filter/ScopeFilterTest.php | 29 +-- .../Export/Filter/SocialActionFilterTest.php | 28 +-- .../Export/Filter/SocialIssueFilterTest.php | 29 +-- .../Tests/Export/Filter/StepFilterTest.php | 27 +-- .../Tests/Export/Filter/UserJobFilterTest.php | 27 +-- .../Export/Filter/UserScopeFilterTest.php | 28 +-- 153 files changed, 3797 insertions(+), 3874 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php index 269924a8a..62b160bc1 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php @@ -1,5 +1,12 @@ actionRepository = $actionRepository; } - public function getLabels($key, array $values, $data) - { - return function($value) { - if ('_header' === $value) { - return 'Social action'; - } - - $sa = $this->actionRepository->find($value); - - return $this->actionRender->renderString($sa, []); - }; - } - - public function getQueryKeys($data): array - { - return ['socialaction_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group activity by linked socialaction'; - } - public function addRole() { return null; @@ -61,7 +40,7 @@ class BySocialActionAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if(!in_array('socialaction', $qb->getAllAliases())) { + if (!in_array('socialaction', $qb->getAllAliases(), true)) { $qb->join('activity.socialActions', 'socialaction'); } @@ -80,4 +59,32 @@ class BySocialActionAggregator implements AggregatorInterface { return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value) { + if ('_header' === $value) { + return 'Social action'; + } + + $sa = $this->actionRepository->find($value); + + return $this->actionRender->renderString($sa, []); + }; + } + + public function getQueryKeys($data): array + { + return ['socialaction_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked socialaction'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php index 0e4b9ab8e..ff70e54b9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php @@ -1,5 +1,12 @@ issueRender = $issueRender; } - public function getLabels($key, array $values, $data) - { - return function ($value): string { - - if ($value === '_header') { - return 'Social issues'; - } - - $i = $this->issueRepository->find($value); - - return $this->issueRender->renderString($i, []); - }; - } - - public function getQueryKeys($data): array - { - return ['socialissue_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group activity by linked socialissue'; - } - public function addRole() { return null; @@ -62,7 +40,7 @@ class BySocialIssueAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('socialissue', $qb->getAllAliases())) { + if (!in_array('socialissue', $qb->getAllAliases(), true)) { $qb->join('activity.socialIssues', 'socialissue'); } @@ -81,4 +59,32 @@ class BySocialIssueAggregator implements AggregatorInterface { return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Social issues'; + } + + $i = $this->issueRepository->find($value); + + return $this->issueRender->renderString($i, []); + }; + } + + public function getQueryKeys($data): array + { + return ['socialissue_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked socialissue'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php index 5a9e633ef..ce70a9ddb 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php @@ -1,5 +1,12 @@ thirdPartyRender = $thirdPartyRender; } - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Accepted thirdparty'; - } - - $tp = $this->thirdPartyRepository->find($value); - - return $this->thirdPartyRender->renderString($tp, []); - }; - } - - public function getQueryKeys($data): array - { - return ['thirdparty_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group activity by linked thirdparties'; - } - public function addRole() { return null; @@ -61,7 +40,7 @@ class ByThirdpartyAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('thirdparty', $qb->getAllAliases())) { + if (!in_array('thirdparty', $qb->getAllAliases(), true)) { $qb->join('activity.thirdParties', 'thirdparty'); } @@ -80,4 +59,32 @@ class ByThirdpartyAggregator implements AggregatorInterface { return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Accepted thirdparty'; + } + + $tp = $this->thirdPartyRepository->find($value); + + return $this->thirdPartyRender->renderString($tp, []); + }; + } + + public function getQueryKeys($data): array + { + return ['thirdparty_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked thirdparties'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php index 95c9998b8..d57410c4b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php @@ -1,5 +1,12 @@ userRender = $userRender; } - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Accepted users'; - } - - $u = $this->userRepository->find($value); - - return $this->userRender->renderString($u, []); - }; - } - - public function getQueryKeys($data): array - { - return ['users_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group activity by linked users'; - } - public function addRole() { return null; @@ -61,7 +40,7 @@ class ByUserAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('user', $qb->getAllAliases())) { + if (!in_array('user', $qb->getAllAliases(), true)) { $qb->join('activity.users', 'user'); } @@ -80,4 +59,32 @@ class ByUserAggregator implements AggregatorInterface { return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Accepted users'; + } + + $u = $this->userRepository->find($value); + + return $this->userRender->renderString($u, []); + }; + } + + public function getQueryKeys($data): array + { + return ['users_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked users'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php index 1c2f02d3b..3463b1c59 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php @@ -1,12 +1,19 @@ 'year', ]; - private CONST DEFAULT_CHOICE = 'year'; + private const DEFAULT_CHOICE = 'year'; private TranslatorInterface $translator; @@ -31,54 +38,6 @@ class DateAggregator implements AggregatorInterface $this->translator = $translator; } - public function getLabels($key, array $values, $data) - { - return function ($value) use ($data): string { - if ($value === '_header') { - return 'by '. $data['frequency']; - } - switch ($data['frequency']) { - case 'month': - $month = \DateTime::createFromFormat('!m', $value); - return sprintf( - "%02d (%s)", - $value, - $month->format('M') - ); - - case 'week': - //return $this->translator->trans('for week') .' '. $value ; - - case 'year': - //return $this->translator->trans('in year') .' '. $value ; - - default: - return $value; - } - }; - } - - public function getQueryKeys($data): array - { - return ['date_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('frequency', ChoiceType::class, [ - 'choices' => self::CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle(): string - { - return 'Group activity by date'; - } - public function addRole() { return null; @@ -90,13 +49,19 @@ class DateAggregator implements AggregatorInterface switch ($data['frequency']) { case 'month': - $fmt = 'MM'; break; + $fmt = 'MM'; + +break; case 'week': - $fmt = 'IW'; break; + $fmt = 'IW'; + +break; case 'year': - $fmt = 'YYYY'; $order = 'DESC'; break; + $fmt = 'YYYY'; $order = 'DESC'; + +break; default: throw new RuntimeException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])); @@ -126,4 +91,53 @@ class DateAggregator implements AggregatorInterface return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('frequency', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function getLabels($key, array $values, $data) + { + return static function ($value) use ($data): string { + if ('_header' === $value) { + return 'by ' . $data['frequency']; + } + + switch ($data['frequency']) { + case 'month': + $month = DateTime::createFromFormat('!m', $value); + + return sprintf( + '%02d (%s)', + $value, + $month->format('M') + ); + + case 'week': + //return $this->translator->trans('for week') .' '. $value ; + + case 'year': + //return $this->translator->trans('in year') .' '. $value ; + + default: + return $value; + } + }; + } + + public function getQueryKeys($data): array + { + return ['date_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by date'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php index aa5052aaa..c5f43cc64 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php @@ -1,5 +1,12 @@ translatableStringHelper = $translatableStringHelper; } - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Accepted locationtype'; - } - - $lt = $this->locationTypeRepository->find($value); - - return $this->translatableStringHelper->localize( - $lt->getTitle() - ); - }; - } - - public function getQueryKeys($data): array - { - return ['locationtype_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group activity by locationtype'; - } - public function addRole() { return null; @@ -63,7 +40,7 @@ class LocationTypeAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('location', $qb->getAllAliases())) { + if (!in_array('location', $qb->getAllAliases(), true)) { $qb->join('activity.location', 'location'); } @@ -83,4 +60,33 @@ class LocationTypeAggregator implements AggregatorInterface return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Accepted locationtype'; + } + + $lt = $this->locationTypeRepository->find($value); + + return $this->translatableStringHelper->localize( + $lt->getTitle() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['locationtype_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by locationtype'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php index 4d6cef24a..67c2d8db1 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php @@ -1,5 +1,12 @@ translatableStringHelper = $translatableStringHelper; } - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Scope'; - } - - $s = $this->scopeRepository->find($value); - - return $this->translatableStringHelper->localize( - $s->getName() - ); - }; - } - - public function getQueryKeys($data): array - { - return ['userscope_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group activity by userscope'; - } - public function addRole() { return null; @@ -63,7 +40,7 @@ class UserScopeAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('user', $qb->getAllAliases())) { + if (!in_array('user', $qb->getAllAliases(), true)) { $qb->join('activity.user', 'user'); } @@ -83,4 +60,33 @@ class UserScopeAggregator implements AggregatorInterface return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['userscope_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by userscope'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index cedd2df8c..3637d70c6 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -21,6 +21,7 @@ use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Role\Role; +use function in_array; class ActivityTypeAggregator implements AggregatorInterface { @@ -45,7 +46,7 @@ class ActivityTypeAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('type', $qb->getAllAliases())) { + if (!in_array('type', $qb->getAllAliases(), true)) { $qb->join('activity.activityType', 'type'); } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index 675098c60..6d6d3a837 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -25,10 +25,10 @@ class ActivityUserAggregator implements AggregatorInterface { public const KEY = 'activity_user_id'; - private UserRepository $userRepository; - private UserRender $userRender; + private UserRepository $userRepository; + public function __construct( UserRepository $userRepository, UserRender $userRender diff --git a/src/Bundle/ChillActivityBundle/Export/Declarations.php b/src/Bundle/ChillActivityBundle/Export/Declarations.php index 7a5b47028..82f01bcb2 100644 --- a/src/Bundle/ChillActivityBundle/Export/Declarations.php +++ b/src/Bundle/ChillActivityBundle/Export/Declarations.php @@ -18,7 +18,7 @@ abstract class Declarations { public const ACTIVITY = 'activity'; - public const ACTIVITY_ACP = "activity_linked_to_acp"; + public const ACTIVITY_ACP = 'activity_linked_to_acp'; - public const ACTIVITY_PERSON = "activity_linked_to_person"; + public const ACTIVITY_PERSON = 'activity_linked_to_person'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index 1ae5d1830..d06116787 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -1,5 +1,14 @@ getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Average activity linked to an accompanying period duration'; + } + public function getType(): string { return Declarations::ACTIVITY; @@ -73,8 +85,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('activity') - ->join('activity.accompanyingPeriod', 'acp') - ; + ->join('activity.accompanyingPeriod', 'acp'); $qb->select('AVG(activity.durationTime) as export_avg_activity_duration'); @@ -94,10 +105,4 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface //PersonDeclarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to an accompanying period'; - } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php index b03378b16..535fe3d85 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php @@ -1,5 +1,14 @@ getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Average activity linked to an accompanying period visit duration'; + } + public function getType(): string { return Declarations::ACTIVITY; @@ -73,8 +85,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('activity') - ->join('activity.accompanyingPeriod', 'acp') - ; + ->join('activity.accompanyingPeriod', 'acp'); $qb->select('AVG(activity.travelTime) as export_avg_activity_visit_duration'); @@ -94,10 +105,4 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac //PersonDeclarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to an accompanying period'; - } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index 55c0a1974..cefb5e0e9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -30,7 +30,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface protected EntityRepository $repository; public function __construct( - EntityManagerInterface $em + EntityManagerInterface $em ) { $this->repository = $em->getRepository(Activity::class); } @@ -49,6 +49,11 @@ class CountActivity implements ExportInterface, GroupedExportInterface return 'Count activities linked to an accompanying period by various parameters.'; } + public function getGroup(): string + { + return 'Exports of activities linked to an accompanying period'; + } + public function getLabels($key, array $values, $data) { if ('export_count_activity' !== $key) { @@ -81,11 +86,10 @@ class CountActivity implements ExportInterface, GroupedExportInterface public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('activity') - ->join('activity.accompanyingPeriod', 'acp') - ; + ->join('activity.accompanyingPeriod', 'acp'); $qb->select('COUNT(activity.id) as export_count_activity'); - + return $qb; } @@ -102,9 +106,4 @@ class CountActivity implements ExportInterface, GroupedExportInterface //PersonDeclarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to an accompanying period'; - } } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php index 3ab192702..7ba914ee5 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php @@ -1,5 +1,14 @@ getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Sum activity linked to an accompanying period duration'; + } + public function getType(): string { return Declarations::ACTIVITY; @@ -73,8 +85,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('activity') - ->join('activity.accompanyingPeriod', 'acp') - ; + ->join('activity.accompanyingPeriod', 'acp'); $qb->select('SUM(activity.durationTime) as export_sum_activity_duration'); @@ -94,10 +105,4 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface //PersonDeclarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to an accompanying period'; - } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php index 452fc4de7..c3f7ef243 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php @@ -1,5 +1,14 @@ getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Sum activity linked to an accompanying period visit duration'; + } + public function getType(): string { return Declarations::ACTIVITY; @@ -73,8 +85,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('activity') - ->join('activity.accompanyingPeriod', 'acp') - ; + ->join('activity.accompanyingPeriod', 'acp'); $qb->select('SUM(activity.travelTime) as export_sum_activity_visit_duration'); @@ -94,9 +105,4 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac //PersonDeclarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to an accompanying period'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index 75d3122c3..84baf657a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -11,12 +11,12 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Export\LinkedToPerson; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityRepository; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; -use Chill\ActivityBundle\Export\Declarations; use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use Doctrine\ORM\Query; use LogicException; @@ -47,6 +47,11 @@ class CountActivity implements ExportInterface, GroupedExportInterface return 'Count activities linked to a person by various parameters.'; } + public function getGroup(): string + { + return 'Exports of activities linked to a person'; + } + public function getLabels($key, array $values, $data) { if ('export_count_activity' !== $key) { @@ -81,15 +86,13 @@ class CountActivity implements ExportInterface, GroupedExportInterface $centers = array_map(static fn ($el) => $el['center'], $acl); $qb = $this->activityRepository->createQueryBuilder('activity') - ->join('activity.person', 'person') - ; + ->join('activity.person', 'person'); $qb->select('COUNT(activity.id) as export_count_activity'); $qb ->where($qb->expr()->in('person.center', ':centers')) - ->setParameter('centers', $centers) - ; + ->setParameter('centers', $centers); return $qb; } @@ -107,9 +110,4 @@ class CountActivity implements ExportInterface, GroupedExportInterface //PersonDeclarations::PERSON_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to a person'; - } } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php index 21a68fb93..387ea8821 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php @@ -12,12 +12,14 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Export\LinkedToPerson; use Chill\ActivityBundle\Entity\ActivityReason; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityRepository; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; +use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use DateTime; use Doctrine\DBAL\Exception\InvalidArgumentException; use Doctrine\ORM\EntityManagerInterface; @@ -28,8 +30,6 @@ use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Contracts\Translation\TranslatorInterface; -use Chill\ActivityBundle\Export\Declarations; -use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use function array_key_exists; use function count; @@ -100,6 +100,11 @@ class ListActivity implements ListInterface, GroupedExportInterface return 'List activities linked to a person description'; } + public function getGroup(): string + { + return 'Exports of activities linked to a person'; + } + public function getLabels($key, array $values, $data) { switch ($key) { @@ -283,9 +288,4 @@ class ListActivity implements ListInterface, GroupedExportInterface //PersonDeclarations::PERSON_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to a person'; - } } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index 5fae246f8..ebba5ad82 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Export\LinkedToPerson; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityRepository; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Entity\Center; @@ -18,7 +19,6 @@ use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; use Chill\PersonBundle\Export\Declarations as PersonDeclarations; -use Chill\ActivityBundle\Export\Declarations; use Doctrine\ORM\Query; use LogicException; use Symfony\Component\Form\FormBuilderInterface; @@ -67,6 +67,11 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface } } + public function getGroup(): string + { + return 'Exports of activities linked to a person'; + } + public function getLabels($key, array $values, $data) { if ('export_stat_activity' !== $key) { @@ -135,9 +140,4 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface //PersonDeclarations::PERSON_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of activities linked to a person'; - } } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php index 58d77c73e..d110a829f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -1,17 +1,25 @@ actionRender = $actionRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_socialactions', EntityType::class, [ - 'class' => SocialAction::class, - 'choice_label' => function (SocialAction $sa) { - return $this->actionRender->renderString($sa, []); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - public function getTitle(): string - { - return 'Filter activity by linked socialaction'; - } - - public function describeAction($data, $format = 'string'): array - { - $actions = []; - - foreach ($data['accepted_socialactions'] as $sa) { - $actions[] = $this->actionRender->renderString($sa, []); - } - - return ['Filtered activity by linked socialaction: only %actions%', [ - '%actions%' => implode(", ou ", $actions) - ]]; - } - public function addRole() { return null; @@ -61,7 +39,7 @@ class BySocialActionFilter implements FilterInterface { $where = $qb->getDQLPart('where'); - if (!in_array('socialaction', $qb->getAllAliases())) { + if (!in_array('socialaction', $qb->getAllAliases(), true)) { $qb->join('activity.socialActions', 'socialaction'); } @@ -77,9 +55,38 @@ class BySocialActionFilter implements FilterInterface $qb->setParameter('socialactions', $data['accepted_socialactions']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_socialactions', EntityType::class, [ + 'class' => SocialAction::class, + 'choice_label' => function (SocialAction $sa) { + return $this->actionRender->renderString($sa, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $actions = []; + + foreach ($data['accepted_socialactions'] as $sa) { + $actions[] = $this->actionRender->renderString($sa, []); + } + + return ['Filtered activity by linked socialaction: only %actions%', [ + '%actions%' => implode(', ou ', $actions), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by linked socialaction'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php index 052b780ff..66fa92dd4 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -1,17 +1,25 @@ issueRender = $issueRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_socialissues', EntityType::class, [ - 'class' => SocialIssue::class, - 'choice_label' => function(SocialIssue $si) { - return $this->issueRender->renderString($si, []); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - public function getTitle(): string - { - return 'Filter activity by linked socialissue'; - } - - public function describeAction($data, $format = 'string'): array - { - $issues = []; - - foreach ($data['accepted_socialissues'] as $si) { - $issues[] = $this->issueRender->renderString($si, []); - } - - return ['Filtered activity by linked socialissue: only %issues%', [ - '%issues%' => implode(", ou ", $issues) - ]]; - } - public function addRole() { return null; @@ -61,7 +39,7 @@ class BySocialIssueFilter implements FilterInterface { $where = $qb->getDQLPart('where'); - if (!in_array('socialissue', $qb->getAllAliases())) { + if (!in_array('socialissue', $qb->getAllAliases(), true)) { $qb->join('activity.socialIssues', 'socialissue'); } @@ -77,9 +55,38 @@ class BySocialIssueFilter implements FilterInterface $qb->setParameter('socialissues', $data['accepted_socialissues']); } - public function applyOn(): string + public function applyOn(): string { return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_socialissues', EntityType::class, [ + 'class' => SocialIssue::class, + 'choice_label' => function (SocialIssue $si) { + return $this->issueRender->renderString($si, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $issues = []; + + foreach ($data['accepted_socialissues'] as $si) { + $issues[] = $this->issueRender->renderString($si, []); + } + + return ['Filtered activity by linked socialissue: only %issues%', [ + '%issues%' => implode(', ou ', $issues), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by linked socialissue'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php index b128b03aa..512dce874 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php @@ -1,17 +1,25 @@ userRender = $userRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_users', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - public function getTitle(): string - { - return 'Filter activity by linked users'; - } - - public function describeAction($data, $format = 'string'): array - { - $users = []; - - foreach ($data['accepted_users'] as $u) { - $users[] = $this->userRender->renderString($u, []); - } - - return ['Filtered activity by linked users: only %users%', [ - '%users%' => implode(", ou ", $users) - ]]; - } - public function addRole() { return null; @@ -61,7 +39,7 @@ class ByUserFilter implements FilterInterface { $where = $qb->getDQLPart('where'); - if (!in_array('user', $qb->getAllAliases())) { + if (!in_array('user', $qb->getAllAliases(), true)) { $qb->join('activity.users', 'user'); } @@ -77,8 +55,38 @@ class ByUserFilter implements FilterInterface $qb->setParameter('users', $data['accepted_users']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_users', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_users'] as $u) { + $users[] = $this->userRender->renderString($u, []); + } + + return ['Filtered activity by linked users: only %users%', [ + '%users%' => implode(', ou ', $users), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by linked users'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php index d7a823891..612ef3d3d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php @@ -1,11 +1,18 @@ false, ]; - private CONST DEFAULT_CHOICE = false; + private const DEFAULT_CHOICE = false; private TranslatorInterface $translator; @@ -28,35 +35,6 @@ class EmergencyFilter implements FilterInterface $this->translator = $translator; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_emergency', ChoiceType::class, [ - 'choices' => self::CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle(): string - { - return 'Filter activity by emergency'; - } - - public function describeAction($data, $format = 'string'): array - { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_emergency']) { - $choice = $k; - } - } - - return ['Filtered activity by emergency: only %emergency%', [ - '%emergency%' => $this->translator->trans($choice) - ]]; - } - public function addRole() { return null; @@ -78,9 +56,37 @@ class EmergencyFilter implements FilterInterface $qb->setParameter('emergency', $data['accepted_emergency']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_emergency', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + foreach (self::CHOICES as $k => $v) { + if ($v === $data['accepted_emergency']) { + $choice = $k; + } + } + + return ['Filtered activity by emergency: only %emergency%', [ + '%emergency%' => $this->translator->trans($choice), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by emergency'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php index cf29f20f2..4519dd63a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php @@ -1,17 +1,25 @@ translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_locationtype', EntityType::class, [ - 'class' => LocationType::class, - 'choice_label' => function(LocationType $type) { - return $this->translatableStringHelper->localize($type->getTitle()); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - public function getTitle(): string - { - return 'Filter activity by locationtype'; - } - - public function describeAction($data, $format = 'string'): array - { - $types = []; - - foreach ($data['accepted_locationtype'] as $type) { - $types[] = $this->translatableStringHelper->localize( - $type->getTitle() - ); - } - - return ['Filtered activity by locationtype: only %types%', [ - '%types%' => implode(", ou ", $types) - ]]; - } - public function addRole() { return null; @@ -61,7 +37,7 @@ class LocationTypeFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('location', $qb->getAllAliases())) { + if (!in_array('location', $qb->getAllAliases(), true)) { $qb->join('activity.location', 'location'); } @@ -78,8 +54,40 @@ class LocationTypeFilter implements FilterInterface $qb->setParameter('locationtype', $data['accepted_locationtype']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_locationtype', EntityType::class, [ + 'class' => LocationType::class, + 'choice_label' => function (LocationType $type) { + return $this->translatableStringHelper->localize($type->getTitle()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $types = []; + + foreach ($data['accepted_locationtype'] as $type) { + $types[] = $this->translatableStringHelper->localize( + $type->getTitle() + ); + } + + return ['Filtered activity by locationtype: only %types%', [ + '%types%' => implode(', ou ', $types), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by locationtype'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php index 409c974ac..7c878ac75 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php @@ -1,12 +1,19 @@ Activity::SENTRECEIVED_RECEIVED, ]; - private CONST DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT; + private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT; private TranslatorInterface $translator; @@ -29,31 +36,6 @@ class SentReceivedFilter implements FilterInterface $this->translator = $translator; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_sentreceived', ChoiceType::class, [ - 'choices' => self::CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle(): string - { - return 'Filter activity by sentreceived'; - } - - public function describeAction($data, $format = 'string'): array - { - $sentreceived = array_flip(self::CHOICES)[$data['accepted_sentreceived']]; - - return ['Filtered activity by sentreceived: only %sentreceived%', [ - '%sentreceived%' => $this->translator->trans($sentreceived) - ]]; - } - public function addRole() { return null; @@ -75,8 +57,33 @@ class SentReceivedFilter implements FilterInterface $qb->setParameter('sentreceived', $data['accepted_sentreceived']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_sentreceived', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $sentreceived = array_flip(self::CHOICES)[$data['accepted_sentreceived']]; + + return ['Filtered activity by sentreceived: only %sentreceived%', [ + '%sentreceived%' => $this->translator->trans($sentreceived), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by sentreceived'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php index d1455ea89..ef865b3a8 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php @@ -1,12 +1,19 @@ userRender = $userRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_users', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, - 'multiple' => true, - 'expanded' => true, - 'label' => 'Creators' - ]); - } - - public function getTitle(): string - { - return 'Filter activity by user'; - } - - public function describeAction($data, $format = 'string'): array - { - $users = []; - - foreach ($data['accepted_users'] as $u) { - $users[] = $this->userRender->renderString($u, []); - } - - return ['Filtered activity by user: only %users%', [ - '%users%' => implode(", ou ", $users) - ]]; - } - public function addRole() { return null; @@ -74,9 +50,39 @@ class UserFilter implements FilterInterface $qb->setParameter('users', $data['accepted_users']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_users', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + 'label' => 'Creators', + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_users'] as $u) { + $users[] = $this->userRender->renderString($u, []); + } + + return ['Filtered activity by user: only %users%', [ + '%users%' => implode(', ou ', $users), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by user'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php index 987704ab8..ae2ad2629 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php @@ -1,17 +1,25 @@ translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_userscope', EntityType::class, [ - 'class' => Scope::class, - 'choice_label' => function (Scope $s) { - return $this->translatableStringHelper->localize( - $s->getName() - ); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - public function getTitle(): string - { - return 'Filter activity by userscope'; - } - - public function describeAction($data, $format = 'string'): array - { - $scopes = []; - - foreach ($data['accepted_userscope'] as $s) { - $scopes[] = $this->translatableStringHelper->localize( - $s->getName() - ); - } - - return ['Filtered activity by userscope: only %scopes%', [ - '%scopes%' => implode(", ou ", $scopes) - ]]; - } - public function addRole() { return null; @@ -63,7 +37,7 @@ class UserScopeFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('user', $qb->getAllAliases())) { + if (!in_array('user', $qb->getAllAliases(), true)) { $qb->join('activity.user', 'user'); } @@ -81,9 +55,42 @@ class UserScopeFilter implements FilterInterface $qb->setParameter('userscope', $data['accepted_userscope']); } - public function applyOn(): string + public function applyOn(): string { - return Declarations::ACTIVITY_ACP; + return Declarations::ACTIVITY_ACP; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_userscope', EntityType::class, [ + 'class' => Scope::class, + 'choice_label' => function (Scope $s) { + return $this->translatableStringHelper->localize( + $s->getName() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $scopes = []; + + foreach ($data['accepted_userscope'] as $s) { + $scopes[] = $this->translatableStringHelper->localize( + $s->getName() + ); + } + + return ['Filtered activity by userscope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by userscope'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index 4b20553af..65057cb1e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -73,8 +73,7 @@ class ActivityDateFilter implements FilterInterface ->add('date_to', ChillDateType::class, [ 'label' => 'Activities before this date', 'data' => new DateTime(), - ]) - ; + ]); $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { /** @var \Symfony\Component\Form\FormInterface $filterForm */ diff --git a/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php b/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php index e498ba5a3..6443eeaf7 100644 --- a/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php +++ b/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php @@ -70,14 +70,14 @@ class ConfigRepository private function getCharges(bool $onlyActive = false): array { return $onlyActive ? - array_filter($this->charges, function ($el) { return $el['active']; }) + array_filter($this->charges, static function ($el) { return $el['active']; }) : $this->charges; } private function getResources(bool $onlyActive = false): array { return $onlyActive ? - array_filter($this->resources, function ($el) { return $el['active']; }) + array_filter($this->resources, static function ($el) { return $el['active']; }) : $this->resources; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php index ed7c265ff..af96dd474 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -1,20 +1,30 @@ groupBy('agent_aggregator'); } - } public function applyOn(): string @@ -54,7 +63,7 @@ final class AgentAggregator implements AggregatorInterface // no form } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): Closure { return function ($value): string { if ('_header' === $value) { @@ -76,4 +85,4 @@ final class AgentAggregator implements AggregatorInterface { return 'Group by agent'; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php index 583153a7d..2010fb90c 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -1,11 +1,21 @@ translatableStringHelper = $translatableStringHelper; } - public function getLabels($key, array $values, $data): \Closure - { - return function($value): string { - if ($value === '_header') { - return 'Cancel reason'; - } - - $j = $this->cancelReasonRepository->find($value); - - return $this->translatableStringHelper->localize( - $j->getName() - ); - }; - } - - public function getQueryKeys($data): array - { - return ['cancel_reason_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group by cancel reason'; - } - public function addRole() { return null; @@ -78,4 +58,34 @@ class CancelReasonAggregator implements AggregatorInterface { return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Cancel reason'; + } + + $j = $this->cancelReasonRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['cancel_reason_aggregator']; + } + + public function getTitle(): string + { + return 'Group by cancel reason'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php index b019cc21b..a2b300f24 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -1,11 +1,21 @@ translatableStringHelper = $translatableStringHelper; } - public function getLabels($key, array $values, $data): \Closure - { - return function($value): string { - if ($value === '_header') { - return 'Job'; - } - - $j = $this->jobRepository->find($value); - - return $this->translatableStringHelper->localize( - $j->getLabel() - ); - }; - } - - public function getQueryKeys($data): array - { - return ['job_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group by agent job'; - } - public function addRole() { return null; @@ -77,4 +57,34 @@ final class JobAggregator implements AggregatorInterface { return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Job'; + } + + $j = $this->jobRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['job_aggregator']; + } + + public function getTitle(): string + { + return 'Group by agent job'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php index bc921c9c7..6d5a6476d 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -1,10 +1,20 @@ locationRepository = $locationRepository; } - public function getLabels($key, array $values, $data): \Closure - { - return function($value): string { - if ($value === '_header') { - return 'Location'; - } - - $l = $this->locationRepository->find($value); - - return $l->getName(); - - }; - } - - public function getQueryKeys($data): array - { - return ['location_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group by location'; - } - public function addRole(): ?Role { return null; @@ -72,4 +53,31 @@ final class LocationAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Location'; + } + + $l = $this->locationRepository->find($value); + + return $l->getName(); + }; + } + + public function getQueryKeys($data): array + { + return ['location_aggregator']; + } + + public function getTitle(): string + { + return 'Group by location'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index 3b3b9105a..4ead075d5 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -1,11 +1,21 @@ translatableStringHelper = $translatableStringHelper; } - public function getLabels($key, array $values, $data): \Closure - { - return function($value): string { - if ($value === '_header') { - return 'Location type'; - } - - $j = $this->locationTypeRepository->find($value); - - return $this->translatableStringHelper->localize( - $j->getTitle() - ); - }; - } - - public function getQueryKeys($data): array - { - return ['location_type_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group by location type'; - } - public function addRole() { return null; @@ -78,4 +58,33 @@ final class LocationTypeAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Location type'; + } + + $j = $this->locationTypeRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getTitle() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['location_type_aggregator']; + } + + public function getTitle(): string + { + return 'Group by location type'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php index 71a0e75bb..42bac218d 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - public function getLabels($key, array $values, $data): \Closure - { - return function ($value): string { - if ($value === '_header') { - return 'Scope'; - } - - $s = $this->scopeRepository->find($value); - - return $this->translatableStringHelper->localize( - $s->getName() - ); - }; - } - - public function getQueryKeys($data): array - { - return ['scope_aggregator']; - } - - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - public function getTitle(): string - { - return 'Group by agent scope'; - } - public function addRole() { return null; @@ -77,4 +57,34 @@ final class ScopeAggregator implements AggregatorInterface { return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['scope_aggregator']; + } + + public function getTitle(): string + { + return 'Group by agent scope'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php index e47288edc..36864e92e 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php @@ -1,13 +1,23 @@ getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Average appointment duration'; + } + public function getType(): string { return Declarations::CALENDAR_TYPE; @@ -91,13 +105,7 @@ class StatAppointmentAvgDuration implements ExportInterface, GroupedExportInterf public function supportsModifiers(): array { return [ - Declarations::CALENDAR_TYPE + Declarations::CALENDAR_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of calendar'; - } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php index 0e362d766..1960af2e4 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php @@ -1,5 +1,14 @@ getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Sum of appointment durations'; + } + public function getType(): string { return Declarations::CALENDAR_TYPE; @@ -90,13 +105,7 @@ class StatAppointmentSumDuration implements ExportInterface, GroupedExportInterf public function supportsModifiers(): array { return [ - Declarations::CALENDAR_TYPE + Declarations::CALENDAR_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of calendar'; - } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php index 5c16d0728..ee4e82350 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php @@ -1,5 +1,14 @@ userRender = $userRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_agents', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, - 'multiple' => true, - 'expanded' => true - ]); - - } - - public function getTitle(): string - { - return 'Filter by agent'; - } - - public function describeAction($data, $format = 'string'): array - { - $users = []; - - foreach ($data['accepted_agents'] as $r) { - $users[] = $r; - } - - return [ - 'Filtered by agent: only %agents%', [ - '%agents' => implode(", ou ", $users) - ]]; - } - public function addRole() { return null; @@ -76,4 +53,35 @@ class AgentFilter implements FilterInterface { return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_agents', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_agents'] as $r) { + $users[] = $r; + } + + return [ + 'Filtered by agent: only %agents%', [ + '%agents' => implode(', ou ', $users), + ], ]; + } + + public function getTitle(): string + { + return 'Filter by agent'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php index a23c76d98..74b481abe 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php @@ -1,42 +1,26 @@ add('date_from', ChillDateType::class, [ - 'data' => new \DateTime(), - ]) - ->add('date_to', ChillDateType::class, [ - 'data' => new \DateTime(), - ]) - ; - } - - public function getTitle(): string - { - return 'Filter by appointments between certain dates'; - } - - public function describeAction($data, $format = 'string'): array - { - return ['Filtered by appointments between %dateFrom% and %dateTo%', [ - '%dateFrom%' => $data['date_from']->format('d-m-Y'), - '%dateTo%' => $data['date_to']->format('d-m-Y'), - ]]; - } - public function addRole() { return null; @@ -47,9 +31,9 @@ class BetweenDatesFilter implements FilterInterface $where = $qb->getDQLPart('where'); $clause = $qb->expr()->andX( - $qb->expr()->gte('cal.startDate', ':dateFrom'), - $qb->expr()->lte('cal.endDate', ':dateTo') - ); + $qb->expr()->gte('cal.startDate', ':dateFrom'), + $qb->expr()->lte('cal.endDate', ':dateTo') + ); if ($where instanceof Andx) { $where->add($clause); @@ -67,4 +51,28 @@ class BetweenDatesFilter implements FilterInterface { return Declarations::CALENDAR_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('date_from', ChillDateType::class, [ + 'data' => new DateTime(), + ]) + ->add('date_to', ChillDateType::class, [ + 'data' => new DateTime(), + ]); + } + + public function describeAction($data, $format = 'string'): array + { + return ['Filtered by appointments between %dateFrom% and %dateTo%', [ + '%dateFrom%' => $data['date_from']->format('d-m-Y'), + '%dateTo%' => $data['date_to']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter by appointments between certain dates'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php index 42e03e239..562c3281e 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -23,7 +23,6 @@ use Symfony\Contracts\Translation\TranslatorInterface; class JobFilter implements FilterInterface { - protected TranslatorInterface $translator; private TranslatableStringHelper $translatableStringHelper; @@ -36,34 +35,6 @@ class JobFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('job', EntityType::class, [ - 'class' => UserJob::class, - 'choice_label' => function (UserJob $j) { - return $this->translatableStringHelper->localize( - $j->getLabel() - ); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - public function describeAction($data, $format = 'string'): array - { - $userJobs = []; - - foreach ($data['job'] as $j) { - $userJobs[] = $this->translatableStringHelper->localize( - $j->getLabel()); - } - - return ['Filtered by agent job: only %jobs%', [ - '%jobs%' => implode(', ou ', $userJobs) - ]]; - } - public function addRole() { return null; @@ -91,6 +62,34 @@ class JobFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('job', EntityType::class, [ + 'class' => UserJob::class, + 'choice_label' => function (UserJob $j) { + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $userJobs = []; + + foreach ($data['job'] as $j) { + $userJobs[] = $this->translatableStringHelper->localize( + $j->getLabel() + ); + } + + return ['Filtered by agent job: only %jobs%', [ + '%jobs%' => implode(', ou ', $userJobs), + ]]; + } public function getTitle(): string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php index c3fc7b1e4..3ac1d0f1b 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -23,7 +23,6 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ScopeFilter implements FilterInterface { - protected TranslatorInterface $translator; private TranslatableStringHelper $translatableStringHelper; @@ -36,34 +35,6 @@ class ScopeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('scope', EntityType::class, [ - 'class' => Scope::class, - 'choice_label' => function (Scope $s) { - return $this->translatableStringHelper->localize( - $s->getName() - ); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - public function describeAction($data, $format = 'string') - { - $scopes = []; - - foreach ($data['scope'] as $s) { - $scopes[] = $this->translatableStringHelper->localize( - $s->getName()); - } - - return ['Filtered by agent scope: only %scopes%', [ - '%scopes%' => implode(', ou ', $scopes) - ]]; - } - public function addRole() { return null; @@ -91,9 +62,37 @@ class ScopeFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('scope', EntityType::class, [ + 'class' => Scope::class, + 'choice_label' => function (Scope $s) { + return $this->translatableStringHelper->localize( + $s->getName() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string') + { + $scopes = []; + + foreach ($data['scope'] as $s) { + $scopes[] = $this->translatableStringHelper->localize( + $s->getName() + ); + } + + return ['Filtered by agent scope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes), + ]]; + } public function getTitle() { return 'Filter by agent scope'; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index aba48474f..49d0e3959 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -446,7 +446,7 @@ class ExportController extends AbstractController $this->logger->notice('[export] choices for an export unserialized', [ 'key' => $key, - 'rawData' => json_encode($rawData) + 'rawData' => json_encode($rawData), ]); $alias = $rawData['alias']; @@ -531,6 +531,21 @@ class ExportController extends AbstractController ); } + private function getExportGroup($target): string + { + $exportManager = $this->exportManager; + + $groups = $exportManager->getExportsGrouped(true); + + foreach ($groups as $group => $array) { + foreach ($array as $alias => $export) { + if ($export === $target) { + return $group; + } + } + } + } + /** * get the next step. If $reverse === true, the previous step is returned. * @@ -578,19 +593,4 @@ class ExportController extends AbstractController throw new LogicException("the step {$step} is not defined."); } } - - private function getExportGroup($target): string - { - $exportManager = $this->exportManager; - - $groups = $exportManager->getExportsGrouped(true); - - foreach ($groups as $group => $array) { - foreach ($array as $alias => $export) { - if ($export === $target) { - return $group; - } - } - } - } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php index 72ca2b461..7d8809582 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php @@ -1,10 +1,18 @@ EXTRACT(field FROM interval) @@ -50,5 +58,4 @@ class Extract extends FunctionNode $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php index c634555dc..51ff5a9dd 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php @@ -1,5 +1,14 @@ fmt = $parser->StringExpression(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index dee69237f..31092a23b 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -278,16 +278,14 @@ class ExportManager $this->handleAggregators($export, $query, $data[ExportType::AGGREGATOR_KEY], $centers); $this->logger->notice('[export] will execute this qb in export', [ - 'dql' => $query->getDQL() + 'dql' => $query->getDQL(), ]); - } else { throw new UnexpectedValueException('The method `intiateQuery` should return ' . 'a `\\Doctrine\\ORM\\NativeQuery` or a `Doctrine\\ORM\\QueryBuilder` ' . 'object.'); } - $result = $export->getResult($query, $data[ExportType::EXPORT_KEY]); if (!is_iterable($result)) { diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php index 6f1d218a9..474cb53de 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php @@ -16,6 +16,7 @@ use Doctrine\DBAL\Statement; use Exception; use LogicException; use Psr\Log\LoggerInterface; +use RuntimeException; use function array_key_exists; use function count; @@ -159,8 +160,8 @@ final class AddressReferenceBaseImporter try { $affected = $statement->executeStatement(array_merge(...$this->waitingForInsert)); - if ($affected === 0) { - throw new \RuntimeException('no row affected'); + if (0 === $affected) { + throw new RuntimeException('no row affected'); } } catch (Exception $e) { // in some case, we can add debug code here diff --git a/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php b/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php index cb23634f1..0ed1f2059 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php @@ -1,5 +1,14 @@ setRefPostalCodeId($postalCodeId = '1234'.uniqid()) + ->setRefPostalCodeId($postalCodeId = '1234' . uniqid()) ->setPostalCodeSource('testing') ->setCode('TEST456') ->setName('testing'); @@ -54,7 +70,8 @@ class AddressReferenceBaseImporterTest extends KernelTestCase $addresses = $this->addressReferenceRepository->findByPostalCodePattern( $postalCode, - 'Rue test abcc guessed'); + 'Rue test abcc guessed' + ); $this->assertCount(1, $addresses); $this->assertEquals('Rue test abccc-guessed', $addresses[0]->getStreet()); @@ -79,12 +96,11 @@ class AddressReferenceBaseImporterTest extends KernelTestCase $addresses = $this->addressReferenceRepository->findByPostalCodePattern( $postalCode, - 'abcc guessed fixed'); + 'abcc guessed fixed' + ); $this->assertCount('1', $addresses); - $this->assertEquals( 'Rue test abccc guessed fixed', $addresses[0]->getStreet()); + $this->assertEquals('Rue test abccc guessed fixed', $addresses[0]->getStreet()); $this->assertEquals($previousAddressId, $addresses[0]->getId()); } - - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php b/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php index 826e581ac..ce40d40bf 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php @@ -1,5 +1,14 @@ importer->importCode( 'BE', - 'tested with pattern '. ($uniqid = uniqid()), + 'tested with pattern ' . ($uniqid = uniqid()), '12345', - $refPostalCodeId = 'test'.uniqid(), + $refPostalCodeId = 'test' . uniqid(), 'test', 50.0, 5.0, @@ -46,8 +59,8 @@ class PostalCodeBaseImporterTest extends KernelTestCase $this->importer->finalize(); $postalCodes = $this->postalCodeRepository->findByPattern( - 'with pattern '.$uniqid, - $this->countryRepository->findOneBy(['countryCode' => 'BE']) + 'with pattern ' . $uniqid, + $this->countryRepository->findOneBy(['countryCode' => 'BE']) ); $this->assertCount(1, $postalCodes); @@ -59,7 +72,7 @@ class PostalCodeBaseImporterTest extends KernelTestCase $this->importer->importCode( 'BE', - 'tested with adapted pattern '. ($uniqid = uniqid()), + 'tested with adapted pattern ' . ($uniqid = uniqid()), '12345', $refPostalCodeId, 'test', @@ -71,7 +84,7 @@ class PostalCodeBaseImporterTest extends KernelTestCase $this->importer->finalize(); $postalCodes = $this->postalCodeRepository->findByPattern( - 'with pattern '.$uniqid, + 'with pattern ' . $uniqid, $this->countryRepository->findOneBy(['countryCode' => 'BE']) ); @@ -79,7 +92,4 @@ class PostalCodeBaseImporterTest extends KernelTestCase $this->assertStringStartsWith('tested with adapted pattern', $postalCodes[0]->getName()); $this->assertEquals($previousId, $postalCodes[0]->getId()); } - - - -} \ No newline at end of file +} diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationOnTransitionTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationOnTransitionTest.php index 3aa2c71b1..365b01a67 100644 --- a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationOnTransitionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationOnTransitionTest.php @@ -1,5 +1,14 @@ setWorkflowName('workflow_name') - ->setRelatedEntityClass(\stdClass::class) - ->setRelatedEntityId(1) - ; + ->setRelatedEntityClass(stdClass::class) + ->setRelatedEntityId(1); // force an id to entityWorkflow: - $reflection = new \ReflectionClass($entityWorkflow); + $reflection = new ReflectionClass($entityWorkflow); $id = $reflection->getProperty('id'); $id->setAccessible(true); $id->setValue($entityWorkflow, 1); @@ -48,12 +62,11 @@ class NotificationOnTransitionTest extends TestCase $step = new EntityWorkflowStep(); $entityWorkflow->addStep($step); $step->addDestUser($dest) - ->setCurrentStep('to_state') - ; + ->setCurrentStep('to_state'); $em = $this->prophesize(EntityManagerInterface::class); $em->persist(Argument::type(Notification::class))->should( - function($args) use ($dest) { + static function ($args) use ($dest) { /** @var Call[] $args */ if (1 !== count($args)) { throw new FailedPredictionException('no notification sent'); @@ -68,7 +81,8 @@ class NotificationOnTransitionTest extends TestCase if (!$notification->getAddressees()->contains($dest)) { throw new FailedPredictionException('the dest is not notified'); } - }); + } + ); $engine = $this->prophesize(EngineInterface::class); $engine->render(Argument::type('string'), Argument::type('array')) diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php index 2510f9460..0f6a4799a 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php +++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php @@ -41,6 +41,24 @@ class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterfac $this->userRender = $userRender; } + public function addDests(Event $event): void + { + if (!$event->getSubject() instanceof EntityWorkflow) { + return; + } + + /** @var EntityWorkflow $entityWorkflow */ + $entityWorkflow = $event->getSubject(); + + foreach ($entityWorkflow->futureDestUsers as $user) { + $entityWorkflow->getCurrentStep()->addDestUser($user); + } + + foreach ($entityWorkflow->futureDestEmails as $email) { + $entityWorkflow->getCurrentStep()->addDestEmail($email); + } + } + public static function getSubscribedEvents(): array { return [ @@ -55,23 +73,6 @@ class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterfac ]; } - public function addDests(Event $event): void - { - if (!$event->getSubject() instanceof EntityWorkflow) { - return; - } - - /** @var EntityWorkflow $entityWorkflow */ - $entityWorkflow = $event->getSubject(); - foreach ($entityWorkflow->futureDestUsers as $user) { - $entityWorkflow->getCurrentStep()->addDestUser($user); - } - - foreach ($entityWorkflow->futureDestEmails as $email) { - $entityWorkflow->getCurrentStep()->addDestEmail($email); - } - } - public function guardEntityWorkflow(GuardEvent $event) { if (!$event->getSubject() instanceof EntityWorkflow) { diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php index 982a7024e..c56dc34ce 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php +++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php @@ -57,14 +57,15 @@ class NotificationOnTransition implements EventSubscriberInterface } /** - * Send a notification to: + * Send a notification to:. * * * the dests of the new step; * * the users which subscribed to workflow, on each step, or on final * * **Warning** take care that this method must be executed **after** the dest users are added to - * the step (@link{EntityWorkflowStep::addDestUser}). Currently, this is done during - * @link{EntityWorkflowTransitionEventSubscriber::addDests}. + * the step (@see{EntityWorkflowStep::addDestUser}). Currently, this is done during + * + * @see{EntityWorkflowTransitionEventSubscriber::addDests}. */ public function onCompletedSendNotification(Event $event): void { @@ -77,6 +78,7 @@ class NotificationOnTransition implements EventSubscriberInterface /** @var array $dests array of unique values, where keys is the object's hash */ $dests = []; + foreach (array_merge( // the subscriber to each step $entityWorkflow->getSubscriberToStep()->toArray(), diff --git a/src/Bundle/ChillMainBundle/migrations/Version20220730204216.php b/src/Bundle/ChillMainBundle/migrations/Version20220730204216.php index 4ed1b2918..e4ad98318 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20220730204216.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20220730204216.php @@ -1,5 +1,12 @@ addSql('DROP INDEX chill_main_address_reference_unicity'); + } + public function getDescription(): string { return 'Add an unique constraint on addresses references'; @@ -18,9 +30,4 @@ final class Version20220730204216 extends AbstractMigration { $this->addSql('CREATE UNIQUE INDEX chill_main_address_reference_unicity ON chill_main_address_reference (refId, source)'); } - - public function down(Schema $schema): void - { - $this->addSql('DROP INDEX chill_main_address_reference_unicity'); - } } diff --git a/src/Bundle/ChillMainBundle/migrations/Version20220829132409.php b/src/Bundle/ChillMainBundle/migrations/Version20220829132409.php index 0bb09ef74..0da81d182 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20220829132409.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20220829132409.php @@ -1,5 +1,12 @@ addSql('DROP SEQUENCE chill_main_geographical_unit_id_seq CASCADE'); + $this->addSql('DROP TABLE chill_main_geographical_unit'); + } + public function getDescription(): string { return 'Add new entity GeographicalUnit'; @@ -22,10 +35,4 @@ final class Version20220829132409 extends AbstractMigration $this->addSql('CREATE SEQUENCE chill_main_geographical_unit_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE TABLE chill_main_geographical_unit (id INT NOT NULL, geom TEXT DEFAULT NULL, layerName VARCHAR(255) DEFAULT NULL, unitName VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))'); } - - public function down(Schema $schema): void - { - $this->addSql('DROP SEQUENCE chill_main_geographical_unit_id_seq CASCADE'); - $this->addSql('DROP TABLE chill_main_geographical_unit'); - } } diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionTypeController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionTypeController.php index eb1dc1ea9..e7fc5b203 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionTypeController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionTypeController.php @@ -23,4 +23,4 @@ class HouseholdCompositionTypeController extends CRUDController return parent::orderQuery($action, $query, $request, $paginator); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index efbb972c1..47b414ce2 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -95,6 +95,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac $loader->load('services/accompanyingPeriodConsistency.yaml'); $loader->load('services/exports_person.yaml'); + if ($container->getParameter('chill_person.accompanying_period') !== 'hidden') { $loader->load('services/exports_accompanying_period.yaml'); } diff --git a/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php b/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php index 649830b4a..05f47ffcf 100644 --- a/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php +++ b/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php @@ -31,7 +31,6 @@ class MaritalStatus private ?string $id; /** - * @var array * @ORM\Column(type="json") */ private array $name; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php index 8d421f369..69d1b265d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php @@ -1,8 +1,16 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ('_header' === $value) { - return 'Administrative location'; - } - - $l = $this->locationRepository->find($value); - - return $l->getName() .' ('. $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['location_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle() - { - return 'Group by administrative location'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acp.administrativeLocation', 'al'); @@ -90,11 +52,36 @@ class AdministrativeLocationAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Administrative location'; + } + + $l = $this->locationRepository->find($value); + + return $l->getName() . ' (' . $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; + }; + } + + public function getQueryKeys($data): array + { + return ['location_aggregator']; + } + + public function getTitle() + { + return 'Group by administrative location'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php index 198cacea7..d525f2f9b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php @@ -1,12 +1,20 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ('_header' === $value) { - return 'Closing motive'; - } - - $cm = $this->motiveRepository->find($value); - - return $this->translatableStringHelper->localize( - $cm->getName() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data) - { - return ['closingmotive_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by closing motive'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acp.closingMotive', 'cm'); @@ -93,11 +53,38 @@ class ClosingMotiveAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Closing motive'; + } + + $cm = $this->motiveRepository->find($value); + + return $this->translatableStringHelper->localize( + $cm->getName() + ); + }; + } + + public function getQueryKeys($data) + { + return ['closingmotive_aggregator']; + } + + public function getTitle(): string + { + return 'Group by closing motive'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index d2bec5c32..534ef268a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -1,5 +1,14 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Confidentiality'; - } - switch ($value) { - - case true: - return $this->translator->trans('is confidential'); - - case false: - return $this->translator->trans('is not confidential'); - - default: - throw new LogicException(sprintf('The value %s is not valid', $value)); - } - return $value; - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['confidential_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by confidential'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->addSelect('acp.confidential AS confidential_aggregator'); @@ -90,11 +45,45 @@ class ConfidentialAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Confidentiality'; + } + + switch ($value) { + case true: + return $this->translator->trans('is confidential'); + + case false: + return $this->translator->trans('is not confidential'); + + default: + throw new LogicException(sprintf('The value %s is not valid', $value)); + } + + return $value; + }; + } + + public function getQueryKeys($data): array + { + return ['confidential_aggregator']; + } + + public function getTitle(): string + { + return 'Group by confidential'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php index 2a0215e82..ba6a1d3df 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php @@ -1,14 +1,19 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value) use ($data): string { - - if ($value === '_header') { - return $this->translator->trans('Rounded month duration'); - } - - if ($value === null) { - return $this->translator->trans('current duration'); // when closingDate is null - } - - if ($value === 0) { - return $this->translator->trans("duration 0 month"); - } - - return ''. $value . $this->translator->trans(' months'); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['duration_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by duration'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb // OUI - ->addSelect(' - (acp.closingDate - acp.openingDate +15) *12/365 + ->addSelect( + ' + (acp.closingDate - acp.openingDate +15) *12/365 AS duration_aggregator' ) //->addSelect('DATE_DIFF(acp.closingDate, acp.openingDate) AS duration_aggregator') @@ -124,8 +77,8 @@ class DurationAggregator implements AggregatorInterface ELSE EXTRACT(month FROM DATE_DIFF(acp.closingDate, acp.openingDate)) END ) AS duration_aggregator ') - */ - ; + */ +; $groupBy = $qb->getDQLPart('groupBy'); @@ -138,11 +91,42 @@ class DurationAggregator implements AggregatorInterface $qb->orderBy('duration_aggregator'); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return $this->translator->trans('Rounded month duration'); + } + + if (null === $value) { + return $this->translator->trans('current duration'); // when closingDate is null + } + + if (0 === $value) { + return $this->translator->trans('duration 0 month'); + } + + return '' . $value . $this->translator->trans(' months'); + }; + } + + public function getQueryKeys($data): array + { + return ['duration_aggregator']; + } + + public function getTitle(): string + { + return 'Group by duration'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index c5991e7f0..4bee25a39 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -1,5 +1,14 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Emergency'; - } - switch ($value) { - - case true: - return $this->translator->trans('is emergency'); - - case false: - return $this->translator->trans('is not emergency'); - - default: - throw new LogicException(sprintf('The value %s is not valid', $value)); - } - return $value; - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['emergency_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by emergency'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->addSelect('acp.emergency AS emergency_aggregator'); @@ -90,11 +45,45 @@ class EmergencyAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Emergency'; + } + + switch ($value) { + case true: + return $this->translator->trans('is emergency'); + + case false: + return $this->translator->trans('is not emergency'); + + default: + throw new LogicException(sprintf('The value %s is not valid', $value)); + } + + return $value; + }; + } + + public function getQueryKeys($data): array + { + return ['emergency_aggregator']; + } + + public function getTitle(): string + { + return 'Group by emergency'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php index 3f98c7003..4c9fefe31 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ('_header' === $value) { - return 'Evaluation'; - } - - $e = $this->evaluationRepository->find($value); - - return $this->translatableStringHelper->localize( - $e->getTitle() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['evaluation_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by evaluation'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('acpw', $qb->getAllAliases())) { + if (!in_array('acpw', $qb->getAllAliases(), true)) { $qb->join('acp.works', 'acpw'); } $qb->join('acpw.accompanyingPeriodWorkEvaluations', 'we'); @@ -94,11 +56,38 @@ final class EvaluationAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Evaluation'; + } + + $e = $this->evaluationRepository->find($value); + + return $this->translatableStringHelper->localize( + $e->getTitle() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['evaluation_aggregator']; + } + + public function getTitle(): string + { + return 'Group by evaluation'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php index 8da38b766..5962654c0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php @@ -1,5 +1,14 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Intensity'; - } - switch ($value) { - case 'occasional': - return $this->translator->trans('is occasional'); - case 'regular': - return $this->translator->trans('is regular'); - default: - throw new LogicException(sprintf('The value %s is not valid', $value)); - } - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['intensity_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by intensity'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->addSelect('acp.intensity AS intensity_aggregator'); @@ -86,11 +45,43 @@ class IntensityAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Intensity'; + } + + switch ($value) { + case 'occasional': + return $this->translator->trans('is occasional'); + + case 'regular': + return $this->translator->trans('is regular'); + + default: + throw new LogicException(sprintf('The value %s is not valid', $value)); + } + }; + } + + public function getQueryKeys($data): array + { + return ['intensity_aggregator']; + } + + public function getTitle(): string + { + return 'Group by intensity'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php index 31b3fca66..c5c9c3180 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php @@ -1,18 +1,25 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function($value): string { - if ($value === '_header') { - return 'Job'; - } - - $j = $this->jobRepository->find($value); - - return $this->translatableStringHelper->localize( - $j->getLabel() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['job_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by user job'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acp.job', 'j'); @@ -93,11 +52,38 @@ final class JobAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Job'; + } + + $j = $this->jobRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['job_aggregator']; + } + + public function getTitle(): string + { + return 'Group by user job'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php index 2bb131435..7c4ad76fd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ('_header' === $value) { - return 'Origin'; - } - - $o = $this->repository->find($value); - - return $this->translatableStringHelper->localize( - $o->getLabel() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['origin_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by origin'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acp.origin', 'o'); @@ -93,11 +54,38 @@ final class OriginAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Origin'; + } + + $o = $this->repository->find($value); + + return $this->translatableStringHelper->localize( + $o->getLabel() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['origin_aggregator']; + } + + public function getTitle(): string + { + return 'Group by origin'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php index 56522f2ed..323a17e26 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php @@ -15,16 +15,15 @@ use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Repository\UserRepository; use Chill\MainBundle\Templating\Entity\UserRender; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr\From; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; final class ReferrerAggregator implements AggregatorInterface { - private UserRepository $userRepository; - private UserRender $userRender; + private UserRepository $userRepository; + public function __construct( UserRepository $userRepository, UserRender $userRender @@ -51,7 +50,6 @@ final class ReferrerAggregator implements AggregatorInterface } else { $qb->groupBy('referrer_aggregator'); } - } public function applyOn(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php index 5bddac42b..46187d558 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php @@ -1,18 +1,25 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Scope'; - } - - $s = $this->scopeRepository->find($value); - - return $this->translatableStringHelper->localize( - $s->getName() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['scope_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by user scope'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acp.scopes', 's'); @@ -93,11 +52,38 @@ final class ScopeAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['scope_aggregator']; + } + + public function getTitle(): string + { + return 'Group by user scope'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php index a9257bd8e..f28cd559b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php @@ -1,5 +1,14 @@ actionRepository = $actionRepository; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function($value) { - if ('_header' === $value) { - return 'Social action'; - } - - $sa = $this->actionRepository->find($value); - - return $this->actionRender->renderString($sa, []); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['socialaction_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by social action'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('acpw', $qb->getAllAliases())) { + if (!in_array('acpw', $qb->getAllAliases(), true)) { $qb->join('acp.works', 'acpw'); } @@ -91,11 +55,36 @@ final class SocialActionAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value) { + if ('_header' === $value) { + return 'Social action'; + } + + $sa = $this->actionRepository->find($value); + + return $this->actionRender->renderString($sa, []); + }; + } + + public function getQueryKeys($data): array + { + return ['socialaction_aggregator']; + } + + public function getTitle(): string + { + return 'Group by social action'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php index fe2830d00..362d8e666 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php @@ -1,5 +1,14 @@ issueRender = $issueRender; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - - if ($value === '_header') { - return 'Social issues'; - } - - $i = $this->issueRepository->find($value); - - return $this->issueRender->renderString($i, []); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['socialissue_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by social issue'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acp.socialIssues', 'si'); @@ -90,11 +51,36 @@ final class SocialIssueAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Social issues'; + } + + $i = $this->issueRepository->find($value); + + return $this->issueRender->renderString($i, []); + }; + } + + public function getQueryKeys($data): array + { + return ['socialissue_aggregator']; + } + + public function getTitle(): string + { + return 'Group by social issue'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index 9b21373a8..7d3423a04 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -1,5 +1,14 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - switch ($value) { - - case AccompanyingPeriod::STEP_DRAFT: - return $this->translator->trans('Draft'); - - case AccompanyingPeriod::STEP_CONFIRMED: - return $this->translator->trans('Confirmed'); - - case AccompanyingPeriod::STEP_CLOSED: - return $this->translator->trans('Closed'); - - case '_header': - return 'Step'; - - default: - throw new LogicException(sprintf('The value %s is not valid', $value)); - } - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['step_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('on_date', ChillDateType::class, [ - 'data' => new \DateTime(), - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by step'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->addSelect('acp.step AS step_aggregator'); @@ -119,14 +71,50 @@ final class StepAggregator implements AggregatorInterface //, FilterInterface $qb->setParameter('ondate', $data['on_date'], Types::DATE_MUTABLE); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('on_date', ChillDateType::class, [ + 'data' => new DateTime(), + ]); + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + switch ($value) { + case AccompanyingPeriod::STEP_DRAFT: + return $this->translator->trans('Draft'); + + case AccompanyingPeriod::STEP_CONFIRMED: + return $this->translator->trans('Confirmed'); + + case AccompanyingPeriod::STEP_CLOSED: + return $this->translator->trans('Closed'); + + case '_header': + return 'Step'; + + default: + throw new LogicException(sprintf('The value %s is not valid', $value)); + } + }; + } + + public function getQueryKeys($data): array + { + return ['step_aggregator']; + } + + public function getTitle(): string + { + return 'Group by step'; + } + /* * TODO check if we need to add FilterInterface and DescribeAction Method to describe date filter ?? * @@ -138,5 +126,5 @@ final class StepAggregator implements AggregatorInterface //, FilterInterface ] ]; } - */ -} \ No newline at end of file + */ +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php index e94290925..6c20ae548 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Evaluation type'; - } - - $ev = $this->evaluationRepository->find($value); - - return $this->translatableStringHelper->localize($ev->getTitle()); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['evaluationtype_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by evaluation type'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->addSelect('IDENTITY(eval.evaluation) AS evaluationtype_aggregator'); @@ -87,11 +50,36 @@ class EvaluationTypeAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::EVAL_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Evaluation type'; + } + + $ev = $this->evaluationRepository->find($value); + + return $this->translatableStringHelper->localize($ev->getTitle()); + }; + } + + public function getQueryKeys($data): array + { + return ['evaluationtype_aggregator']; + } + + public function getTitle(): string + { + return 'Group by evaluation type'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index df50b76f0..417941a04 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -1,13 +1,24 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - - if ($value === '_header') { - return 'Number of children'; - } - - return $this->translator->trans( - 'household_composition.numberOfChildren children in household', [ - 'numberOfChildren' => $value - ]); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['childrennumber_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('on_date', ChillDateType::class, [ - 'data' => new \DateTime('now'), - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by number of children'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('composition', $qb->getAllAliases())) { + if (!in_array('composition', $qb->getAllAliases(), true)) { $qb->join('household.compositions', 'composition'); } @@ -102,11 +63,41 @@ class ChildrenNumberAggregator implements AggregatorInterface ); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::HOUSEHOLD_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('on_date', ChillDateType::class, [ + 'data' => new DateTime('now'), + ]); + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Number of children'; + } + + return $this->translator->trans( + 'household_composition.numberOfChildren children in household', + [ + 'numberOfChildren' => $value, + ] + ); + }; + } + + public function getQueryKeys($data): array + { + return ['childrennumber_aggregator']; + } + + public function getTitle(): string + { + return 'Group by number of children'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php index 2c6ab174f..429431af6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Composition'; - } - - $c = $this->typeRepository->find($value); - - return $this->translatableStringHelper->localize( - $c->getLabel() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['composition_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('on_date', ChillDateType::class, [ - 'data' => new \DateTime('now'), - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by composition'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('composition', $qb->getAllAliases())) { + if (!in_array('composition', $qb->getAllAliases(), true)) { $qb->join('household.compositions', 'composition'); } @@ -118,11 +79,40 @@ class CompositionAggregator implements AggregatorInterface $qb->setParameter('ondate', $data['on_date'], Types::DATE_MUTABLE); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::HOUSEHOLD_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('on_date', ChillDateType::class, [ + 'data' => new DateTime('now'), + ]); + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Composition'; + } + + $c = $this->typeRepository->find($value); + + return $this->translatableStringHelper->localize( + $c->getLabel() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['composition_aggregator']; + } + + public function getTitle(): string + { + return 'Group by composition'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index ec4a270ac..872b3f9f5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -18,19 +18,18 @@ use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Repository\Household\PositionRepository; use DateTime; use Doctrine\ORM\QueryBuilder; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Contracts\Translation\TranslatorInterface; final class HouseholdPositionAggregator implements AggregatorInterface, ExportElementValidatedInterface { - private TranslatorInterface $translator; - private PositionRepository $positionRepository; private TranslatableStringHelper $translatableStringHelper; + private TranslatorInterface $translator; + public function __construct(TranslatorInterface $translator, TranslatableStringHelper $translatableStringHelper, PositionRepository $positionRepository) { $this->translator = $translator; @@ -70,7 +69,6 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl } else { $qb->groupBy('household_position_aggregator'); } - } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index 3d4c1f7cd..4a9534a6d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -18,7 +18,6 @@ use Chill\PersonBundle\Repository\MaritalStatusRepository; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; - final class MaritalStatusAggregator implements AggregatorInterface { private MaritalStatusRepository $maritalStatusRepository; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index 8c3c0e9a7..fcae239cb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -124,19 +124,17 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV ->getQuery() ->getResult(\Doctrine\ORM\Query::HYDRATE_SCALAR); - // initialize array and add blank key for null values $labels = [ '' => $this->translator->trans('without data'), '_header' => $this->translator->trans('Nationality'), ]; - foreach ($countries as $row) { $labels[$row['c_countryCode']] = $this->translatableStringHelper->localize($row['c_name']); } } - + if ('continent' === $data['group_by_level']) { $labels = [ 'EU' => $this->translator->trans('Europe'), @@ -151,10 +149,9 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV ]; } - return function ($value) use ($labels): string { + return static function ($value) use ($labels): string { return $labels[$value]; }; - } public function getQueryKeys($data) diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php index d8f485561..3ead139ab 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php @@ -47,7 +47,6 @@ final class ActionTypeAggregator implements AggregatorInterface } else { $qb->groupBy('action_type_aggregator'); } - } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php index cb908ef3e..b39f8bee0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php @@ -47,7 +47,6 @@ final class GoalAggregator implements AggregatorInterface } else { $qb->groupBy('goal_aggregator'); } - } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php index ddab1f7cd..c89219f2e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -1,18 +1,25 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function($value): string { - if ($value === '_header') { - return 'Job'; - } - - $j = $this->jobRepository->find($value); - - return $this->translatableStringHelper->localize( - $j->getLabel() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['job_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by treating agent job'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acpw.referrers', 'u'); @@ -93,11 +52,38 @@ final class JobAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Job'; + } + + $j = $this->jobRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['job_aggregator']; + } + + public function getTitle(): string + { + return 'Group by treating agent job'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php index 1815ecc19..a6ae042e5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php @@ -15,16 +15,15 @@ use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Repository\UserRepository; use Chill\MainBundle\Templating\Entity\UserRender; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr\From; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; final class ReferrerAggregator implements AggregatorInterface { - private UserRepository $userRepository; - private UserRender $userRender; + private UserRepository $userRepository; + public function __construct( UserRepository $userRepository, UserRender $userRender @@ -51,7 +50,6 @@ final class ReferrerAggregator implements AggregatorInterface } else { $qb->groupBy('referrer_aggregator'); } - } public function applyOn(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php index fc602f973..fa750b486 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php @@ -49,7 +49,6 @@ final class ResultAggregator implements AggregatorInterface } else { $qb->groupBy('result_aggregator'); } - } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php index 74a73537c..0e1a7a044 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -1,18 +1,25 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function getLabels($key, array $values, $data) - { - return function ($value): string { - if ($value === '_header') { - return 'Scope'; - } - - $s = $this->scopeRepository->find($value); - - return $this->translatableStringHelper->localize( - $s->getName() - ); - }; - } - - /** - * @inheritDoc - */ - public function getQueryKeys($data): array - { - return ['scope_aggregator']; - } - - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - // no form - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Group by treating agent scope'; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acpw.referrers', 'u'); @@ -93,11 +52,38 @@ final class ScopeAggregator implements AggregatorInterface } } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['scope_aggregator']; + } + + public function getTitle(): string + { + return 'Group by treating agent scope'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Declarations.php b/src/Bundle/ChillPersonBundle/Export/Declarations.php index f6c870e4d..0f4d84e3c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Declarations.php +++ b/src/Bundle/ChillPersonBundle/Export/Declarations.php @@ -16,15 +16,15 @@ namespace Chill\PersonBundle\Export; */ abstract class Declarations { - public const PERSON_IMPLIED_IN = 'person_implied_in'; - - public const PERSON_TYPE = 'person'; - public const ACP_TYPE = 'accompanying_period'; - public const SOCIAL_WORK_ACTION_TYPE = 'social_actions'; - public const EVAL_TYPE = 'evaluation'; public const HOUSEHOLD_TYPE = 'household'; + + public const PERSON_IMPLIED_IN = 'person_implied_in'; + + public const PERSON_TYPE = 'person'; + + public const SOCIAL_WORK_ACTION_TYPE = 'social_actions'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index a842284f5..72ef72119 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -21,9 +21,9 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Role\Role; -use LogicException; class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface { @@ -40,11 +40,6 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface // TODO: Implement buildForm() method. } - public function getTitle(): string - { - return 'Count accompanying courses'; - } - public function getAllowedFormattersTypes(): array { return [FormatterInterface::TYPE_TABULAR]; @@ -55,6 +50,11 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface return 'Count accompanying courses by various parameters'; } + public function getGroup(): string + { + return 'Exports of accompanying courses'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -79,6 +79,11 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Count accompanying courses'; + } + public function getType(): string { return Declarations::ACP_TYPE; @@ -104,9 +109,4 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface Declarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of accompanying courses'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index 1e703754e..a329afee1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -1,5 +1,14 @@ repository = $em->getRepository(AccompanyingPeriod::class); } - /** - * @inheritDoc - */ public function buildForm(FormBuilderInterface $builder) { // TODO: Implement buildForm() method. } - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Count evaluations'; - } - - /** - * @inheritDoc - */ public function getAllowedFormattersTypes(): array { return [FormatterInterface::TYPE_TABULAR]; } - /** - * @inheritDoc - */ public function getDescription(): string { return 'Count evaluation by various parameters.'; } - /** - * @inheritDoc - */ + public function getGroup(): string + { + return 'Exports of evaluations'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -74,56 +67,42 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface }; } - /** - * @inheritDoc - */ public function getQueryKeys($data): array { return ['export_result']; } - /** - * @inheritDoc - */ public function getResult($qb, $data) { return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); } - /** - * @inheritDoc - */ + public function getTitle(): string + { + return 'Count evaluations'; + } + public function getType(): string { return Declarations::EVAL_TYPE; } - /** - * @inheritDoc - */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('acp') ->join('acp.works', 'acpw') - ->join('acpw.accompanyingPeriodWorkEvaluations', 'eval') - ; + ->join('acpw.accompanyingPeriodWorkEvaluations', 'eval'); $qb->select('COUNT(eval.id) AS export_result'); return $qb; } - /** - * @inheritDoc - */ public function requiredRole() { return new Role(AccompanyingPeriodVoter::STATS); } - /** - * @inheritDoc - */ public function supportsModifiers(): array { return [ @@ -132,9 +111,4 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface //Declarations::SOCIAL_WORK_ACTION_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of evaluations'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php index a43345ff3..791c42772 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php @@ -1,5 +1,14 @@ repository = $em->getRepository(AccompanyingPeriod::class); } - /** - * @inheritDoc - */ public function buildForm(FormBuilderInterface $builder) { // TODO: Implement buildForm() method. } - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Count households'; - } - - /** - * @inheritDoc - */ public function getAllowedFormattersTypes(): array { return [FormatterInterface::TYPE_TABULAR]; } - /** - * @inheritDoc - */ public function getDescription(): string { return 'Count household by various parameters.'; } - /** - * @inheritDoc - */ + public function getGroup(): string + { + return 'Exports of households'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -73,59 +67,45 @@ class CountHousehold implements ExportInterface, GroupedExportInterface }; } - /** - * @inheritDoc - */ public function getQueryKeys($data): array { return ['export_result']; } - /** - * @inheritDoc - */ public function getResult($qb, $data) { return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); } - /** - * @inheritDoc - */ + public function getTitle(): string + { + return 'Count households'; + } + public function getType(): string { return Declarations::HOUSEHOLD_TYPE; } - /** - * @inheritDoc - */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('acp') ->join('acp.participations', 'acppart') ->join('acppart.person', 'person') ->join('person.householdParticipations', 'householdmember') - ->join('householdmember.household', 'household') - ; + ->join('householdmember.household', 'household'); $qb->select('COUNT(DISTINCT householdmember.household) AS export_result'); return $qb; } - /** - * @inheritDoc - */ public function requiredRole() { // TODO HouseholdVoter::STATS !?? return new Role(AccompanyingPeriodVoter::STATS); } - /** - * @inheritDoc - */ public function supportsModifiers(): array { return [ @@ -133,9 +113,4 @@ class CountHousehold implements ExportInterface, GroupedExportInterface //Declarations::ACP_TYPE ]; } - - public function getGroup(): string - { - return 'Exports of households'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php index 3ef74a69e..729e5a202 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php @@ -25,7 +25,6 @@ use Symfony\Component\Security\Core\Role\Role; class CountPerson implements ExportInterface, GroupedExportInterface { - protected PersonRepository $personRepository; public function __construct( @@ -49,6 +48,11 @@ class CountPerson implements ExportInterface, GroupedExportInterface return 'Count people by various parameters.'; } + public function getGroup(): string + { + return 'Exports of persons'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -117,9 +121,4 @@ class CountPerson implements ExportInterface, GroupedExportInterface //Declarations::ACP_TYPE ]; } - - public function getGroup(): string - { - return 'Exports of persons'; - } } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php index d271bd3da..152793f97 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php @@ -1,5 +1,14 @@ repository = $em->getRepository(AccompanyingPeriod::class); } - /** - * @inheritDoc - */ public function buildForm(FormBuilderInterface $builder) { // TODO: Implement buildForm() method. } - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Count people participating in an accompanying course'; - } - - /** - * @inheritDoc - */ public function getAllowedFormattersTypes(): array { return [FormatterInterface::TYPE_TABULAR]; } - /** - * @inheritDoc - */ public function getDescription(): string { return 'Count people participating in an accompanying course by various parameters.'; } - /** - * @inheritDoc - */ + public function getGroup(): string + { + return 'Exports of persons'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -73,66 +67,47 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor }; } - /** - * @inheritDoc - */ public function getQueryKeys($data): array { return ['export_result']; } - /** - * @inheritDoc - */ public function getResult($qb, $data) { return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); } - /** - * @inheritDoc - */ + public function getTitle(): string + { + return 'Count people participating in an accompanying course'; + } + public function getType(): string { return Declarations::HOUSEHOLD_TYPE; } - /** - * @inheritDoc - */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $qb = $this->repository->createQueryBuilder('acp') ->join('acp.participations', 'acppart') - ->join('acppart.person', 'person') - ; + ->join('acppart.person', 'person'); $qb->select('COUNT(DISTINCT person.id) AS export_result'); return $qb; } - /** - * @inheritDoc - */ public function requiredRole() { return new Role(AccompanyingPeriodVoter::STATS); } - /** - * @inheritDoc - */ public function supportsModifiers(): array { return [ Declarations::ACP_TYPE, - Declarations::PERSON_TYPE + Declarations::PERSON_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of persons'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php index cfea1f0c1..e19a40a0f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php @@ -21,8 +21,8 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; -use Symfony\Component\Form\FormBuilderInterface; use LogicException; +use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Role\Role; class CountSocialWorkActions implements ExportInterface, GroupedExportInterface @@ -40,11 +40,6 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface // No form necessary? } - public function getTitle(): string - { - return 'Count social work actions'; - } - public function getAllowedFormattersTypes(): array { return [FormatterInterface::TYPE_TABULAR]; @@ -55,6 +50,11 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface return 'Count social work actions by various parameters'; } + public function getGroup(): string + { + return 'Exports of social work actions'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -79,6 +79,11 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); } + public function getTitle(): string + { + return 'Count social work actions'; + } + public function getType(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; @@ -87,8 +92,7 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder { $qb = $this->repository->createQueryBuilder('acp') - ->join('acp.works', 'acpw') - ; + ->join('acp.works', 'acpw'); $qb->select('COUNT(acpw.id) as export_result'); @@ -107,9 +111,4 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface Declarations::SOCIAL_WORK_ACTION_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of social work actions'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php index f2f72aa29..5f519e647 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php @@ -136,6 +136,11 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou return 'Create a list of people according to various filters.'; } + public function getGroup(): string + { + return 'Exports of persons'; + } + public function getLabels($key, array $values, $data) { switch ($key) { @@ -426,9 +431,11 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou if ('_header' === $value) { return $this->translatableStringHelper->localize($cf->getName()); } + if (null === $value) { return ''; } + return $this->customFieldProvider ->getCustomFieldByType($cf->getType()) ->render(json_decode($value, true), $cf, 'csv'); @@ -437,6 +444,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) { return function ($value) use ($cf, $cfType, $key) { $slugChoice = $this->extractInfosFromSlug($key)['additionnalInfos']['choiceSlug']; + if (null === $value) { return ''; } @@ -475,9 +483,4 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou return $uid; } - - public function getGroup(): string - { - return 'Exports of persons'; - } } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index 2c65acb84..7f8688493 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -129,6 +129,11 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat return 'Create a list of duplicate people'; } + public function getGroup(): string + { + return 'Exports of persons'; + } + /** * @return string */ @@ -197,9 +202,4 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat return $result->fetchAllAssociative(); } - - public function getGroup(): string - { - return 'Exports of persons'; - } } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index 417411f98..718d04643 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -18,6 +18,7 @@ use Chill\MainBundle\Form\Type\ChillDateType; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; +use DateTime; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; @@ -27,7 +28,6 @@ use Symfony\Component\Security\Core\Role\Role; class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportInterface { - private EntityRepository $repository; public function __construct( @@ -36,44 +36,29 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn $this->repository = $em->getRepository(AccompanyingPeriod::class); } - /** - * @inheritDoc - */ public function buildForm(FormBuilderInterface $builder): void { $builder->add('closingdate', ChillDateType::class, [ 'label' => 'Closingdate to apply', - 'data' => new \DateTime('now'), + 'data' => new DateTime('now'), ]); } - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Accompanying courses duration'; - } - - /** - * @inheritDoc - */ public function getAllowedFormattersTypes(): array { return [FormatterInterface::TYPE_TABULAR]; } - /** - * @inheritDoc - */ public function getDescription(): string { return 'Create an average of accompanying courses duration according to various filters'; } - /** - * @inheritDoc - */ + public function getGroup(): string + { + return 'Exports of accompanying courses'; + } + public function getLabels($key, array $values, $data) { if ('export_result' !== $key) { @@ -88,33 +73,26 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn }; } - /** - * @inheritDoc - */ public function getQueryKeys($data): array { return ['export_result']; } - /** - * @inheritDoc - */ public function getResult($qb, $data) { return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); } - /** - * @inheritDoc - */ + public function getTitle(): string + { + return 'Accompanying courses duration'; + } + public function getType(): string { return Declarations::ACP_TYPE; } - /** - * @inheritDoc - */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder { $qb = $this->repository->createQueryBuilder('acp'); @@ -125,34 +103,22 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn WHEN acp.closingDate IS NOT NULL THEN acp.closingDate ELSE :force_closingDate - END ) - acp.openingDate + END ) - acp.openingDate ) AS export_result') - ->setParameter('force_closingDate', $data['closingdate']) - ; + ->setParameter('force_closingDate', $data['closingdate']); return $qb; } - /** - * @inheritDoc - */ public function requiredRole(): Role { return new Role(AccompanyingPeriodVoter::STATS); } - /** - * @inheritDoc - */ public function supportsModifiers(): array { return [ - Declarations::ACP_TYPE + Declarations::ACP_TYPE, ]; } - - public function getGroup(): string - { - return 'Exports of accompanying courses'; - } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php index 933350134..6b1ad6612 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php @@ -1,60 +1,32 @@ add('on_date', ChillDateType::class, [ - 'data' => new DateTime(), - ]) - ; - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by active on date'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - return ['Filtered by actives courses: active on %ondate%', [ - '%ondate%' => $data['on_date']->format('d-m-Y') - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -77,11 +49,28 @@ class ActiveOnDateFilter implements FilterInterface $qb->setParameter('ondate', $data['on_date'], Types::DATE_MUTABLE); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('on_date', ChillDateType::class, [ + 'data' => new DateTime(), + ]); + } + + public function describeAction($data, $format = 'string'): array + { + return ['Filtered by actives courses: active on %ondate%', [ + '%ondate%' => $data['on_date']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter by active on date'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php index 2f83667c9..c37097d30 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php @@ -1,64 +1,32 @@ add('date_from', ChillDateType::class, [ - 'data' => new DateTime(), - ]) - ->add('date_to', ChillDateType::class, [ - 'data' => new DateTime(), - ]) - ; - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by active at least one day between dates'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - return ['Filtered by actives courses: at least one day between %datefrom% and %dateto%', [ - '%datefrom%' => $data['date_from']->format('d-m-Y'), - '%dateto%' => $data['date_to']->format('d-m-Y'), - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -83,11 +51,32 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface $qb->setParameter('dateto', $data['date_to'], Types::DATE_MUTABLE); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('date_from', ChillDateType::class, [ + 'data' => new DateTime(), + ]) + ->add('date_to', ChillDateType::class, [ + 'data' => new DateTime(), + ]); + } + + public function describeAction($data, $format = 'string'): array + { + return ['Filtered by actives courses: at least one day between %datefrom% and %dateto%', [ + '%datefrom%' => $data['date_from']->format('d-m-Y'), + '%dateto%' => $data['date_to']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter by active at least one day between dates'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php index 938a4e4b4..6efe29233 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_activitytypes', EntityType::class, [ - 'class' => ActivityType::class, - 'choice_label' => function (ActivityType $aty) { - return $this->translatableStringHelper->localize($aty->getName()); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter accompanying course by activity type'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $types = []; - - foreach ($data['accepted_activitytypes'] as $aty) { - $types[] = $this->translatableStringHelper->localize($aty->getName()); - } - - return ['Filtered by activity types: only %activitytypes%', [ - '%activitytypes%' => implode(", ou ", $types) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { // One2many between activity and accompanyingperiod is not reversed ! @@ -83,8 +47,7 @@ class ActivityTypeFilter implements FilterInterface $qb ->join('act.accompanyingPeriod', 'acp') - ->join('act.activityType', 'aty') - ; + ->join('act.activityType', 'aty'); $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('aty.id', ':activitytypes'); @@ -97,14 +60,40 @@ class ActivityTypeFilter implements FilterInterface $qb->add('where', $where); $qb->setParameter('activitytypes', $data['accepted_activitytypes']); - } - /** - * @inheritDoc - */ public function applyOn() { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_activitytypes', EntityType::class, [ + 'class' => ActivityType::class, + 'choice_label' => function (ActivityType $aty) { + return $this->translatableStringHelper->localize($aty->getName()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $types = []; + + foreach ($data['accepted_activitytypes'] as $aty) { + $types[] = $this->translatableStringHelper->localize($aty->getName()); + } + + return ['Filtered by activity types: only %activitytypes%', [ + '%activitytypes%' => implode(', ou ', $types), + ]]; + } + + public function getTitle(): string + { + return 'Filter accompanying course by activity type'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index d3fde5b91..7bea4eb7f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_locations', EntityType::class, [ - 'class' => Location::class, - 'choice_label' => function (Location $l) { - return $l->getName() .' ('. $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by administrative location'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $locations = []; - - foreach ($data['accepted_locations'] as $l) { - $locations[] = $l->getName(); - } - - return ['Filtered by administratives locations: only %locations%', [ - '%locations%' => implode(", ou ", $locations) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -89,11 +50,38 @@ class AdministrativeLocationFilter implements FilterInterface $qb->setParameter('locations', $data['accepted_locations']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_locations', EntityType::class, [ + 'class' => Location::class, + 'choice_label' => function (Location $l) { + return $l->getName() . ' (' . $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $locations = []; + + foreach ($data['accepted_locations'] as $l) { + $locations[] = $l->getName(); + } + + return ['Filtered by administratives locations: only %locations%', [ + '%locations%' => implode(', ou ', $locations), + ]]; + } + + public function getTitle(): string + { + return 'Filter by administrative location'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php index 23fce3f40..150a66ed1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php @@ -1,21 +1,27 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_closingmotives', EntityType::class, [ - 'class' => ClosingMotive::class, - 'choice_label' => function (ClosingMotive $cm) { - return $this->translatableStringHelper->localize($cm->getName()); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by closing motive'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $motives = []; - - foreach ($data['accepted_closingmotives'] as $k => $v) { - $motives[] = $this->translatableStringHelper->localize($v->getName()); - } - - return [ - 'Filtered by closingmotive: only %closingmotives%', [ - '%closingmotives%' => implode(', ou ', $motives) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -90,11 +50,39 @@ class ClosingMotiveFilter implements FilterInterface $qb->setParameter('closingmotive', $data['accepted_closingmotives']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_closingmotives', EntityType::class, [ + 'class' => ClosingMotive::class, + 'choice_label' => function (ClosingMotive $cm) { + return $this->translatableStringHelper->localize($cm->getName()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $motives = []; + + foreach ($data['accepted_closingmotives'] as $k => $v) { + $motives[] = $this->translatableStringHelper->localize($v->getName()); + } + + return [ + 'Filtered by closingmotive: only %closingmotives%', [ + '%closingmotives%' => implode(', ou ', $motives), + ], ]; + } + + public function getTitle(): string + { + return 'Filter by closing motive'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php index 23286f941..6fedf37f0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php @@ -1,5 +1,14 @@ false, 'is confidential' => true, ]; - - private CONST DEFAULT_CHOICE = false; - + + private const DEFAULT_CHOICE = false; + private TranslatorInterface $translator; - + public function __construct(TranslatorInterface $translator) { $this->translator = $translator; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_confidentials', ChoiceType::class, [ - 'choices' => self::CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle(): string - { - return 'Filter by confidential'; - } - - public function describeAction($data, $format = 'string'): array - { - dump($data, self::CHOICES); - - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_confidentials']) { - $choice = $k; - } - } - - return [ - 'Filtered by confidential: only %confidential%', [ - '%confidential%' => $this->translator->trans($choice) - ] - ]; - } - public function addRole() { return null; @@ -84,4 +60,36 @@ class ConfidentialFilter implements FilterInterface return Declarations::ACP_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_confidentials', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + dump($data, self::CHOICES); + + foreach (self::CHOICES as $k => $v) { + if ($v === $data['accepted_confidentials']) { + $choice = $k; + } + } + + return [ + 'Filtered by confidential: only %confidential%', [ + '%confidential%' => $this->translator->trans($choice), + ], + ]; + } + + public function getTitle(): string + { + return 'Filter by confidential'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php index ddebbdc6f..76ba40a59 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php @@ -35,17 +35,6 @@ class CurrentUserJobFilter implements FilterInterface $this->security = $security; } - public function describeAction($data, $format = 'string') - { - return [ - 'Filtered by user job: only %job%', [ - '%job%' => $this->translatableStringHelper->localize( - $this->getUserJob()->getLabel() - ) - ], - ]; - } - public function addRole() { return null; @@ -75,16 +64,27 @@ class CurrentUserJobFilter implements FilterInterface { } + public function describeAction($data, $format = 'string') + { + return [ + 'Filtered by user job: only %job%', [ + '%job%' => $this->translatableStringHelper->localize( + $this->getUserJob()->getLabel() + ), + ], + ]; + } + public function getTitle() { return 'Filter by user job'; } - private function getUserJob():UserJob + private function getUserJob(): UserJob { /** @var User $user */ $user = $this->security->getUser(); return $user->getUserJob(); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php index e6c56f11e..37dcac27c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php @@ -18,7 +18,6 @@ use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Security; @@ -26,9 +25,6 @@ class CurrentUserScopeFilter implements FilterInterface { private Security $security; - /** - * @var TranslatableStringHelper - */ private TranslatableStringHelper $translatableStringHelper; public function __construct( @@ -39,17 +35,6 @@ class CurrentUserScopeFilter implements FilterInterface $this->security = $security; } - public function describeAction($data, $format = 'string') - { - return [ - 'Filtered by user main scope: only %scope%', [ - '%scope%' => $this->translatableStringHelper->localize( - $this->getUserMainScope()->getName() - ) - ] - ]; - } - public function addRole() { return null; @@ -70,7 +55,6 @@ class CurrentUserScopeFilter implements FilterInterface $qb->add('where', $where); $qb->setParameter('userscope', $this->getUserMainScope()); - } public function applyOn() @@ -82,16 +66,27 @@ class CurrentUserScopeFilter implements FilterInterface { } + public function describeAction($data, $format = 'string') + { + return [ + 'Filtered by user main scope: only %scope%', [ + '%scope%' => $this->translatableStringHelper->localize( + $this->getUserMainScope()->getName() + ), + ], + ]; + } + public function getTitle() { return 'Filter by user scope'; } - private function getUserMainScope():Scope + private function getUserMainScope(): Scope { /** @var User $user */ $user = $this->security->getUser(); return $user->getMainScope(); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php index ed874be2b..6a755638b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php @@ -1,5 +1,14 @@ true, 'is not emergency' => false, ]; - - private CONST DEFAULT_CHOICE = false; - + + private const DEFAULT_CHOICE = false; + private TranslatorInterface $translator; - + public function __construct(TranslatorInterface $translator) { $this->translator = $translator; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_emergency', ChoiceType::class, [ - 'choices' => self::CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle(): string - { - return 'Filter by emergency'; - } - - public function describeAction($data, $format = 'string'): array - { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_emergency']) { - $choice = $k; - } - } - - return [ - 'Filtered by emergency: only %emergency%', [ - '%emergency%' => $this->translator->trans($choice) - ] - ]; - } - public function addRole() { return null; @@ -82,4 +60,34 @@ class EmergencyFilter implements FilterInterface return Declarations::ACP_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_emergency', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + foreach (self::CHOICES as $k => $v) { + if ($v === $data['accepted_emergency']) { + $choice = $k; + } + } + + return [ + 'Filtered by emergency: only %emergency%', [ + '%emergency%' => $this->translator->trans($choice), + ], + ]; + } + + public function getTitle(): string + { + return 'Filter by emergency'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php index 4756f06c2..ab47c1cc7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_evaluations', EntityType::class, [ - 'class' => Evaluation::class, - 'choice_label' => function (Evaluation $ev) { - return $this->translatableStringHelper->localize($ev->getTitle()); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by evaluation'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $evaluations = []; - - foreach ($data['accepted_evaluations'] as $ev) { - $evaluations[] = $this->translatableStringHelper->localize($ev->getTitle()); - } - - return ['Filtered by evaluations: only %evals%', [ - '%evals%' => implode(", ou ", $evaluations) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb ->join('acp.works', 'acpw') ->join('acpw.accompanyingPeriodWorkEvaluations', 'we') - ->join('we.evaluation', 'ev') - ; + ->join('we.evaluation', 'ev'); $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('ev.id', ':evaluations'); @@ -95,11 +55,38 @@ class EvaluationFilter implements FilterInterface $qb->setParameter('evaluations', $data['accepted_evaluations']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_evaluations', EntityType::class, [ + 'class' => Evaluation::class, + 'choice_label' => function (Evaluation $ev) { + return $this->translatableStringHelper->localize($ev->getTitle()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $evaluations = []; + + foreach ($data['accepted_evaluations'] as $ev) { + $evaluations[] = $this->translatableStringHelper->localize($ev->getTitle()); + } + + return ['Filtered by evaluations: only %evals%', [ + '%evals%' => implode(', ou ', $evaluations), + ]]; + } + + public function getTitle(): string + { + return 'Filter by evaluation'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index 5445e20a4..5a1d74c1f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -1,11 +1,21 @@ add('date', ChillDateType::class, [ - 'data' => new \DateTime(), - ]) - ->add('accepted_loctype', EntityType::class, [ - 'class' => GeographicalUnit::class, - 'choice_label' => function (GeographicalUnit $u) { - return $u->getUnitName(); - }, - 'multiple' => true, - 'expanded' => true, - ]) - ; - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by geographical unit'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - return ['Filtered by geographic unit: only %date%', [ - '%date%' => $data['date']->format('d-m-Y'), - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -89,11 +55,36 @@ class GeographicalUnitStatFilter implements FilterInterface $qb->setParameter('loctype', $data['accepted_loctype']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('date', ChillDateType::class, [ + 'data' => new DateTime(), + ]) + ->add('accepted_loctype', EntityType::class, [ + 'class' => GeographicalUnit::class, + 'choice_label' => static function (GeographicalUnit $u) { + return $u->getUnitName(); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + return ['Filtered by geographic unit: only %date%', [ + '%date%' => $data['date']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter by geographical unit'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index c433c724f..22a1e2415 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -1,5 +1,14 @@ 'occasional', 'is regular' => 'regular', ]; - - private CONST DEFAULT_CHOICE = 'occasional'; - + + private const DEFAULT_CHOICE = 'occasional'; + private TranslatorInterface $translator; - + public function __construct(TranslatorInterface $translator) { $this->translator = $translator; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_intensities', ChoiceType::class, [ - 'choices' => self::CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle(): string - { - return 'Filter by intensity'; - } - - public function describeAction($data, $format = 'string'): array - { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_intensities']) { - $choice = $k; - } - } - - return [ - 'Filtered by intensity: only %intensity%', [ - '%intensity%' => $this->translator->trans($choice) - ] - ]; - } - public function addRole() { return null; @@ -82,4 +60,34 @@ class IntensityFilter implements FilterInterface return Declarations::ACP_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_intensities', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + foreach (self::CHOICES as $k => $v) { + if ($v === $data['accepted_intensities']) { + $choice = $k; + } + } + + return [ + 'Filtered by intensity: only %intensity%', [ + '%intensity%' => $this->translator->trans($choice), + ], + ]; + } + + public function getTitle(): string + { + return 'Filter by intensity'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php index 400ab7a14..205707831 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php @@ -1,64 +1,32 @@ add('date_from', ChillDateType::class, [ - 'data' => new DateTime(), - ]) - ->add('date_to', ChillDateType::class, [ - 'data' => new DateTime(), - ]) - ; - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by opened between dates'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - return ['Filtered by opening dates: between %datefrom% and %dateto%', [ - '%datefrom%' => $data['date_from']->format('d-m-Y'), - '%dateto%' => $data['date_to']->format('d-m-Y'), - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -79,11 +47,32 @@ class OpenBetweenDatesFilter implements FilterInterface $qb->setParameter('dateto', $data['date_to'], Types::DATE_MUTABLE); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('date_from', ChillDateType::class, [ + 'data' => new DateTime(), + ]) + ->add('date_to', ChillDateType::class, [ + 'data' => new DateTime(), + ]); + } + + public function describeAction($data, $format = 'string'): array + { + return ['Filtered by opening dates: between %datefrom% and %dateto%', [ + '%datefrom%' => $data['date_from']->format('d-m-Y'), + '%dateto%' => $data['date_to']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter by opened between dates'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php index 3cda93577..a67a0157c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_origins', EntityType::class, [ - 'class' => Origin::class, - 'choice_label' => function (Origin $o) { - return $this->translatableStringHelper->localize($o->getLabel()); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by origin'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $origins = []; - - foreach ($data['accepted_origins'] as $v) { - $origins[] = $this->translatableStringHelper->localize($v->getLabel()); - } - - return ['Filtered by origins: only %origins%', [ - '%origins%' => implode(', ou ', $origins) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -90,11 +50,38 @@ class OriginFilter implements FilterInterface $qb->setParameter('origin', $data['accepted_origins']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_origins', EntityType::class, [ + 'class' => Origin::class, + 'choice_label' => function (Origin $o) { + return $this->translatableStringHelper->localize($o->getLabel()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $origins = []; + + foreach ($data['accepted_origins'] as $v) { + $origins[] = $this->translatableStringHelper->localize($v->getLabel()); + } + + return ['Filtered by origins: only %origins%', [ + '%origins%' => implode(', ou ', $origins), + ]]; + } + + public function getTitle(): string + { + return 'Filter by origin'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 89b306678..94bf7a74c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -1,5 +1,14 @@ userRender = $userRender; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_referrers', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, - 'multiple' => true, - 'expanded' => true - ]); - - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by referrers'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $users = []; - - foreach ($data['accepted_referrers'] as $r) { - $users[] = $r; - } - - return [ - 'Filtered by referrer: only %referrers%', [ - '%referrers' => implode(", ou ", $users) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); @@ -88,11 +49,39 @@ class ReferrerFilter implements FilterInterface $qb->setParameter('referrers', $data['accepted_referrers']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_referrers', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_referrers'] as $r) { + $users[] = $r; + } + + return [ + 'Filtered by referrer: only %referrers%', [ + '%referrers' => implode(', ou ', $users), + ], ]; + } + + public function getTitle(): string + { + return 'Filter by referrers'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php index 180775f01..3b9ed950c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php @@ -1,5 +1,14 @@ 'participation', @@ -21,12 +32,10 @@ class RequestorFilter implements FilterInterface 'no requestor' => 'no_requestor', ]; - private const DEFAULT_CHOICE = 'participation'; + protected EntityManagerInterface $em; protected TranslatorInterface $translator; - protected EntityManagerInterface $em; - public function __construct( TranslatorInterface $translator, EntityManagerInterface $em @@ -35,75 +44,35 @@ class RequestorFilter implements FilterInterface $this->em = $em; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_choices', ChoiceType::class, [ - 'choices' => self::REQUESTOR_CHOICES, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by requestor'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $choice = array_flip(self::REQUESTOR_CHOICES)[$data['accepted_choices']]; - - return ['Filtered by requestor: only %choice%', [ - '%choice%' => $this->translator->trans($choice) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); switch ($data['accepted_choices']) { case 'participation': - $qb->join('acp.participations', 'part'); $clause = $qb->expr()->andX( $qb->expr()->isNotNull('acp.requestorPerson'), $qb->expr()->eq('acp.requestorPerson', 'part.person') ); + break; case 'other_person': - $expr = $this->em->getExpressionBuilder(); - $qb->join('acp.participations','part'); + $qb->join('acp.participations', 'part'); $clause = $expr->andX( $expr->isNotNull('acp.requestorPerson'), - $expr->notIn('acp.requestorPerson', + $expr->notIn( + 'acp.requestorPerson', // subquery $this->em->createQueryBuilder() @@ -112,26 +81,26 @@ class RequestorFilter implements FilterInterface ->join('acp2.participations', 'part2') ->where($expr->eq('acp2.requestorPerson', 'part2.person')) ->getDQL() - ) ); + break; case 'thirdparty': - $clause = $qb->expr()->isNotNull('acp.requestorThirdParty'); + break; case 'no_requestor': - $clause = $qb->expr()->andX( $qb->expr()->isNull('acp.requestorPerson'), $qb->expr()->isNull('acp.requestorThirdParty') ); + break; default: - throw new \Exception('Uncaught choice exception'); + throw new Exception('Uncaught choice exception'); } if ($where instanceof Andx) { @@ -143,11 +112,33 @@ class RequestorFilter implements FilterInterface $qb->add('where', $where); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_choices', ChoiceType::class, [ + 'choices' => self::REQUESTOR_CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $choice = array_flip(self::REQUESTOR_CHOICES)[$data['accepted_choices']]; + + return ['Filtered by requestor: only %choice%', [ + '%choice%' => $this->translator->trans($choice), + ]]; + } + + public function getTitle(): string + { + return 'Filter by requestor'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index d96d0ca44..979793def 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -1,5 +1,14 @@ actionRender = $actionRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_socialactions', EntityType::class, [ - 'class' => SocialAction::class, - 'choice_label' => function (SocialAction $sa) { - return $this->actionRender->renderString($sa, []); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - public function getTitle(): string - { - return 'Filter by socialaction'; - } - - public function describeAction($data, $format = 'string'): array - { - $socialactions = []; - - foreach ($data['accepted_socialactions'] as $sa) { - $socialactions[] = $this->actionRender->renderString($sa, []); - } - - return ['Filtered by socialactions: only %socialactions%', [ - '%socialactions%' => implode(", ou ", $socialactions) - ]]; - } - public function addRole() { return null; @@ -69,7 +43,7 @@ class SocialActionFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('acpw', $qb->getAllAliases())) { + if (!in_array('acpw', $qb->getAllAliases(), true)) { $qb->join('acp.works', 'acpw'); } $qb->join('acpw.socialAction', 'sa'); @@ -91,4 +65,34 @@ class SocialActionFilter implements FilterInterface { return Declarations::ACP_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_socialactions', EntityType::class, [ + 'class' => SocialAction::class, + 'choice_label' => function (SocialAction $sa) { + return $this->actionRender->renderString($sa, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $socialactions = []; + + foreach ($data['accepted_socialactions'] as $sa) { + $socialactions[] = $this->actionRender->renderString($sa, []); + } + + return ['Filtered by socialactions: only %socialactions%', [ + '%socialactions%' => implode(', ou ', $socialactions), + ]]; + } + + public function getTitle(): string + { + return 'Filter by socialaction'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php index c2f9b1a06..f707ab9e2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php @@ -1,5 +1,14 @@ socialIssueRender = $socialIssueRender; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_socialissues', EntityType::class, [ - 'class' => SocialIssue::class, - 'choice_label' => function ($socialIssue) { - return $this->socialIssueRender->renderString($socialIssue, []); - }, - 'multiple' => true, - 'expanded' => true, - ]); - } - - public function getTitle() - { - return 'Filter by social issue'; - } - - public function describeAction($data, $format = 'string') - { - $issues = []; - - $socialissues = $this->addParentIssues($data['accepted_socialissues']); - - foreach ($socialissues as $i) { - if ('null' === $i) { - $issues[] = $this->translator->trans('Not given'); - } else { - $issues[] = $this->socialIssueRender->renderString($i, []); - } - } - - return [ - 'Filtered by socialissues: only %socialissues%', [ - '%socialissues%' => implode(', ou ', $issues) - ]]; - } - public function addRole() { return null; @@ -96,49 +62,87 @@ class SocialIssueFilter implements FilterInterface } $qb->add('where', $where); - $qb->setParameter('socialissues', + $qb->setParameter( + 'socialissues', $this->addParentIssues($data['accepted_socialissues']) ); } - /** - * "Le filtre retiendra les parcours qui comportent cette problématique, - * ou une problématique parente à celles choisies." - * - * Add parent of each socialissue selected, and remove duplicates - * - * @param $accepted_issues - * @return array - */ - private function addParentIssues($accepted_issues): array - { - $array = []; - foreach ($accepted_issues as $i) - { - /** @var SocialIssue $i */ - if ($i->hasParent()) { - $array[] = $i->getParent(); - } - $array[] = $i; - } - return $this->removeDuplicate($array); - } - - private function removeDuplicate(array $array): array - { - $ids = array_map(function ($item) { - return $item->getId(); - }, $array); - - $unique_ids = array_unique($ids); - - return array_values( - array_intersect_key($array, $unique_ids)); - } - public function applyOn() { return Declarations::ACP_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_socialissues', EntityType::class, [ + 'class' => SocialIssue::class, + 'choice_label' => function ($socialIssue) { + return $this->socialIssueRender->renderString($socialIssue, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string') + { + $issues = []; + + $socialissues = $this->addParentIssues($data['accepted_socialissues']); + + foreach ($socialissues as $i) { + if ('null' === $i) { + $issues[] = $this->translator->trans('Not given'); + } else { + $issues[] = $this->socialIssueRender->renderString($i, []); + } + } + + return [ + 'Filtered by socialissues: only %socialissues%', [ + '%socialissues%' => implode(', ou ', $issues), + ], ]; + } + + public function getTitle() + { + return 'Filter by social issue'; + } + + /** + * "Le filtre retiendra les parcours qui comportent cette problématique, + * ou une problématique parente à celles choisies.". + * + * Add parent of each socialissue selected, and remove duplicates + * + * @param $accepted_issues + */ + private function addParentIssues($accepted_issues): array + { + $array = []; + + foreach ($accepted_issues as $i) { + /** @var SocialIssue $i */ + if ($i->hasParent()) { + $array[] = $i->getParent(); + } + $array[] = $i; + } + + return $this->removeDuplicate($array); + } + + private function removeDuplicate(array $array): array + { + $ids = array_map(static function ($item) { + return $item->getId(); + }, $array); + + $unique_ids = array_unique($ids); + + return array_values( + array_intersect_key($array, $unique_ids) + ); + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php index 1985031de..a7d218acc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php @@ -1,21 +1,28 @@ AccompanyingPeriod::STEP_DRAFT, @@ -23,8 +30,6 @@ class StepFilter implements FilterInterface 'Closed' => AccompanyingPeriod::STEP_CLOSED, ]; - private const DEFAULT_CHOICE = AccompanyingPeriod::STEP_CONFIRMED; - /** * @var TranslatorInterface */ @@ -35,31 +40,6 @@ class StepFilter implements FilterInterface $this->translator = $translator; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_steps', ChoiceType::class, [ - 'choices' => self::STEPS, - 'multiple' => false, - 'expanded' => true, - 'empty_data' => self::DEFAULT_CHOICE, - 'data' => self::DEFAULT_CHOICE, - ]); - } - - public function getTitle() - { - return 'Filter by step'; - } - - public function describeAction($data, $format = 'string') - { - $step = array_flip(self::STEPS)[$data['accepted_steps']]; - - return ["Filtered by steps: only %step%", [ - '%step%' => $this->translator->trans($step) - ]]; - } - public function addRole() { return null; @@ -85,4 +65,28 @@ class StepFilter implements FilterInterface return Declarations::ACP_TYPE; } -} \ No newline at end of file + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_steps', ChoiceType::class, [ + 'choices' => self::STEPS, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string') + { + $step = array_flip(self::STEPS)[$data['accepted_steps']]; + + return ['Filtered by steps: only %step%', [ + '%step%' => $this->translator->trans($step), + ]]; + } + + public function getTitle() + { + return 'Filter by step'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php index 6df5e38bf..d467679de 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_evaluationtype', EntityType::class, [ - 'class' => Evaluation::class, - 'choice_label' => function (Evaluation $ev): string { - return $this->translatableStringHelper->localize($ev->getTitle()); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by evaluation type'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $evals = []; - - foreach ($data['accepted_evaluationtype'] as $ev) { - $evals[] = $this->translatableStringHelper->localize($ev->getTitle()); - } - - return ['Filtered by evaluation type: only %evals%', [ - '%evals%' => implode(", ou ", $evals) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('eval.evaluation', ':evaluationtype'); - + if ($where instanceof Andx) { $where->add($clause); } else { @@ -86,11 +50,38 @@ final class EvaluationTypeFilter implements FilterInterface $qb->setParameter('evaluationtype', $data['accepted_evaluationtype']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::EVAL_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_evaluationtype', EntityType::class, [ + 'class' => Evaluation::class, + 'choice_label' => function (Evaluation $ev): string { + return $this->translatableStringHelper->localize($ev->getTitle()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $evals = []; + + foreach ($data['accepted_evaluationtype'] as $ev) { + $evals[] = $this->translatableStringHelper->localize($ev->getTitle()); + } + + return ['Filtered by evaluation type: only %evals%', [ + '%evals%' => implode(', ou ', $evals), + ]]; + } + + public function getTitle(): string + { + return 'Filter by evaluation type'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index c69e15d9e..0524e3bba 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -1,5 +1,14 @@ translator = $translator; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('maxdate', ChoiceType::class, [ - 'choices' => self::MAXDATE_CHOICES, - 'multiple' => false, - 'expanded' => true - ]); - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by maxdate'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - foreach (self::MAXDATE_CHOICES as $k => $v) { - if ($v === $data['maxdate']) { - $choice = $k; - } - } - - return ['Filtered by maxdate: only %choice%', [ - '%choice%' => $this->translator->trans($choice) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); - if ($data['maxdate'] === true) { + if (true === $data['maxdate']) { $clause = $qb->expr()->isNotNull('eval.maxDate'); } else { $clause = $qb->expr()->isNull('eval.maxDate'); @@ -90,11 +57,35 @@ class MaxDateFilter implements FilterInterface $qb->add('where', $where); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::EVAL_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('maxdate', ChoiceType::class, [ + 'choices' => self::MAXDATE_CHOICES, + 'multiple' => false, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + foreach (self::MAXDATE_CHOICES as $k => $v) { + if ($v === $data['maxdate']) { + $choice = $k; + } + } + + return ['Filtered by maxdate: only %choice%', [ + '%choice%' => $this->translator->trans($choice), + ]]; + } + + public function getTitle(): string + { + return 'Filter by maxdate'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php index 78aba8bf7..95170cb10 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php @@ -1,5 +1,14 @@ translatableStringHelper = $translatableStringHelper; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder - ->add('accepted_composition', EntityType::class, [ - 'class' => HouseholdCompositionType::class, - 'choice_label' => function (HouseholdCompositionType $type) { - return $this->translatableStringHelper->localize( - $type->getLabel() - ); - }, - 'multiple' => true, - 'expanded' => true, - ]) - ->add('on_date', ChillDateType::class, [ - 'data' => new \DateTime('now'), - ]) - ; - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by composition'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $compositions = []; - - foreach ($data['accepted_composition'] as $c) { - $compositions[] = $this->translatableStringHelper->localize( - $c->getLabel() - ); - } - - return ['Filtered by composition: only %compositions% on %ondate%', [ - '%compositions%' => implode(", ou ", $compositions), - '%ondate%' => $data['on_date']->format('d-m-Y') - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('composition', $qb->getAllAliases())) { + if (!in_array('composition', $qb->getAllAliases(), true)) { $qb->join('household.compositions', 'composition'); } @@ -113,11 +69,47 @@ class CompositionFilter implements FilterInterface $qb->setParameter('ondate', $data['on_date'], Types::DATE_MUTABLE); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::HOUSEHOLD_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('accepted_composition', EntityType::class, [ + 'class' => HouseholdCompositionType::class, + 'choice_label' => function (HouseholdCompositionType $type) { + return $this->translatableStringHelper->localize( + $type->getLabel() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]) + ->add('on_date', ChillDateType::class, [ + 'data' => new DateTime('now'), + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $compositions = []; + + foreach ($data['accepted_composition'] as $c) { + $compositions[] = $this->translatableStringHelper->localize( + $c->getLabel() + ); + } + + return ['Filtered by composition: only %compositions% on %ondate%', [ + '%compositions%' => implode(', ou ', $compositions), + '%ondate%' => $data['on_date']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter by composition'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php index 47fb37214..e07d03e04 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php @@ -6,7 +6,7 @@ * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ - + declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; @@ -38,10 +38,12 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface $calc = $data['date_calc']; $clause = $qb->expr()->andX( - $qb->expr()->gte('DATE_DIFF(:calc_date, person.birthdate)/365', + $qb->expr()->gte( + 'DATE_DIFF(:calc_date, person.birthdate)/365', ':min_age' ), - $qb->expr()->lte('DATE_DIFF(:calc_date, person.birthdate)/365', + $qb->expr()->lte( + 'DATE_DIFF(:calc_date, person.birthdate)/365', ':max_age' ) ); diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php index e26e3697d..2ab482039 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php @@ -17,7 +17,6 @@ use Chill\MainBundle\Form\Type\ChillDateType; use Chill\PersonBundle\Export\Declarations; use DateTime; use Doctrine\ORM\Query\Expr; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Validator\Context\ExecutionContextInterface; class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface @@ -56,12 +55,12 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac { $builder->add('date_from', ChillDateType::class, [ 'label' => 'Born after this date', - 'data' => new DateTime() + 'data' => new DateTime(), ]); $builder->add('date_to', ChillDateType::class, [ 'label' => 'Born before this date', - 'data' => new DateTime() + 'data' => new DateTime(), ]); } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php index aaef76436..457378731 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php @@ -34,15 +34,15 @@ class DeadOrAliveFilter implements FilterInterface $personState = $data['person_state']; $calc = $data['date_calc']; - if ($personState == 'alive') { + if ('alive' === $personState) { $clause = $qb->expr()->orX( - $qb->expr()->andX( - $qb->expr()->isNull('person.deathdate'), - $qb->expr()->lte( + $qb->expr()->andX( + $qb->expr()->isNull('person.deathdate'), + $qb->expr()->lte( 'person.birthdate', ':date_calc' ) - ), + ), $qb->expr()->andX( $qb->expr()->isNotNull('person.deathdate'), $qb->expr()->gt( diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php index e1a6c7529..895f83e9d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Export\FilterInterface; -use Chill\PersonBundle\Entity\Household\HouseholdCompositionType; use Chill\PersonBundle\Export\Declarations; use DateTime; use Symfony\Component\Form\Extension\Core\Type\DateType; @@ -27,7 +26,6 @@ class FamilySituationFilter implements FilterInterface public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data) { - } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php index d8c0e1343..b2eef5285 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php @@ -36,24 +36,6 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface return null; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('thirdparty_cat', EntityType::class, [ - 'class' => ThirdPartyCategory::class, - 'label' => 'Category', - 'choice_label' => function (ThirdPartyCategory $tpc) { - return $this->translatableStringHelper->localize($tpc->getName()); - }, - 'multiple' => true, - 'expanded' => true - ]); - - $builder->add('date_calc', ChillDateType::class, [ - 'label' => 'Date during which residential address was valid', - 'data' => new DateTime('now'), - ]); - } - public function alterQuery(QueryBuilder $qb, $data) { $qb->resetDQLPart('from'); @@ -63,7 +45,7 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface $qb->join('person.center', 'center'); $qb->join('ra.hostThirdParty', 't'); $qb->join('t.categories', 'tc'); - + $where = $qb->getDQLPart('where'); $clause = $qb->expr()->andX( $qb->expr()->isNotNull('ra.hostThirdParty'), @@ -87,17 +69,34 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface return Declarations::PERSON_TYPE; } + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('thirdparty_cat', EntityType::class, [ + 'class' => ThirdPartyCategory::class, + 'label' => 'Category', + 'choice_label' => function (ThirdPartyCategory $tpc) { + return $this->translatableStringHelper->localize($tpc->getName()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + + $builder->add('date_calc', ChillDateType::class, [ + 'label' => 'Date during which residential address was valid', + 'data' => new DateTime('now'), + ]); + } public function describeAction($data, $format = 'string') { return ['Filtered by person\'s who have a residential address located at a thirdparty of type %thirdparty_type% and valid on %date_calc%', [ '%thirdparty_type%' => $this->translatableStringHelper->localize($data['thirdparty_cat'][0]->getName()), '%date_calc%' => $data['date_calc']->format('d-m-Y'), - ],]; + ]]; } public function getTitle() { return 'Filtered by person\'s who have a residential address located at a thirdparty of type'; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php index 835185db5..38825e022 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php @@ -13,7 +13,6 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; @@ -31,7 +30,7 @@ class ResidentialAddressAtUserFilter implements FilterInterface $qb->join('ra.person', 'person'); $qb->join('person.center', 'center'); - + $where = $qb->getDQLPart('where'); $clause = $qb->expr()->isNotNull('ra.hostPerson'); @@ -42,7 +41,6 @@ class ResidentialAddressAtUserFilter implements FilterInterface } $qb->add('where', $where); - } public function applyOn() @@ -64,4 +62,4 @@ class ResidentialAddressAtUserFilter implements FilterInterface { return 'Filtered by person\'s who have a residential address located at another user'; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index 80efd03e3..8986d4676 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -19,12 +19,10 @@ use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Security; use Symfony\Contracts\Translation\TranslatorInterface; class JobFilter implements FilterInterface { - protected TranslatorInterface $translator; private TranslatableStringHelper $translatableStringHelper; @@ -37,34 +35,6 @@ class JobFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('job', EntityType::class, [ - 'class' => UserJob::class, - 'choice_label' => function (UserJob $j) { - return $this->translatableStringHelper->localize( - $j->getLabel() - ); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - public function describeAction($data, $format = 'string') - { - $userjobs = []; - - foreach ($data['job'] as $j) { - $userjobs[] = $this->translatableStringHelper->localize( - $j->getLabel()); - } - - return ['Filtered by treating agent job: only %jobs%', [ - '%jobs%' => implode(', ou ', $userjobs) - ]]; - } - public function addRole() { return null; @@ -92,9 +62,37 @@ class JobFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('job', EntityType::class, [ + 'class' => UserJob::class, + 'choice_label' => function (UserJob $j) { + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string') + { + $userjobs = []; + + foreach ($data['job'] as $j) { + $userjobs[] = $this->translatableStringHelper->localize( + $j->getLabel() + ); + } + + return ['Filtered by treating agent job: only %jobs%', [ + '%jobs%' => implode(', ou ', $userjobs), + ]]; + } public function getTitle(): string { return 'Filter by treating agent job'; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php index 1ca1d39d2..efe193a6e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php @@ -1,5 +1,14 @@ userRender = $userRender; } - /** - * @inheritDoc - */ - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('accepted_agents', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, - 'multiple' => true, - 'expanded' => true - ]); - - } - - /** - * @inheritDoc - */ - public function getTitle(): string - { - return 'Filter by treating agent'; - } - - /** - * @inheritDoc - */ - public function describeAction($data, $format = 'string'): array - { - $users = []; - - foreach ($data['accepted_agents'] as $r) { - $users[] = $r; - } - - return [ - 'Filtered by treating agent: only %agents%', [ - '%agents' => implode(", ou ", $users) - ]]; - } - - /** - * @inheritDoc - */ public function addRole() { return null; } - /** - * @inheritDoc - */ public function alterQuery(QueryBuilder $qb, $data) { $qb->join('acpw.referrers', 'u'); @@ -90,11 +51,39 @@ class ReferrerFilter implements FilterInterface $qb->setParameter('agents', $data['accepted_agents']); } - /** - * @inheritDoc - */ public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } -} \ No newline at end of file + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_agents', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_agents'] as $r) { + $users[] = $r; + } + + return [ + 'Filtered by treating agent: only %agents%', [ + '%agents' => implode(', ou ', $users), + ], ]; + } + + public function getTitle(): string + { + return 'Filter by treating agent'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index 6588efc18..b828a6c47 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -23,7 +23,6 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ScopeFilter implements FilterInterface { - protected TranslatorInterface $translator; private TranslatableStringHelper $translatableStringHelper; @@ -36,34 +35,6 @@ class ScopeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - $builder->add('scope', EntityType::class, [ - 'class' => Scope::class, - 'choice_label' => function (Scope $s) { - return $this->translatableStringHelper->localize( - $s->getName() - ); - }, - 'multiple' => true, - 'expanded' => true - ]); - } - - public function describeAction($data, $format = 'string') - { - $scopes = []; - - foreach ($data['scope'] as $s) { - $scopes[] = $this->translatableStringHelper->localize( - $s->getName()); - } - - return ['Filtered by treating agent scope: only %scopes%', [ - '%scopes%' => implode(', ou ', $scopes) - ]]; - } - public function addRole() { return null; @@ -91,9 +62,37 @@ class ScopeFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('scope', EntityType::class, [ + 'class' => Scope::class, + 'choice_label' => function (Scope $s) { + return $this->translatableStringHelper->localize( + $s->getName() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string') + { + $scopes = []; + + foreach ($data['scope'] as $s) { + $scopes[] = $this->translatableStringHelper->localize( + $s->getName() + ); + } + + return ['Filtered by treating agent scope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes), + ]]; + } public function getTitle() { return 'Filter by treating agent scope'; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php index efd8c93af..348e1e9b8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php @@ -1,24 +1,27 @@ socialActionRender = $socialActionRender; $this->translatableStringHelper = $translatableStringHelper; $this->socialActionRepository = $socialActionRepository; } - public function buildForm(FormBuilderInterface $builder) - { - $socialActions = $this->socialActionRepository->findAll(); - - $builder->add('actionType', ChoiceType::class, [ - 'choices' => $socialActions, - 'choice_label' => function (SocialAction $sa) { - return $this->socialActionRender->renderString($sa, []); - }, - 'multiple' => true, - 'expanded' => true - ]); - - $refreshGoals = function (FormInterface $form, SocialAction $actionType = null) { - - $goals = null === $actionType ? [] : $actionType->getGoals(); - - $form->add('goal', ChoiceType::class, [ - 'placeholder' => '', - 'choices' => $goals, - 'choice_label' => function (Goal $g) { - return $this->translatableStringHelper->localize($g->getTitle()); - }, - ]); - }; - - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($refreshGoals) { - $data = $event->getData(); - dump($data); - - $refreshGoals($event->getForm(), $data); - }); - -/* $builder->get('actionType')->addEventListener( - FormEvents::POST_SUBMIT, - function (FormEvent $event) use ($refreshGoals) { - $actionType = $event->getForm()->getData(); - dump($actionType); - $refreshGoals($event->getForm()->getParent(), $actionType); - } - );*/ - } - - public function getTitle(): string - { - return 'Filter by type of action, objectives and results'; - } - - public function describeAction($data, $format = 'string'): array - { - $actionTypes = []; - $objectives = []; - $results = []; - - foreach ($data['actionType'] as $at) { - $actionTypes[] = $at->getTitle(); - } - foreach ($data['objectives'] as $o) { - $objectives[] = $o->getTitle(); - } - foreach ($data['results'] as $r) { - $results[] = $r->getTitle(); - } - - return ['Filtered by referrers: only %actionTypes%', [ - '%actionTypes%' => implode(', ou ', $actionTypes) - ]]; - } - public function addRole() { return null; @@ -136,4 +68,74 @@ class SocialWorkTypeFilter implements FilterInterface { return Declarations::SOCIAL_WORK_ACTION_TYPE; } + + public function buildForm(FormBuilderInterface $builder) + { + $socialActions = $this->socialActionRepository->findAll(); + + $builder->add('actionType', ChoiceType::class, [ + 'choices' => $socialActions, + 'choice_label' => function (SocialAction $sa) { + return $this->socialActionRender->renderString($sa, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + + $refreshGoals = function (FormInterface $form, ?SocialAction $actionType = null) { + $goals = null === $actionType ? [] : $actionType->getGoals(); + + $form->add('goal', ChoiceType::class, [ + 'placeholder' => '', + 'choices' => $goals, + 'choice_label' => function (Goal $g) { + return $this->translatableStringHelper->localize($g->getTitle()); + }, + ]); + }; + + $builder->addEventListener(FormEvents::PRE_SUBMIT, static function (FormEvent $event) use ($refreshGoals) { + $data = $event->getData(); + dump($data); + + $refreshGoals($event->getForm(), $data); + }); + + /* $builder->get('actionType')->addEventListener( + FormEvents::POST_SUBMIT, + function (FormEvent $event) use ($refreshGoals) { + $actionType = $event->getForm()->getData(); + dump($actionType); + $refreshGoals($event->getForm()->getParent(), $actionType); + } + );*/ + } + + public function describeAction($data, $format = 'string'): array + { + $actionTypes = []; + $objectives = []; + $results = []; + + foreach ($data['actionType'] as $at) { + $actionTypes[] = $at->getTitle(); + } + + foreach ($data['objectives'] as $o) { + $objectives[] = $o->getTitle(); + } + + foreach ($data['results'] as $r) { + $results[] = $r->getTitle(); + } + + return ['Filtered by referrers: only %actionTypes%', [ + '%actionTypes%' => implode(', ou ', $actionTypes), + ]]; + } + + public function getTitle(): string + { + return 'Filter by type of action, objectives and results'; + } } diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php index f5d26da7f..ad95c9f7a 100644 --- a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php +++ b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php @@ -15,7 +15,6 @@ use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\PersonBundle\Entity\Household\HouseholdCompositionType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -36,4 +35,4 @@ class HouseholdCompositionTypeType extends AbstractType $resolver ->setDefault('class', HouseholdCompositionType::class); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php index c2826485e..8a9fd42cd 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php @@ -35,11 +35,6 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository $this->repository = $entityManager->getRepository(AccompanyingPeriodWork::class); } - public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder - { - return $this->repository->createQueryBuilder($alias, $indexBy); - } - public function countByAccompanyingPeriod(AccompanyingPeriod $period): int { return $this->repository->countByAccompanyingPeriod($period); @@ -61,6 +56,11 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository ->select('count(w)')->getQuery()->getSingleScalarResult(); } + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder + { + return $this->repository->createQueryBuilder($alias, $indexBy); + } + public function find($id): ?AccompanyingPeriodWork { return $this->repository->find($id); diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php index 309e5f086..144cea507 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php @@ -31,11 +31,6 @@ final class PersonRepository implements ObjectRepository $this->repository = $entityManager->getRepository(Person::class); } - public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder - { - return $this->repository->createQueryBuilder($alias, $indexBy); - } - /** * @param $centers * @@ -56,6 +51,11 @@ final class PersonRepository implements ObjectRepository return $qb->getQuery()->getSingleScalarResult(); } + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder + { + return $this->repository->createQueryBuilder($alias, $indexBy); + } + public function find($id, $lockMode = null, $lockVersion = null): ?Person { return $this->repository->find($id, $lockMode, $lockVersion); diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php index 2144db5a3..8da2036d7 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php @@ -41,9 +41,9 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH ]; /** - * Give the ability to see statistics + * Give the ability to see all confidential courses. */ - public const STATS = 'CHILL_PERSON_ACCOMPANYING_PERIOD_STATS'; + public const CONFIDENTIAL_CRUD = 'CHILL_PERSON_ACCOMPANYING_PERIOD_CRUD_CONFIDENTIAL'; public const CREATE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE'; @@ -88,6 +88,11 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH */ public const SEE_DETAILS = 'CHILL_PERSON_ACCOMPANYING_PERIOD_SEE_DETAILS'; + /** + * Give the ability to see statistics. + */ + public const STATS = 'CHILL_PERSON_ACCOMPANYING_PERIOD_STATS'; + /** * Right to toggle confidentiality. */ @@ -95,11 +100,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH public const TOGGLE_CONFIDENTIAL_ALL = 'CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_CONFIDENTIAL_ALL'; - /** - * Give the ability to see all confidential courses. - */ - public const CONFIDENTIAL_CRUD = 'CHILL_PERSON_ACCOMPANYING_PERIOD_CRUD_CONFIDENTIAL'; - /** * Right to toggle urgency of parcours. */ @@ -218,7 +218,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH return $token->getUser() === $subject->getUser(); } - } return $this->voterHelper->voteOnAttribute($attribute, $subject, $token); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php index d6fa9a843..6ce9827f3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php @@ -1,11 +1,24 @@ export = self::$container->get('chill.person.export.count_accompanyingcourse'); } - /** - * @inheritDoc - */ public function getExport() { return $this->export; } - /** - * @inheritDoc - */ public function getFormData(): array { return [[]]; } - /** - * @inheritDoc - */ public function getModifiersCombination() { return [[Declarations::ACP_TYPE]]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php index d904f2eeb..6fd26ff74 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php @@ -1,11 +1,23 @@ export = self::$container->get('chill.person.export.count_social_work_actions'); } - /** - * @inheritDoc - */ public function getExport() { return $this->export; } - /** - * @inheritDoc - */ public function getFormData(): array { return [[]]; } - /** - * @inheritDoc - */ public function getModifiersCombination() { return [[Declarations::SOCIAL_WORK_ACTION_TYPE]]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php index 7c1420c86..543c938f2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php @@ -1,11 +1,25 @@ \DateTime::createFromFormat('Y-m-d', '2022-06-30')], + ['closingdate' => DateTime::createFromFormat('Y-m-d', '2022-06-30')], ]; } @@ -33,4 +47,4 @@ final class StatAccompanyingCourseDurationTest extends AbstractExportTest { return [[Declarations::ACP_TYPE]]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOnDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOnDateFilterTest.php index b66de0f28..81c132f7c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOnDateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOnDateFilterTest.php @@ -1,13 +1,27 @@ filter = self::$container->get('chill.person.export.filter_activeondate'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ [ - 'on_date' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'), + 'on_date' => DateTime::createFromFormat('Y-m-d', '2022-05-01'), ], ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -62,4 +67,4 @@ class ActiveOnDateFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOneDayBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOneDayBetweenDatesFilterTest.php index 051db8635..ab173d0b1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOneDayBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActiveOneDayBetweenDatesFilterTest.php @@ -1,13 +1,27 @@ filter = self::$container->get('chill.person.export.filter_activeonedaybetweendates'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ [ - 'date_from' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'), - 'date_to' => \DateTime::createFromFormat('Y-m-d', '2022-06-01'), + 'date_from' => DateTime::createFromFormat('Y-m-d', '2022-05-01'), + 'date_to' => DateTime::createFromFormat('Y-m-d', '2022-06-01'), ], ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -63,4 +68,4 @@ class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActivityTypeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActivityTypeFilterTest.php index 315592ee9..f59039f35 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActivityTypeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ActivityTypeFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_activitytype'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { - $em = self::$container->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() @@ -50,16 +56,13 @@ class ActivityTypeFilterTest extends AbstractFilterTest $data = []; - foreach($array as $t) { + foreach ($array as $t) { $data[] = ['accepted_activitytypes' => $t]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -74,4 +77,4 @@ class ActivityTypeFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AdministrativeLocationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AdministrativeLocationFilterTest.php index f974919aa..190729161 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AdministrativeLocationFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AdministrativeLocationFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_administrative_location'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -49,16 +56,13 @@ class AdministrativeLocationFilterTest extends AbstractFilterTest $data = []; - foreach($array as $l) { + foreach ($array as $l) { $data[] = ['accepted_locations' => $l]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -73,4 +77,4 @@ class AdministrativeLocationFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ClosingMotiveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ClosingMotiveFilterTest.php index cbfa1c306..d9403506d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ClosingMotiveFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ClosingMotiveFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_closingmotive'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -47,19 +54,15 @@ class ClosingMotiveFilterTest extends AbstractFilterTest $data = []; - foreach($array as $m) { + foreach ($array as $m) { $data[] = ['accepted_closingmotives' => $m]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -72,4 +75,4 @@ class ClosingMotiveFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ConfidentialFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ConfidentialFilterTest.php index 1d8573916..6229989fe 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ConfidentialFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ConfidentialFilterTest.php @@ -1,12 +1,25 @@ filter = self::$container->get('chill.person.export.filter_confidential'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ ['accepted_confidentials' => true], - ['accepted_confidentials' => false] + ['accepted_confidentials' => false], ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -60,4 +63,4 @@ class ConfidentialFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EmergencyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EmergencyFilterTest.php index 0533a604a..7ed43ea65 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EmergencyFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EmergencyFilterTest.php @@ -1,12 +1,25 @@ true], - ['accepted_emergencies' => false] + ['accepted_emergencies' => false], ]; } public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -51,4 +63,4 @@ class EmergencyFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilterTest.php index 310fde2c9..a4e39792c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_evaluation'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -49,16 +56,13 @@ class EvaluationFilterTest extends AbstractFilterTest $data = []; - foreach($array as $e) { + foreach ($array as $e) { $data[] = ['accepted_evaluations' => $e]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -73,4 +77,4 @@ class EvaluationFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GeographicalUnitStatFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GeographicalUnitStatFilterTest.php index 8a205e9ac..a2eef9038 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GeographicalUnitStatFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GeographicalUnitStatFilterTest.php @@ -1,13 +1,27 @@ filter = self::$container->get('chill.person.export.filter_geographicalunitstat'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ [ - 'date' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'), - 'accepted_loctype' => 'center' + 'date' => DateTime::createFromFormat('Y-m-d', '2022-05-01'), + 'accepted_loctype' => 'center', ], ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -63,4 +68,4 @@ class GeographicalUnitStatFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/IntensityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/IntensityFilterTest.php index c39602cf8..65d2c6880 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/IntensityFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/IntensityFilterTest.php @@ -1,12 +1,25 @@ filter = self::$container->get('chill.person.export.filter_intensity'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ ['accepted_intensities' => 'occasional'], - ['accepted_intensities' => 'regular'] + ['accepted_intensities' => 'regular'], ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -60,4 +63,4 @@ class IntensityFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/JobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/JobFilterTest.php index 6f7546b4b..9a9bb2498 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/JobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/JobFilterTest.php @@ -1,12 +1,24 @@ filter = self::$container->get('chill.person.export.filter_job'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return []; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -57,4 +59,4 @@ class JobFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriodWork', 'acpw'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OpenBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OpenBetweenDatesFilterTest.php index ccb7e38da..5e4ae3d0a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OpenBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OpenBetweenDatesFilterTest.php @@ -1,13 +1,27 @@ filter = self::$container->get('chill.person.export.filter_openbetweendates'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ [ - 'date_from' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'), - 'date_to' => \DateTime::createFromFormat('Y-m-d', '2022-06-01'), + 'date_from' => DateTime::createFromFormat('Y-m-d', '2022-05-01'), + 'date_to' => DateTime::createFromFormat('Y-m-d', '2022-06-01'), ], ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -63,4 +68,4 @@ class OpenBetweenDatesFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OriginFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OriginFilterTest.php index 7aa1f1c7a..f37cebc72 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OriginFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/OriginFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_origin'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -47,19 +54,15 @@ class OriginFilterTest extends AbstractFilterTest $data = []; - foreach($array as $l) { + foreach ($array as $l) { $data[] = ['accepted_origins' => $l]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -72,4 +75,4 @@ class OriginFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ReferrerFilterTest.php index ec84c7027..84340e267 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ReferrerFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ReferrerFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_referrer'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -48,16 +55,13 @@ class ReferrerFilterTest extends AbstractFilterTest $data = []; - foreach($array as $u) { + foreach ($array as $u) { $data[] = ['accepted_referrers' => $u]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -79,4 +83,4 @@ class ReferrerFilterTest extends AbstractFilterTest ->select('r.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/RequestorFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/RequestorFilterTest.php index f8b01aea1..50dcb20f5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/RequestorFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/RequestorFilterTest.php @@ -1,14 +1,26 @@ filter = self::$container->get('chill.person.export.filter_requestor'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ @@ -47,9 +53,6 @@ class RequestorFilterTest extends AbstractFilterTest ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -64,4 +67,4 @@ class RequestorFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ScopeFilterTest.php index d387769cc..1269f0372 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ScopeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/ScopeFilterTest.php @@ -1,12 +1,24 @@ getLocale()->willReturn('fr'); $this->filter = self::$container->get('chill.person.export.filter_scope'); - } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return []; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -58,4 +59,4 @@ class ScopeFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriodWork', 'acpw'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialActionFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialActionFilterTest.php index 6de54c23a..c7834a33a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialActionFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialActionFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_socialaction'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -49,16 +56,13 @@ class SocialActionFilterTest extends AbstractFilterTest $data = []; - foreach($array as $a) { + foreach ($array as $a) { $data[] = ['accepted_socialactions' => $a]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { if (null === self::$kernel) { @@ -73,4 +77,4 @@ class SocialActionFilterTest extends AbstractFilterTest ->select('acp.id'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialIssueFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialIssueFilterTest.php index ac092884b..16e77381f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialIssueFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialIssueFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get('chill.person.export.filter_socialissue'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { $em = self::$container->get(EntityManagerInterface::class); @@ -47,19 +54,15 @@ class SocialIssueFilterTest extends AbstractFilterTest $data = []; - foreach($array as $i) { + foreach ($array as $i) { $data[] = ['accepted_socialissues' => $i]; } return $data; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -72,4 +75,4 @@ class SocialIssueFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/StepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/StepFilterTest.php index 1a8dfd2ff..ac75b2123 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/StepFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/StepFilterTest.php @@ -1,12 +1,25 @@ filter = self::$container->get('chill.person.export.filter_step'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return [ @@ -43,12 +50,8 @@ class StepFilterTest extends AbstractFilterTest ]; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -61,4 +64,4 @@ class StepFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserJobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserJobFilterTest.php index 452728384..3c91c8efa 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserJobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserJobFilterTest.php @@ -1,12 +1,25 @@ filter = self::$container->get('chill.person.export.filter_userjob'); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return []; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -57,4 +60,4 @@ class UserJobFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserScopeFilterTest.php index fd22ded6e..72d5eaf57 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserScopeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/UserScopeFilterTest.php @@ -1,12 +1,25 @@ getLocale()->willReturn('fr'); $this->filter = self::$container->get('chill.person.export.filter_userscope'); - } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData(): array { return []; } - /** - * @inheritDoc - */ public function getQueryBuilders(): array { - if (null === self::$kernel) { self::bootKernel(); } @@ -58,4 +60,4 @@ class UserScopeFilterTest extends AbstractFilterTest ->from('ChillPersonBundle:AccompanyingPeriod', 'acp'), ]; } -} \ No newline at end of file +} From 63137c67f42b7ddf680ee763a633e03c070dad27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 5 Oct 2022 16:55:13 +0200 Subject: [PATCH 05/13] fix cs --- .../ChillActivityBundle.php | 7 +++--- .../Controller/ActivityController.php | 7 +++--- .../ActivityReasonCategoryController.php | 7 +++--- .../Controller/ActivityReasonController.php | 7 +++--- .../AdminActivityPresenceController.php | 7 +++--- .../AdminActivityTypeCategoryController.php | 7 +++--- .../AdminActivityTypeController.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../DataFixtures/ORM/LoadActivity.php | 7 +++--- .../ORM/LoadActivityNotifications.php | 7 +++--- .../DataFixtures/ORM/LoadActivityReason.php | 7 +++--- .../ORM/LoadActivityReasonCategory.php | 7 +++--- .../DataFixtures/ORM/LoadActivityType.php | 7 +++--- .../ORM/LoadActivityTypeCategory.php | 7 +++--- .../DataFixtures/ORM/LoadActivitytACL.php | 7 +++--- .../ChillActivityExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../ChillActivityBundle/Entity/Activity.php | 7 +++--- .../Entity/ActivityPresence.php | 7 +++--- .../Entity/ActivityReason.php | 7 +++--- .../Entity/ActivityReasonCategory.php | 7 +++--- .../Entity/ActivityType.php | 7 +++--- .../Entity/ActivityTypeCategory.php | 7 +++--- .../EntityListener/ActivityEntityListener.php | 7 +++--- .../BySocialActionAggregator.php | 7 +++--- .../BySocialIssueAggregator.php | 7 +++--- .../ACPAggregators/ByThirdpartyAggregator.php | 7 +++--- .../ACPAggregators/ByUserAggregator.php | 7 +++--- .../ACPAggregators/DateAggregator.php | 7 +++--- .../ACPAggregators/LocationTypeAggregator.php | 7 +++--- .../ACPAggregators/UserScopeAggregator.php | 7 +++--- .../Aggregator/ActivityTypeAggregator.php | 7 +++--- .../Aggregator/ActivityUserAggregator.php | 7 +++--- .../ActivityReasonAggregator.php | 7 +++--- .../Export/Declarations.php | 7 +++--- .../LinkedToACP/AvgActivityDuration.php | 7 +++--- .../LinkedToACP/AvgActivityVisitDuration.php | 7 +++--- .../Export/LinkedToACP/CountActivity.php | 7 +++--- .../LinkedToACP/SumActivityDuration.php | 7 +++--- .../LinkedToACP/SumActivityVisitDuration.php | 7 +++--- .../Export/LinkedToPerson/CountActivity.php | 7 +++--- .../Export/LinkedToPerson/ListActivity.php | 7 +++--- .../LinkedToPerson/StatActivityDuration.php | 7 +++--- .../ACPFilters/BySocialActionFilter.php | 7 +++--- .../Filter/ACPFilters/BySocialIssueFilter.php | 7 +++--- .../Export/Filter/ACPFilters/ByUserFilter.php | 7 +++--- .../Filter/ACPFilters/EmergencyFilter.php | 7 +++--- .../Filter/ACPFilters/LocationTypeFilter.php | 7 +++--- .../Filter/ACPFilters/SentReceivedFilter.php | 7 +++--- .../Export/Filter/ACPFilters/UserFilter.php | 7 +++--- .../Filter/ACPFilters/UserScopeFilter.php | 7 +++--- .../Export/Filter/ActivityDateFilter.php | 7 +++--- .../Export/Filter/ActivityTypeFilter.php | 7 +++--- .../PersonFilters/ActivityReasonFilter.php | 7 +++--- .../PersonHavingActivityBetweenDateFilter.php | 7 +++--- .../Form/ActivityPresenceType.php | 7 +++--- .../Form/ActivityReasonCategoryType.php | 7 +++--- .../Form/ActivityReasonType.php | 7 +++--- .../ChillActivityBundle/Form/ActivityType.php | 7 +++--- .../Form/ActivityTypeCategoryType.php | 7 +++--- .../Form/ActivityTypeType.php | 7 +++--- .../Form/Type/ActivityFieldPresence.php | 7 +++--- .../Form/Type/TranslatableActivityReason.php | 7 +++--- .../TranslatableActivityReasonCategory.php | 7 +++--- .../Form/Type/TranslatableActivityType.php | 7 +++--- .../Menu/AccompanyingCourseMenuBuilder.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../Menu/PersonMenuBuilder.php | 7 +++--- .../ActivityNotificationHandler.php | 7 +++--- .../Repository/ActivityACLAwareRepository.php | 7 +++--- .../ActivityACLAwareRepositoryInterface.php | 7 +++--- .../ActivityReasonCategoryRepository.php | 7 +++--- .../Repository/ActivityReasonRepository.php | 7 +++--- .../Repository/ActivityRepository.php | 7 +++--- .../ActivityTypeCategoryRepository.php | 7 +++--- .../Repository/ActivityTypeRepository.php | 7 +++--- .../Authorization/ActivityStatsVoter.php | 7 +++--- .../Security/Authorization/ActivityVoter.php | 7 +++--- .../Service/DocGenerator/ActivityContext.php | 7 +++--- ...tActivitiesByAccompanyingPeriodContext.php | 7 +++--- .../Entity/ActivityReasonRender.php | 7 +++--- .../Test/PrepareActivityTrait.php | 7 +++--- .../Controller/ActivityControllerTest.php | 7 +++--- .../ActivityReasonCategoryControllerTest.php | 7 +++--- .../ActivityReasonControllerTest.php | 7 +++--- .../Controller/ActivityTypeControllerTest.php | 7 +++--- .../Tests/Entity/ActivityTest.php | 7 +++--- .../ActivityReasonAggregatorTest.php | 7 +++--- .../Aggregator/ActivityTypeAggregatorTest.php | 7 +++--- .../Aggregator/ActivityUserAggregatorTest.php | 7 +++--- .../Tests/Export/Export/CountActivityTest.php | 7 +++--- .../Tests/Export/Export/ListActivityTest.php | 7 +++--- .../Export/StatActivityDurationSumTest.php | 7 +++--- .../Filter/ActivityReasonFilterTest.php | 7 +++--- ...sonHavingActivityBetweenDateFilterTest.php | 7 +++--- .../Tests/Form/ActivityTypeTest.php | 7 +++--- .../Type/TranslatableActivityReasonTest.php | 7 +++--- .../Type/TranslatableActivityTypeTest.php | 7 +++--- .../Authorization/ActivityVoterTest.php | 7 +++--- .../Tests/Timeline/TimelineProviderTest.php | 7 +++--- .../Timeline/TimelineActivityProvider.php | 7 +++--- .../Constraints/ActivityValidity.php | 7 +++--- .../Constraints/ActivityValidityValidator.php | 7 +++--- .../migrations/Version20150701091248.php | 7 +++--- .../migrations/Version20150702093317.php | 7 +++--- .../migrations/Version20150704091347.php | 7 +++--- .../migrations/Version20160222103457.php | 7 +++--- .../migrations/Version20161114085659.php | 7 +++--- .../migrations/Version20210304154629.php | 7 +++--- .../migrations/Version20210311114250.php | 7 +++--- .../migrations/Version20210401090853.php | 7 +++--- .../migrations/Version20210408122329.php | 7 +++--- .../migrations/Version20210415113216.php | 7 +++--- .../migrations/Version20210422073711.php | 7 +++--- .../migrations/Version20210422123846.php | 7 +++--- .../migrations/Version20210506071150.php | 7 +++--- .../migrations/Version20210506090417.php | 7 +++--- .../migrations/Version20210506094520.php | 7 +++--- .../migrations/Version20210506112500.php | 7 +++--- .../migrations/Version20210520095626.php | 7 +++--- .../migrations/Version20210528161250.php | 7 +++--- .../migrations/Version20210602103243.php | 7 +++--- .../migrations/Version20211119173555.php | 7 +++--- .../migrations/Version20211207152023.php | 7 +++--- .../migrations/Version20220425133027.php | 7 +++--- .../migrations/Version20220527124438.php | 7 +++--- .../src/ChillAsideActivityBundle.php | 7 +++--- .../src/Controller/AdminController.php | 7 +++--- .../AsideActivityCategoryController.php | 7 +++--- .../Controller/AsideActivityController.php | 7 +++--- .../DataFixtures/ORM/LoadAsideActivity.php | 7 +++--- .../ORM/LoadAsideActivityCategory.php | 7 +++--- .../ChillAsideActivityExtension.php | 7 +++--- .../src/DependencyInjection/Configuration.php | 7 +++--- .../src/Entity/AsideActivity.php | 7 +++--- .../src/Entity/AsideActivityCategory.php | 7 +++--- .../src/Form/AsideActivityCategoryType.php | 7 +++--- .../src/Form/AsideActivityFormType.php | 7 +++--- .../src/Menu/AdminMenuBuilder.php | 7 +++--- .../src/Menu/SectionMenuBuilder.php | 7 +++--- .../src/Menu/UserMenuBuilder.php | 7 +++--- .../AsideActivityCategoryRepository.php | 7 +++--- .../Repository/AsideActivityRepository.php | 7 +++--- .../src/Templating/Entity/CategoryRender.php | 7 +++--- .../AsideActivityControllerTest.php | 7 +++--- .../src/migrations/Version20210706124644.php | 7 +++--- .../src/migrations/Version20210804082249.php | 7 +++--- .../src/migrations/Version20210806140343.php | 7 +++--- .../src/migrations/Version20210806140710.php | 7 +++--- .../src/migrations/Version20210810084456.php | 7 +++--- .../src/migrations/Version20210922182907.php | 7 +++--- .../src/migrations/Version20211004134012.php | 7 +++--- .../Calculator/CalculatorInterface.php | 7 +++--- .../Calculator/CalculatorManager.php | 7 +++--- .../Calculator/CalculatorResult.php | 7 +++--- .../ChillBudgetBundle/ChillBudgetBundle.php | 7 +++--- .../Config/ConfigRepository.php | 7 +++--- .../Controller/AbstractElementController.php | 7 +++--- .../Controller/ChargeController.php | 7 +++--- .../Controller/ElementController.php | 7 +++--- .../Controller/ResourceController.php | 7 +++--- .../ChillBudgetExtension.php | 7 +++--- .../Compiler/CalculatorCompilerPass.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../Entity/AbstractElement.php | 7 +++--- .../ChillBudgetBundle/Entity/Charge.php | 7 +++--- .../ChillBudgetBundle/Entity/Resource.php | 7 +++--- .../ChillBudgetBundle/Form/ChargeType.php | 7 +++--- .../ChillBudgetBundle/Form/ResourceType.php | 7 +++--- .../Menu/HouseholdMenuBuilder.php | 7 +++--- .../Menu/PersonMenuBuilder.php | 7 +++--- .../Repository/ChargeRepository.php | 7 +++--- .../Repository/ResourceRepository.php | 7 +++--- .../Authorization/BudgetElementVoter.php | 7 +++--- .../Service/Summary/SummaryBudget.php | 7 +++--- .../Summary/SummaryBudgetInterface.php | 7 +++--- .../ChillBudgetBundle/Templating/Twig.php | 7 +++--- .../Controller/ElementControllerTest.php | 7 +++--- .../migrations/Version20180522080432.php | 7 +++--- .../migrations/Version20181219145631.php | 7 +++--- .../migrations/Version20220224090319.php | 7 +++--- .../ChillCalendarBundle.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../Controller/CalendarAPIController.php | 7 +++--- .../Controller/CalendarController.php | 7 +++--- .../Controller/CalendarRangeAPIController.php | 7 +++--- .../Controller/CancelReasonController.php | 7 +++--- .../DataFixtures/ORM/LoadCalendarRange.php | 7 +++--- .../DataFixtures/ORM/LoadCancelReason.php | 7 +++--- .../DataFixtures/ORM/LoadInvite.php | 7 +++--- .../ChillCalendarExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../ChillCalendarBundle/Entity/Calendar.php | 7 +++--- .../Entity/CalendarRange.php | 7 +++--- .../Entity/CancelReason.php | 7 +++--- .../ChillCalendarBundle/Entity/Invite.php | 7 +++--- .../Event/ListenToActivityCreate.php | 7 +++--- .../Export/Aggregator/AgentAggregator.php | 7 +++--- .../Aggregator/CancelReasonAggregator.php | 7 +++--- .../Export/Aggregator/JobAggregator.php | 7 +++--- .../Export/Aggregator/LocationAggregator.php | 7 +++--- .../Aggregator/LocationTypeAggregator.php | 7 +++--- .../Export/Aggregator/MonthYearAggregator.php | 7 +++--- .../Export/Aggregator/ScopeAggregator.php | 7 +++--- .../Export/Declarations.php | 7 +++--- .../Export/Export/CountAppointments.php | 7 +++--- .../Export/StatAppointmentAvgDuration.php | 7 +++--- .../Export/StatAppointmentSumDuration.php | 7 +++--- .../Export/Filter/AgentFilter.php | 7 +++--- .../Export/Filter/BetweenDatesFilter.php | 7 +++--- .../Export/Filter/JobFilter.php | 7 +++--- .../Export/Filter/ScopeFilter.php | 7 +++--- .../ChillCalendarBundle/Form/CalendarType.php | 7 +++--- .../Form/CancelReasonType.php | 7 +++--- .../Menu/AccompanyingCourseMenuBuilder.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../Menu/UserMenuBuilder.php | 7 +++--- .../Repository/CalendarRangeRepository.php | 7 +++--- .../Repository/CalendarRepository.php | 7 +++--- .../Repository/CancelReasonRepository.php | 7 +++--- .../Repository/InviteRepository.php | 7 +++--- .../Controller/CalendarControllerTest.php | 7 +++--- .../migrations/Version20210715141731.php | 7 +++--- .../migrations/Version20210723074557.php | 7 +++--- .../migrations/Version20210723142003.php | 7 +++--- .../migrations/Version20210723142842.php | 7 +++--- .../migrations/Version20211119173557.php | 7 +++--- .../migrations/Version20220527124558.php | 7 +++--- .../migrations/Version20220527234046.php | 7 +++--- .../ChillCustomFieldsBundle.php | 7 +++--- .../Command/CreateFieldsOnGroupCommand.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../Controller/CustomFieldController.php | 7 +++--- .../CustomFieldsGroupController.php | 7 +++--- .../CustomFields/AbstractCustomField.php | 7 +++--- .../CustomFields/CustomFieldChoice.php | 7 +++--- .../CustomFields/CustomFieldDate.php | 7 +++--- .../CustomFields/CustomFieldInterface.php | 7 +++--- .../CustomFields/CustomFieldLongChoice.php | 7 +++--- .../CustomFields/CustomFieldNumber.php | 7 +++--- .../CustomFields/CustomFieldText.php | 7 +++--- .../CustomFields/CustomFieldTitle.php | 7 +++--- .../DataFixtures/ORM/LoadOption.php | 7 +++--- .../ChillCustomFieldsExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../CustomFieldCompilerPass.php | 7 +++--- .../Entity/CustomField.php | 7 +++--- .../Entity/CustomFieldLongChoice/Option.php | 7 +++--- .../Entity/CustomFieldsDefaultGroup.php | 7 +++--- .../Entity/CustomFieldsGroup.php | 7 +++--- .../OptionRepository.php | 7 +++--- .../Form/CustomFieldType.php | 7 +++--- .../Form/CustomFieldsGroupType.php | 7 +++--- .../CustomFieldDataTransformer.php | 7 +++--- .../CustomFieldsGroupToIdTransformer.php | 7 +++--- .../JsonCustomFieldToArrayTransformer.php | 7 +++--- .../Form/Extension/PostTextExtension.php | 7 +++--- .../Extension/PostTextIntegerExtension.php | 7 +++--- .../Extension/PostTextNumberExtension.php | 7 +++--- .../Form/Type/ChoiceWithOtherType.php | 7 +++--- .../Form/Type/ChoicesListType.php | 7 +++--- .../Form/Type/ChoicesType.php | 7 +++--- .../Form/Type/CustomFieldType.php | 7 +++--- .../Form/Type/CustomFieldsTitleType.php | 7 +++--- .../Form/Type/LinkedCustomFieldsType.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../Service/CustomFieldProvider.php | 7 +++--- .../Service/CustomFieldsHelper.php | 7 +++--- .../Service/CustomFieldsHelperException.php | 7 +++--- .../Twig/CustomFieldRenderingTwig.php | 7 +++--- .../Twig/CustomFieldsGroupRenderingTwig.php | 7 +++--- .../ConfigCustomizablesEntitiesTest.php | 7 +++--- .../CustomFieldControllerTest_TODO.php | 7 +++--- .../CustomFieldsGroupControllerTest.php | 7 +++--- .../Tests/CustomFieldTestHelper.php | 7 +++--- .../CustomFields/CustomFieldsChoiceTest.php | 7 +++--- .../CustomFields/CustomFieldsNumberTest.php | 7 +++--- .../CustomFields/CustomFieldsTextTest.php | 7 +++--- .../PostTextIntegerExtensionTest.php | 7 +++--- .../Extension/PostTextNumberExtensionTest.php | 7 +++--- .../Tests/Routing/RoutingLoaderTest.php | 7 +++--- .../Tests/Service/CustomFieldsHelperTest.php | 7 +++--- .../Twig/CustomFieldRenderingTwigTest.php | 7 +++--- .../CustomFieldsGroupRenderingTwigTest.php | 7 +++--- .../migrations/Version20141128195430.php | 7 +++--- .../migrations/Version20150224164531.php | 7 +++--- .../migrations/Version20151210155904.php | 7 +++--- .../migrations/Version20151210205610.php | 7 +++--- .../ChillDocGeneratorBundle.php | 7 +++--- .../Context/ContextManager.php | 7 +++--- .../Context/ContextManagerInterface.php | 7 +++--- .../Context/DocGeneratorContextInterface.php | 7 +++--- ...GeneratorContextWithAdminFormInterface.php | 7 +++--- ...eneratorContextWithPublicFormInterface.php | 7 +++--- .../Exception/ContextNotFoundException.php | 7 +++--- .../Exception/UnexpectedTypeException.php | 7 +++--- .../AdminDocGeneratorTemplateController.php | 7 +++--- .../DocGeneratorTemplateController.php | 7 +++--- .../ORM/LoadDocGeneratorTemplate.php | 7 +++--- .../ChillDocGeneratorExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../Entity/DocGeneratorTemplate.php | 7 +++--- .../Form/DocGeneratorTemplateType.php | 7 +++--- .../GeneratorDriver/DriverInterface.php | 7 +++--- .../Exception/TemplateException.php | 7 +++--- .../GeneratorDriver/RelatorioDriver.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../DocGeneratorTemplateRepository.php | 7 +++--- .../Serializer/Encoder/DocGenEncoder.php | 7 +++--- .../Helper/NormalizeNullValueHelper.php | 7 +++--- .../Normalizer/CollectionDocGenNormalizer.php | 7 +++--- .../Normalizer/DocGenObjectNormalizer.php | 7 +++--- .../Service/Context/BaseContextData.php | 7 +++--- .../migrations/Version20210805162522.php | 7 +++--- .../migrations/Version20210812214310.php | 7 +++--- .../migrations/Version20211103111010.php | 7 +++--- .../migrations/Version20211119173556.php | 7 +++--- .../migrations/Version20211201191757.php | 7 +++--- .../Serializer/Encoder/DocGenEncoderTest.php | 7 +++--- .../Normalizer/DocGenObjectNormalizerTest.php | 7 +++--- .../Service/Context/BaseContextDataTest.php | 7 +++--- .../ChillDocStoreBundle.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../DocumentAccompanyingCourseController.php | 7 +++--- .../Controller/DocumentCategoryController.php | 7 +++--- .../Controller/DocumentPersonController.php | 7 +++--- .../DataFixtures/ORM/LoadDocumentACL.php | 7 +++--- .../DataFixtures/ORM/LoadDocumentCategory.php | 7 +++--- .../ChillDocStoreExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../Entity/AccompanyingCourseDocument.php | 7 +++--- .../ChillDocStoreBundle/Entity/Document.php | 7 +++--- .../Entity/DocumentCategory.php | 7 +++--- .../Entity/PersonDocument.php | 7 +++--- .../Entity/StoredObject.php | 7 +++--- .../AccompanyingCourseDocumentRepository.php | 7 +++--- .../StoredObjectManagerException.php | 7 +++--- .../Form/AccompanyingCourseDocumentType.php | 7 +++--- .../Form/DocumentCategoryType.php | 7 +++--- .../Form/PersonDocumentType.php | 7 +++--- .../Form/StoredObjectType.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../ChillDocStoreBundle/Menu/MenuBuilder.php | 7 +++--- .../Object/ObjectToAsyncFileTransformer.php | 7 +++--- .../Object/PersistenceChecker.php | 7 +++--- .../AccompanyingCourseDocumentRepository.php | 7 +++--- .../Repository/DocumentCategoryRepository.php | 7 +++--- .../PersonDocumentACLAwareRepository.php | 7 +++--- ...sonDocumentACLAwareRepositoryInterface.php | 7 +++--- .../Repository/StoredObjectRepository.php | 7 +++--- .../AccompanyingCourseDocumentVoter.php | 7 +++--- .../Authorization/PersonDocumentVoter.php | 7 +++--- .../Normalizer/StoredObjectDenormalizer.php | 7 +++--- .../Service/StoredObjectManager.php | 7 +++--- .../Service/StoredObjectManagerInterface.php | 7 +++--- .../Templating/WopiEditTwigExtension.php | 7 +++--- .../WopiEditTwigExtensionRuntime.php | 7 +++--- .../Tests/StoredObjectManagerTest.php | 7 +++--- ...ompanyingCourseDocumentWorkflowHandler.php | 7 +++--- .../migrations/Version20180605102533.php | 7 +++--- .../migrations/Version20180606133338.php | 7 +++--- .../migrations/Version20210903091534.php | 7 +++--- .../migrations/Version20210903123835.php | 7 +++--- .../migrations/Version20210928182542.php | 7 +++--- .../migrations/Version20211119173558.php | 7 +++--- .../migrations/Version20220131093117.php | 7 +++--- .../migrations/Version20220525141646.php | 7 +++--- .../ChillEventBundle/ChillEventBundle.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../Controller/EventController.php | 7 +++--- .../Controller/EventTypeController.php | 7 +++--- .../Controller/ParticipationController.php | 7 +++--- .../Controller/RoleController.php | 7 +++--- .../Controller/StatusController.php | 7 +++--- .../DataFixtures/ORM/LoadEventTypes.php | 7 +++--- .../DataFixtures/ORM/LoadParticipation.php | 7 +++--- .../DataFixtures/ORM/LoadRolesACL.php | 7 +++--- .../ChillEventExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- src/Bundle/ChillEventBundle/Entity/Event.php | 7 +++--- .../ChillEventBundle/Entity/EventType.php | 7 +++--- .../ChillEventBundle/Entity/Participation.php | 7 +++--- src/Bundle/ChillEventBundle/Entity/Role.php | 7 +++--- src/Bundle/ChillEventBundle/Entity/Status.php | 7 +++--- .../Form/ChoiceLoader/EventChoiceLoader.php | 7 +++--- .../ChillEventBundle/Form/EventType.php | 7 +++--- .../ChillEventBundle/Form/EventTypeType.php | 7 +++--- .../Form/ParticipationType.php | 7 +++--- src/Bundle/ChillEventBundle/Form/RoleType.php | 7 +++--- .../ChillEventBundle/Form/StatusType.php | 7 +++--- .../Form/Type/PickEventType.php | 7 +++--- .../Form/Type/PickEventTypeType.php | 7 +++--- .../Form/Type/PickRoleType.php | 7 +++--- .../Form/Type/PickStatusType.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../Menu/PersonMenuBuilder.php | 7 +++--- .../Repository/EventRepository.php | 7 +++--- .../Repository/ParticipationRepository.php | 7 +++--- .../ChillEventBundle/Search/EventSearch.php | 7 +++--- .../Security/Authorization/EventVoter.php | 7 +++--- .../Authorization/ParticipationVoter.php | 7 +++--- .../Tests/Controller/EventControllerTest.php | 7 +++--- .../Controller/EventTypeControllerTest.php | 7 +++--- .../ParticipationControllerTest.php | 7 +++--- .../Tests/Controller/RoleControllerTest.php | 7 +++--- .../Tests/Controller/StatusControllerTest.php | 7 +++--- .../Tests/Search/EventSearchTest.php | 7 +++--- .../Timeline/TimelineEventProvider.php | 7 +++--- .../migrations/Version20160318111334.php | 7 +++--- .../migrations/Version20190110140538.php | 7 +++--- .../migrations/Version20190115140042.php | 7 +++--- .../migrations/Version20190201143121.php | 7 +++--- .../ChillAMLIFamilyMembersBundle.php | 7 +++--- .../Config/ConfigRepository.php | 7 +++--- .../Controller/FamilyMemberController.php | 7 +++--- .../ChillAMLIFamilyMembersExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../Entity/AbstractFamilyMember.php | 7 +++--- .../Entity/FamilyMember.php | 7 +++--- .../Form/FamilyMemberType.php | 7 +++--- .../Form/FamilyMembersType.php | 7 +++--- .../Menu/UserMenuBuilder.php | 7 +++--- .../Repository/FamilyMemberRepository.php | 7 +++--- .../migrations/Version20180522142023.php | 7 +++--- .../Security/Voter/FamilyMemberVoter.php | 7 +++--- .../Templating/Twig.php | 7 +++--- .../Controller/FamilyMemberControllerTest.php | 7 +++--- .../CRUDControllerCompilerPass.php | 7 +++--- .../Controller/AbstractCRUDController.php | 7 +++--- .../CRUD/Controller/ApiController.php | 7 +++--- .../CRUD/Controller/CRUDController.php | 7 +++--- .../CRUD/Form/CRUDDeleteEntityForm.php | 7 +++--- .../CRUD/Resolver/Resolver.php | 7 +++--- .../CRUD/Routing/CRUDRoutesLoader.php | 7 +++--- .../CRUD/Templating/TwigCRUDResolver.php | 7 +++--- .../Center/GroupingCenterInterface.php | 7 +++--- .../ChillMainBundle/ChillMainBundle.php | 7 +++--- .../Command/ChillImportUsersCommand.php | 7 +++--- .../ChillUserSendRenewPasswordCodeCommand.php | 7 +++--- .../LoadAddressesBEFromBestAddressCommand.php | 7 +++--- .../LoadAddressesFRFromBANOCommand.php | 7 +++--- .../Command/LoadAndUpdateLanguagesCommand.php | 7 +++--- .../Command/LoadCountriesCommand.php | 7 +++--- .../Command/LoadPostalCodeFR.php | 7 +++--- .../Command/LoadPostalCodesCommand.php | 7 +++--- .../Command/SetPasswordCommand.php | 7 +++--- .../Controller/AddressApiController.php | 7 +++--- .../AddressReferenceAPIController.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../Controller/CenterController.php | 7 +++--- .../Controller/CivilityApiController.php | 7 +++--- .../Controller/CivilityController.php | 7 +++--- .../Controller/CountryController.php | 7 +++--- .../Controller/DefaultController.php | 7 +++--- .../Controller/ExportController.php | 7 +++--- .../Controller/LanguageController.php | 7 +++--- .../Controller/LocationApiController.php | 7 +++--- .../Controller/LocationController.php | 7 +++--- .../Controller/LocationTypeApiController.php | 7 +++--- .../Controller/LocationTypeController.php | 7 +++--- .../Controller/LoginController.php | 7 +++--- .../Controller/MenuController.php | 7 +++--- .../Controller/NotificationApiController.php | 7 +++--- .../Controller/NotificationController.php | 7 +++--- .../Controller/PasswordController.php | 7 +++--- .../Controller/PermissionApiController.php | 7 +++--- .../Controller/PermissionsGroupController.php | 7 +++--- .../Controller/PostalCodeAPIController.php | 7 +++--- .../Controller/PostalCodeController.php | 7 +++--- .../Controller/ScopeController.php | 7 +++--- .../Controller/SearchController.php | 7 +++--- .../Controller/TimelineCenterController.php | 7 +++--- .../Controller/UIController.php | 7 +++--- .../Controller/UserApiController.php | 7 +++--- .../Controller/UserController.php | 7 +++--- .../Controller/UserJobApiController.php | 7 +++--- .../Controller/UserJobController.php | 7 +++--- .../Controller/WorkflowApiController.php | 7 +++--- .../Controller/WorkflowController.php | 7 +++--- .../ORM/LoadAbstractNotificationsTrait.php | 7 +++--- .../ORM/LoadAddressReferences.php | 7 +++--- .../DataFixtures/ORM/LoadCenters.php | 7 +++--- .../DataFixtures/ORM/LoadCivility.php | 7 +++--- .../DataFixtures/ORM/LoadCountries.php | 7 +++--- .../DataFixtures/ORM/LoadGroupCenters.php | 7 +++--- .../DataFixtures/ORM/LoadLanguages.php | 7 +++--- .../DataFixtures/ORM/LoadLocationType.php | 7 +++--- .../DataFixtures/ORM/LoadPermissionsGroup.php | 7 +++--- .../DataFixtures/ORM/LoadPostalCodes.php | 7 +++--- .../DataFixtures/ORM/LoadRoleScopes.php | 7 +++--- .../DataFixtures/ORM/LoadScopes.php | 7 +++--- .../DataFixtures/ORM/LoadUsers.php | 7 +++--- .../ChillMainExtension.php | 7 +++--- .../CompilerPass/ACLFlagsCompilerPass.php | 7 +++--- .../CompilerPass/ExportsCompilerPass.php | 7 +++--- .../GroupingCenterCompilerPass.php | 7 +++--- .../CompilerPass/MenuCompilerPass.php | 7 +++--- .../NotificationCounterCompilerPass.php | 7 +++--- .../SearchableServicesCompilerPass.php | 7 +++--- .../CompilerPass/TimelineCompilerClass.php | 7 +++--- .../CompilerPass/WidgetsCompilerPass.php | 7 +++--- .../ConfigConsistencyCompilerPass.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../MissingBundleException.php | 7 +++--- .../RoleProvidersCompilerPass.php | 7 +++--- .../Widget/AbstractWidgetsCompilerPass.php | 7 +++--- .../Widget/AddWidgetConfigurationTrait.php | 7 +++--- .../Widget/Factory/AbstractWidgetFactory.php | 7 +++--- .../Widget/Factory/WidgetFactoryInterface.php | 7 +++--- .../HasWidgetFactoriesExtensionInterface.php | 7 +++--- .../ChillMainBundle/Doctrine/DQL/Extract.php | 7 +++--- .../Doctrine/DQL/GetJsonFieldByKey.php | 7 +++--- .../Doctrine/DQL/JsonAggregate.php | 7 +++--- .../Doctrine/DQL/JsonbArrayLength.php | 7 +++--- .../Doctrine/DQL/JsonbExistsInArray.php | 7 +++--- .../Doctrine/DQL/OverlapsI.php | 7 +++--- .../ChillMainBundle/Doctrine/DQL/Replace.php | 7 +++--- .../Doctrine/DQL/STContains.php | 7 +++--- .../Doctrine/DQL/Similarity.php | 7 +++--- .../Doctrine/DQL/StrictWordSimilarityOPS.php | 7 +++--- .../ChillMainBundle/Doctrine/DQL/ToChar.php | 7 +++--- .../ChillMainBundle/Doctrine/DQL/Unaccent.php | 7 +++--- .../Event/TrackCreateUpdateSubscriber.php | 7 +++--- .../Doctrine/Migrations/VersionComparator.php | 7 +++--- .../ChillMainBundle/Doctrine/Model/Point.php | 7 +++--- .../Doctrine/Model/PointException.php | 7 +++--- .../Doctrine/Model/TrackCreationInterface.php | 7 +++--- .../Doctrine/Model/TrackCreationTrait.php | 7 +++--- .../Doctrine/Model/TrackUpdateInterface.php | 7 +++--- .../Doctrine/Model/TrackUpdateTrait.php | 7 +++--- .../Hydration/FlatHierarchyEntityHydrator.php | 7 +++--- .../Doctrine/Type/NativeDateIntervalType.php | 7 +++--- .../Doctrine/Type/PointType.php | 7 +++--- src/Bundle/ChillMainBundle/Entity/Address.php | 7 +++--- .../Entity/AddressReference.php | 7 +++--- src/Bundle/ChillMainBundle/Entity/Center.php | 7 +++--- .../ChillMainBundle/Entity/Civility.php | 7 +++--- src/Bundle/ChillMainBundle/Entity/Country.php | 7 +++--- .../Entity/Embeddable/CommentEmbeddable.php | 7 +++--- .../Embeddable/PrivateCommentEmbeddable.php | 7 +++--- .../Entity/GeographicalUnit.php | 7 +++--- .../ChillMainBundle/Entity/GroupCenter.php | 7 +++--- .../Entity/HasCenterInterface.php | 7 +++--- .../Entity/HasCentersInterface.php | 7 +++--- .../Entity/HasScopeInterface.php | 7 +++--- .../Entity/HasScopesInterface.php | 7 +++--- .../ChillMainBundle/Entity/Language.php | 7 +++--- .../ChillMainBundle/Entity/Location.php | 7 +++--- .../ChillMainBundle/Entity/LocationType.php | 7 +++--- .../ChillMainBundle/Entity/Notification.php | 7 +++--- .../Entity/NotificationComment.php | 7 +++--- .../Entity/PermissionsGroup.php | 7 +++--- .../ChillMainBundle/Entity/PostalCode.php | 7 +++--- .../ChillMainBundle/Entity/RoleScope.php | 7 +++--- src/Bundle/ChillMainBundle/Entity/Scope.php | 7 +++--- src/Bundle/ChillMainBundle/Entity/User.php | 7 +++--- src/Bundle/ChillMainBundle/Entity/UserJob.php | 7 +++--- .../Entity/Workflow/EntityWorkflow.php | 7 +++--- .../Entity/Workflow/EntityWorkflowComment.php | 7 +++--- .../Entity/Workflow/EntityWorkflowStep.php | 7 +++--- .../Export/AggregatorInterface.php | 7 +++--- .../Export/DirectExportInterface.php | 7 +++--- .../Export/ExportElementInterface.php | 7 +++--- .../ExportElementValidatedInterface.php | 7 +++--- .../ExportElementsProviderInterface.php | 7 +++--- .../Export/ExportInterface.php | 7 +++--- .../ChillMainBundle/Export/ExportManager.php | 7 +++--- .../Export/FilterInterface.php | 7 +++--- .../Export/Formatter/CSVFormatter.php | 7 +++--- .../Export/Formatter/CSVListFormatter.php | 7 +++--- .../Formatter/CSVPivotedListFormatter.php | 7 +++--- .../Export/Formatter/SpreadSheetFormatter.php | 7 +++--- .../Formatter/SpreadsheetListFormatter.php | 7 +++--- .../Export/FormatterInterface.php | 7 +++--- .../Export/GroupedExportInterface.php | 7 +++--- .../ChillMainBundle/Export/ListInterface.php | 7 +++--- .../Export/ModifierInterface.php | 7 +++--- .../Form/AdvancedSearchType.php | 7 +++--- .../ChillMainBundle/Form/CenterType.php | 7 +++--- .../ChoiceLoader/PostalCodeChoiceLoader.php | 7 +++--- .../ChillMainBundle/Form/CivilityType.php | 7 +++--- .../ChillMainBundle/Form/CountryType.php | 7 +++--- .../Form/DataMapper/AddressDataMapper.php | 7 +++--- .../DataMapper/PrivateCommentDataMapper.php | 7 +++--- .../Form/DataMapper/ScopePickerDataMapper.php | 7 +++--- .../Form/EntityWorkflowCommentType.php | 7 +++--- .../Form/Event/CustomizeFormEvent.php | 7 +++--- .../ChillMainBundle/Form/LanguageType.php | 7 +++--- .../ChillMainBundle/Form/LocationFormType.php | 7 +++--- .../ChillMainBundle/Form/LocationTypeType.php | 7 +++--- .../Form/NotificationCommentType.php | 7 +++--- .../ChillMainBundle/Form/NotificationType.php | 7 +++--- .../Form/PermissionsGroupType.php | 7 +++--- src/Bundle/ChillMainBundle/Form/ScopeType.php | 7 +++--- .../Form/Type/AddressDateType.php | 7 +++--- .../ChillMainBundle/Form/Type/AddressType.php | 7 +++--- .../Form/Type/AppendScopeChoiceTypeTrait.php | 7 +++--- .../Form/Type/ChillCollectionType.php | 7 +++--- .../Form/Type/ChillDateTimeType.php | 7 +++--- .../Form/Type/ChillDateType.php | 7 +++--- .../Form/Type/ChillPhoneNumberType.php | 7 +++--- .../Form/Type/ChillTextareaType.php | 7 +++--- .../ChillMainBundle/Form/Type/CommentType.php | 7 +++--- .../Form/Type/ComposedGroupCenterType.php | 7 +++--- .../Form/Type/ComposedRoleScopeType.php | 7 +++--- .../AddressToIdDataTransformer.php | 7 +++--- .../DataTransformer/CenterTransformer.php | 7 +++--- .../DateIntervalTransformer.php | 7 +++--- .../EntityToJsonTransformer.php | 7 +++--- .../MultipleObjectsToIdTransformer.php | 7 +++--- .../DataTransformer/ObjectToIdTransformer.php | 7 +++--- .../Type/DataTransformer/ScopeTransformer.php | 7 +++--- .../Form/Type/DateIntervalType.php | 7 +++--- .../Form/Type/Export/AggregatorType.php | 7 +++--- .../Form/Type/Export/ExportType.php | 7 +++--- .../Form/Type/Export/FilterType.php | 7 +++--- .../Form/Type/Export/FormatterType.php | 7 +++--- .../Form/Type/Export/PickCenterType.php | 7 +++--- .../Form/Type/Export/PickFormatterType.php | 7 +++--- .../Form/Type/Listing/FilterOrderType.php | 7 +++--- .../Form/Type/PickAddressType.php | 7 +++--- .../Form/Type/PickCenterType.php | 7 +++--- .../Form/Type/PickCivilityType.php | 7 +++--- .../Form/Type/PickUserDynamicType.php | 7 +++--- .../Form/Type/PostalCodeType.php | 7 +++--- .../Form/Type/PrivateCommentType.php | 7 +++--- .../Form/Type/ScopePickerType.php | 7 +++--- .../Form/Type/Select2ChoiceType.php | 7 +++--- .../Form/Type/Select2CountryType.php | 7 +++--- .../Form/Type/Select2EntityType.php | 7 +++--- .../Form/Type/Select2LanguageType.php | 7 +++--- .../Form/Type/TranslatableStringFormType.php | 7 +++--- .../Form/Type/UserPickerType.php | 7 +++--- .../Form/UserCurrentLocationType.php | 7 +++--- .../ChillMainBundle/Form/UserJobType.php | 7 +++--- .../ChillMainBundle/Form/UserPasswordType.php | 7 +++--- src/Bundle/ChillMainBundle/Form/UserType.php | 7 +++--- .../Utils/PermissionsGroupFlagProvider.php | 7 +++--- .../ChillMainBundle/Form/WorkflowStepType.php | 7 +++--- .../Form/WorkflowTransitionType.php | 7 +++--- .../Counter/NotificationByUserCounter.php | 7 +++--- .../Notification/Email/NotificationMailer.php | 7 +++--- ...NotificationOnTerminateEventSubscriber.php | 7 +++--- .../Exception/NotificationHandlerNotFound.php | 7 +++--- .../ChillMainBundle/Notification/Mailer.php | 7 +++--- .../NotificationHandlerInterface.php | 7 +++--- .../NotificationHandlerManager.php | 7 +++--- .../Notification/NotificationPersister.php | 7 +++--- .../NotificationPersisterInterface.php | 7 +++--- .../Notification/NotificationPresence.php | 7 +++--- .../Templating/NotificationTwigExtension.php | 7 +++--- .../NotificationTwigExtensionRuntime.php | 7 +++--- .../Pagination/ChillItemsPerPageTwig.php | 7 +++--- .../Pagination/ChillPaginationTwig.php | 7 +++--- .../ChillMainBundle/Pagination/Page.php | 7 +++--- .../Pagination/PageGenerator.php | 7 +++--- .../Pagination/PageInterface.php | 7 +++--- .../ChillMainBundle/Pagination/Paginator.php | 7 +++--- .../Pagination/PaginatorFactory.php | 7 +++--- .../Pagination/PaginatorInterface.php | 7 +++--- .../PhoneNumberHelperInterface.php | 7 +++--- .../Phonenumber/PhonenumberHelper.php | 7 +++--- .../Phonenumber/Templating.php | 7 +++--- .../ChillMainBundle/Redis/ChillRedis.php | 7 +++--- .../Redis/RedisConnectionFactory.php | 7 +++--- .../Repository/AddressReferenceRepository.php | 7 +++--- .../Repository/AddressRepository.php | 7 +++--- .../Repository/CenterRepository.php | 7 +++--- .../Repository/CivilityRepository.php | 7 +++--- .../Repository/CountryRepository.php | 7 +++--- .../Repository/GroupCenterRepository.php | 7 +++--- .../Repository/LanguageRepository.php | 7 +++--- .../Repository/LocationRepository.php | 7 +++--- .../Repository/LocationTypeRepository.php | 7 +++--- .../Repository/NotificationRepository.php | 7 +++--- .../Repository/PermissionsGroupRepository.php | 7 +++--- .../Repository/PostalCodeRepository.php | 7 +++--- .../Repository/RoleScopeRepository.php | 7 +++--- .../Repository/ScopeRepository.php | 7 +++--- .../Repository/UserACLAwareRepository.php | 7 +++--- .../UserACLAwareRepositoryInterface.php | 7 +++--- .../Repository/UserJobRepository.php | 7 +++--- .../Repository/UserRepository.php | 7 +++--- .../Workflow/EntityWorkflowRepository.php | 7 +++--- .../Workflow/EntityWorkflowStepRepository.php | 7 +++--- .../Routing/Loader/ChillRoutesLoader.php | 7 +++--- .../Routing/LocalMenuBuilderInterface.php | 7 +++--- .../MenuBuilder/AdminLanguageMenuBuilder.php | 7 +++--- .../MenuBuilder/AdminLocationMenuBuilder.php | 7 +++--- .../MenuBuilder/AdminUserMenuBuilder.php | 7 +++--- .../MenuBuilder/SectionMenuBuilder.php | 7 +++--- .../Routing/MenuBuilder/UserMenuBuilder.php | 7 +++--- .../ChillMainBundle/Routing/MenuComposer.php | 7 +++--- .../ChillMainBundle/Routing/MenuTwig.php | 7 +++--- .../ChillMainBundle/Search/AbstractSearch.php | 7 +++--- .../Search/Entity/SearchUserApiProvider.php | 7 +++--- .../Search/HasAdvancedSearchFormInterface.php | 7 +++--- .../ChillMainBundle/Search/Model/Result.php | 7 +++--- .../Search/ParsingException.php | 7 +++--- .../ChillMainBundle/Search/SearchApi.php | 7 +++--- .../Search/SearchApiInterface.php | 7 +++--- .../Search/SearchApiNoQueryException.php | 7 +++--- .../ChillMainBundle/Search/SearchApiQuery.php | 7 +++--- .../Search/SearchApiResult.php | 7 +++--- .../Search/SearchInterface.php | 7 +++--- .../ChillMainBundle/Search/SearchProvider.php | 7 +++--- .../Search/UnknowSearchDomainException.php | 7 +++--- .../Search/UnknowSearchNameException.php | 7 +++--- .../Search/Utils/ExtractDateFromPattern.php | 7 +++--- .../Utils/ExtractPhonenumberFromPattern.php | 7 +++--- .../Search/Utils/SearchExtractionResult.php | 7 +++--- .../Authorization/AbstractChillVoter.php | 7 +++--- .../Authorization/AuthorizationHelper.php | 7 +++--- .../AuthorizationHelperInterface.php | 7 +++--- .../Authorization/ChillExportVoter.php | 7 +++--- .../Authorization/ChillVoterInterface.php | 7 +++--- .../Authorization/DefaultVoterHelper.php | 7 +++--- .../DefaultVoterHelperFactory.php | 7 +++--- .../DefaultVoterHelperGenerator.php | 7 +++--- .../Authorization/EntityWorkflowVoter.php | 7 +++--- .../Authorization/NotificationVoter.php | 7 +++--- .../Authorization/VoterGeneratorInterface.php | 7 +++--- .../VoterHelperFactoryInterface.php | 7 +++--- .../Authorization/VoterHelperInterface.php | 7 +++--- .../WorkflowEntityDeletionVoter.php | 7 +++--- .../Security/ParentRoleHelper.php | 7 +++--- .../PasswordRecover/PasswordRecoverEvent.php | 7 +++--- .../PasswordRecoverEventSubscriber.php | 7 +++--- .../PasswordRecover/PasswordRecoverLocker.php | 7 +++--- .../PasswordRecover/PasswordRecoverVoter.php | 7 +++--- .../PasswordRecover/RecoverPasswordHelper.php | 7 +++--- .../Security/PasswordRecover/TokenManager.php | 7 +++--- .../ProvideRoleHierarchyInterface.php | 7 +++--- .../Security/ProvideRoleInterface.php | 7 +++--- .../Resolver/CenterResolverDispatcher.php | 7 +++--- .../CenterResolverDispatcherInterface.php | 7 +++--- .../Resolver/CenterResolverInterface.php | 7 +++--- .../Resolver/CenterResolverManager.php | 7 +++--- .../CenterResolverManagerInterface.php | 7 +++--- .../Resolver/DefaultCenterResolver.php | 7 +++--- .../Resolver/DefaultScopeResolver.php | 7 +++--- .../Resolver/ResolverTwigExtension.php | 7 +++--- .../Resolver/ScopeResolverDispatcher.php | 7 +++--- .../Resolver/ScopeResolverInterface.php | 7 +++--- .../ChillMainBundle/Security/RoleProvider.php | 7 +++--- .../Security/UserProvider/UserProvider.php | 7 +++--- .../Serializer/Model/Collection.php | 7 +++--- .../Serializer/Model/Counter.php | 7 +++--- .../Normalizer/AddressNormalizer.php | 7 +++--- .../Normalizer/CenterNormalizer.php | 7 +++--- .../Normalizer/CollectionNormalizer.php | 7 +++--- .../CommentEmbeddableDocGenNormalizer.php | 7 +++--- .../Serializer/Normalizer/DateNormalizer.php | 7 +++--- .../DiscriminatedObjectDenormalizer.php | 7 +++--- .../DoctrineExistingEntityNormalizer.php | 7 +++--- .../Normalizer/EntityWorkflowNormalizer.php | 7 +++--- .../EntityWorkflowStepNormalizer.php | 7 +++--- .../Normalizer/NotificationNormalizer.php | 7 +++--- .../Normalizer/PhonenumberNormalizer.php | 7 +++--- .../Serializer/Normalizer/PointNormalizer.php | 7 +++--- .../PrivateCommentEmbeddableNormalizer.php | 7 +++--- .../Serializer/Normalizer/UserNormalizer.php | 7 +++--- .../AddressReferenceBEFromBestAddress.php | 7 +++--- .../Import/AddressReferenceBaseImporter.php | 7 +++--- .../Import/AddressReferenceFromBano.php | 7 +++--- .../Import/PostalCodeBEFromBestAddress.php | 7 +++--- .../Service/Import/PostalCodeBaseImporter.php | 7 +++--- .../Import/PostalCodeFRFromOpenData.php | 7 +++--- .../Service/Mailer/ChillMailer.php | 7 +++--- .../Templating/CSVCellTwig.php | 7 +++--- .../ChillMarkdownRenderExtension.php | 7 +++--- .../Templating/ChillTwigHelper.php | 7 +++--- .../Templating/ChillTwigRoutingHelper.php | 7 +++--- .../Entity/AbstractChillEntityRender.php | 7 +++--- .../Templating/Entity/AddressRender.php | 7 +++--- .../Templating/Entity/ChillEntityRender.php | 7 +++--- .../Entity/ChillEntityRenderExtension.php | 7 +++--- .../Entity/ChillEntityRenderInterface.php | 7 +++--- .../Templating/Entity/CommentRender.php | 7 +++--- .../Templating/Entity/UserRender.php | 7 +++--- .../Events/DelegatedBlockRenderingEvent.php | 7 +++--- .../Templating/Listing/FilterOrderHelper.php | 7 +++--- .../Listing/FilterOrderHelperBuilder.php | 7 +++--- .../Listing/FilterOrderHelperFactory.php | 7 +++--- .../FilterOrderHelperFactoryInterface.php | 7 +++--- .../Templating/Listing/Templating.php | 7 +++--- .../Templating/TranslatableStringHelper.php | 7 +++--- .../TranslatableStringHelperInterface.php | 7 +++--- .../Templating/TranslatableStringTwig.php | 7 +++--- .../Templating/UI/CountNotificationUser.php | 7 +++--- .../UI/NotificationCounterInterface.php | 7 +++--- .../Templating/Widget/WidgetInterface.php | 7 +++--- .../Templating/Widget/WidgetRenderingTwig.php | 7 +++--- .../Test/Export/AbstractAggregatorTest.php | 7 +++--- .../Test/Export/AbstractExportTest.php | 7 +++--- .../Test/Export/AbstractFilterTest.php | 7 +++--- .../Test/PrepareCenterTrait.php | 7 +++--- .../Test/PrepareCircleTrait.php | 7 +++--- .../Test/PrepareClientTrait.php | 7 +++--- .../Test/PrepareScopeTrait.php | 7 +++--- .../ChillMainBundle/Test/PrepareUserTrait.php | 7 +++--- .../ChillMainBundle/Test/ProphecyTrait.php | 7 +++--- .../Authorization/ParentRoleHelperTest.php | 7 +++--- .../Controller/AddressControllerTest.php | 7 +++--- .../AddressReferenceApiControllerTest.php | 10 ++------ .../Tests/Controller/CenterControllerTest.php | 7 +++--- .../Tests/Controller/ExportControllerTest.php | 7 +++--- .../Tests/Controller/LoginControllerTest.php | 7 +++--- .../NotificationApiControllerTest.php | 7 +++--- .../PermissionApiControllerTest.php | 7 +++--- .../PermissionsGroupControllerTest.php | 7 +++--- .../PostalCodeApiControllerTest.php | 10 ++------ .../Tests/Controller/ScopeControllerTest.php | 7 +++--- .../Controller/SearchApiControllerTest.php | 7 +++--- .../Tests/Controller/SearchControllerTest.php | 7 +++--- .../Controller/UserApiControllerTest.php | 7 +++--- .../Tests/Controller/UserControllerTest.php | 7 +++--- .../Tests/Doctrine/Model/PointTest.php | 7 +++--- .../Tests/Entity/NotificationTest.php | 7 +++--- .../Entity/Workflow/EntityWorkflowTest.php | 7 +++--- .../Tests/Export/ExportManagerTest.php | 7 +++--- .../Tests/Form/Type/PickCenterTypeTest.php | 7 +++--- ...ficationOnTerminateEventSubscriberTest.php | 7 +++--- .../Tests/Pagination/PageTest.php | 7 +++--- .../Tests/Pagination/PaginatorTest.php | 7 +++--- .../Phonenumber/PhonenumberHelperTest.php | 7 +++--- .../Tests/Routing/Loader/RouteLoaderTest.php | 7 +++--- .../Tests/Search/AbstractSearchTest.php | 7 +++--- .../Tests/Search/SearchApiQueryTest.php | 7 +++--- .../Tests/Search/SearchProviderTest.php | 7 +++--- .../Utils/ExtractDateFromPatternTest.php | 7 +++--- .../ExtractPhonenumberFromPatternTest.php | 7 +++--- .../Authorization/AuthorizationHelperTest.php | 7 +++--- .../PasswordRecover/TokenManagerTest.php | 7 +++--- .../Resolver/CenterResolverDispatcherTest.php | 7 +++--- .../Resolver/DefaultScopeResolverTest.php | 7 +++--- .../Resolver/ScopeResolverDispatcherTest.php | 7 +++--- .../Normalizer/DateNormalizerTest.php | 7 +++--- .../DoctrineExistingEntityNormalizerTest.php | 7 +++--- .../Normalizer/PhonenumberNormalizerTest.php | 7 +++--- .../AddressReferenceBaseImporterTest.php | 7 +++--- .../Import/PostalCodeBaseImporterTest.php | 7 +++--- .../Tests/Services/MenuComposerTest.php | 7 +++--- .../ChillMarkdownRenderExtensionTest.php | 7 +++--- .../Templating/Entity/AddressRenderTest.php | 7 +++--- .../ChillMainBundle/Tests/TestHelper.php | 7 +++--- .../Tests/Util/CountriesInfoTest.php | 7 +++--- .../Tests/Util/DateRangeCoveringTest.php | 7 +++--- .../NotificationOnTransitionTest.php | 7 +++--- .../Timeline/TimelineBuilder.php | 7 +++--- .../Timeline/TimelineProviderInterface.php | 7 +++--- .../Timeline/TimelineSingleQuery.php | 7 +++--- .../ChillMainBundle/Util/CountriesInfo.php | 7 +++--- .../Util/DateRangeCovering.php | 7 +++--- .../Constraint/PhonenumberConstraint.php | 7 +++--- .../RoleScopeScopePresenceConstraint.php | 7 +++--- .../UserUniqueEmailAndUsernameConstraint.php | 7 +++--- .../Validator/RoleScopeScopePresence.php | 7 +++--- .../Validator/UserUniqueEmailAndUsername.php | 7 +++--- .../Validation/Validator/ValidPhonenumber.php | 7 +++--- .../Entity/UserCircleConsistency.php | 7 +++--- .../Entity/UserCircleConsistencyValidator.php | 7 +++--- .../Export/ExportElementConstraint.php | 7 +++--- .../ExportElementConstraintValidator.php | 7 +++--- .../Counter/WorkflowByUserCounter.php | 7 +++--- .../EntityWorkflowHandlerInterface.php | 7 +++--- .../Workflow/EntityWorkflowManager.php | 7 +++--- ...ntityWorkflowTransitionEventSubscriber.php | 7 +++--- .../NotificationOnTransition.php | 7 +++--- .../SendAccessKeyEventSubscriber.php | 7 +++--- .../Exception/HandlerNotFoundException.php | 7 +++--- .../Workflow/Helper/MetadataExtractor.php | 7 +++--- .../WorkflowNotificationHandler.php | 7 +++--- .../RelatedEntityWorkflowSupportsStrategy.php | 7 +++--- .../Templating/WorkflowTwigExtension.php | 7 +++--- .../WorkflowTwigExtensionRuntime.php | 7 +++--- .../Validator/EntityWorkflowCreation.php | 7 +++--- .../EntityWorkflowCreationValidator.php | 7 +++--- .../Workflow/Validator/StepDestValid.php | 7 +++--- .../Validator/StepDestValidValidator.php | 7 +++--- .../migrations/Version20100000000000.php | 7 +++--- .../migrations/Version20141128194409.php | 7 +++--- .../migrations/Version20150821105642.php | 7 +++--- .../migrations/Version20150821122935.php | 7 +++--- .../migrations/Version20160310122322.php | 7 +++--- .../migrations/Version20180703191509.php | 7 +++--- .../migrations/Version20180709181423.php | 7 +++--- .../migrations/Version20180905101426.php | 7 +++--- .../migrations/Version20180911093642.php | 7 +++--- .../migrations/Version20200422122715.php | 7 +++--- .../migrations/Version20210304085819.php | 7 +++--- .../migrations/Version20210308111926.php | 7 +++--- .../migrations/Version20210414091001.php | 7 +++--- .../migrations/Version20210420115006.php | 7 +++--- .../migrations/Version20210503085107.php | 7 +++--- .../migrations/Version20210505153727.php | 7 +++--- .../migrations/Version20210525144016.php | 7 +++--- .../migrations/Version20210528090000.php | 7 +++--- .../migrations/Version20210610140248.php | 7 +++--- .../migrations/Version20210616134328.php | 7 +++--- .../migrations/Version20210903144853.php | 7 +++--- .../migrations/Version20210929192242.php | 7 +++--- .../migrations/Version20211006151653.php | 7 +++--- .../migrations/Version20211007150019.php | 7 +++--- .../migrations/Version20211012141336.php | 7 +++--- .../migrations/Version20211013124455.php | 7 +++--- .../migrations/Version20211015084653.php | 7 +++--- .../migrations/Version20211022094429.php | 7 +++--- .../migrations/Version20211116162847.php | 7 +++--- .../migrations/Version20211119173554.php | 7 +++--- .../migrations/Version20211123093355.php | 7 +++--- .../migrations/Version20211125142016.php | 7 +++--- .../migrations/Version20211125142017.php | 7 +++--- .../migrations/Version20211213112628.php | 7 +++--- .../migrations/Version20211216213649.php | 7 +++--- .../migrations/Version20211225231532.php | 7 +++--- .../migrations/Version20211228183221.php | 7 +++--- .../migrations/Version20211228215919.php | 7 +++--- .../migrations/Version20211229140308.php | 7 +++--- .../migrations/Version20211230003532.php | 7 +++--- .../migrations/Version20220112123436.php | 7 +++--- .../migrations/Version20220112150413.php | 7 +++--- .../migrations/Version20220112161136.php | 7 +++--- .../migrations/Version20220114132105.php | 7 +++--- .../migrations/Version20220114165950.php | 7 +++--- .../migrations/Version20220120155303.php | 7 +++--- .../migrations/Version20220124085957.php | 7 +++--- .../migrations/Version20220125134253.php | 7 +++--- .../migrations/Version20220128211748.php | 7 +++--- .../migrations/Version20220217133607.php | 7 +++--- .../migrations/Version20220223171457.php | 7 +++--- .../migrations/Version20220302132728.php | 7 +++--- .../migrations/Version20220325134944.php | 7 +++--- .../migrations/Version20220413154743.php | 7 +++--- .../migrations/Version20220413225830.php | 7 +++--- .../migrations/Version20220413230159.php | 7 +++--- .../migrations/Version20220506131307.php | 7 +++--- .../migrations/Version20220506145935.php | 7 +++--- .../migrations/Version20220513151853.php | 7 +++--- .../migrations/Version20220516085659.php | 7 +++--- .../migrations/Version20220711150006.php | 7 +++--- .../migrations/Version20220729205416.php | 7 +++--- .../migrations/Version20220730204216.php | 7 +++--- .../migrations/Version20220829132409.php | 7 +++--- .../PersonAddressMoveEventSubscriber.php | 7 +++--- .../Events/UserRefEventSubscriber.php | 7 +++--- ...dLinkedWithSocialIssuesEntityInterface.php | 7 +++--- ...odSocialIssueConsistencyEntityListener.php | 7 +++--- .../Suggestion/ReferralsSuggestion.php | 7 +++--- .../ReferralsSuggestionInterface.php | 7 +++--- .../ChillPersonBundle/Actions/ActionEvent.php | 7 +++--- .../Actions/Remove/PersonMove.php | 7 +++--- .../Controller/EntityPersonCRUDController.php | 7 +++--- .../OneToOneEntityPersonCRUDController.php | 7 +++--- .../ChillPersonBundle/ChillPersonBundle.php | 7 +++--- .../Command/ChillPersonMoveCommand.php | 7 +++--- .../Command/ImportPeopleFromCSVCommand.php | 7 +++--- .../Command/ImportSocialWorkMetadata.php | 7 +++--- ...emoveOldDraftAccompanyingPeriodCommand.php | 7 +++--- .../Config/ConfigPersonAltNamesHelper.php | 7 +++--- .../AccompanyingCourseApiController.php | 7 +++--- .../AccompanyingCourseCommentController.php | 7 +++--- .../AccompanyingCourseController.php | 7 +++--- .../AccompanyingCourseWorkApiController.php | 7 +++--- .../AccompanyingCourseWorkController.php | 7 +++--- .../AccompanyingPeriodController.php | 7 +++--- ...mpanyingPeriodRegulationListController.php | 7 +++--- ...nyingPeriodWorkEvaluationApiController.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../Controller/ClosingMotiveController.php | 7 +++--- .../Controller/HouseholdApiController.php | 7 +++--- .../HouseholdCompositionController.php | 7 +++--- .../HouseholdCompositionTypeApiController.php | 7 +++--- .../HouseholdCompositionTypeController.php | 7 +++--- .../Controller/HouseholdController.php | 7 +++--- .../Controller/HouseholdMemberController.php | 7 +++--- .../HouseholdPositionController.php | 7 +++--- .../Controller/MaritalStatusController.php | 7 +++--- .../Controller/OpeningApiController.php | 7 +++--- .../Controller/OriginController.php | 7 +++--- .../Controller/PersonAddressController.php | 7 +++--- .../Controller/PersonApiController.php | 7 +++--- .../Controller/PersonController.php | 7 +++--- .../Controller/PersonDuplicateController.php | 7 +++--- .../Controller/PersonResourceController.php | 7 +++--- .../PersonResourceKindController.php | 7 +++--- .../ReassignAccompanyingPeriodController.php | 7 +++--- .../Controller/RelationController.php | 7 +++--- .../Controller/RelationshipApiController.php | 7 +++--- .../ResidentialAddressController.php | 7 +++--- .../Controller/SocialIssueApiController.php | 7 +++--- .../SocialWork/EvaluationController.php | 7 +++--- .../Controller/SocialWork/GoalController.php | 7 +++--- .../SocialWork/ResultController.php | 7 +++--- .../SocialWork/SocialActionController.php | 7 +++--- .../SocialWork/SocialIssueController.php | 7 +++--- .../SocialWorkEvaluationApiController.php | 7 +++--- .../SocialWorkGoalApiController.php | 7 +++--- .../SocialWorkResultApiController.php | 7 +++--- .../SocialWorkSocialActionApiController.php | 7 +++--- .../Controller/TimelinePersonController.php | 7 +++--- .../UserAccompanyingPeriodController.php | 7 +++--- .../Helper/PersonRandomHelper.php | 7 +++--- .../Helper/RandomPersonHelperTrait.php | 7 +++--- .../LoadAccompanyingPeriodClosingMotive.php | 7 +++--- .../LoadAccompanyingPeriodNotifications.php | 7 +++--- .../ORM/LoadAccompanyingPeriodOrigin.php | 7 +++--- .../ORM/LoadAccompanyingPeriodWork.php | 7 +++--- .../DataFixtures/ORM/LoadCustomFields.php | 7 +++--- .../DataFixtures/ORM/LoadHousehold.php | 7 +++--- .../ORM/LoadHouseholdCompositionType.php | 7 +++--- .../ORM/LoadHouseholdPosition.php | 7 +++--- .../DataFixtures/ORM/LoadMaritalStatus.php | 7 +++--- .../DataFixtures/ORM/LoadPeople.php | 7 +++--- .../DataFixtures/ORM/LoadPersonACL.php | 7 +++--- .../DataFixtures/ORM/LoadRelations.php | 7 +++--- .../DataFixtures/ORM/LoadRelationships.php | 7 +++--- .../ORM/LoadSocialWorkMetadata.php | 7 +++--- .../ChillPersonExtension.php | 7 +++--- ...AccompanyingPeriodTimelineCompilerPass.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../Doctrine/DQL/AddressPart.php | 7 +++--- .../DQL/AddressPart/AddressPartAddressId.php | 7 +++--- .../AddressPart/AddressPartCountryCode.php | 7 +++--- .../DQL/AddressPart/AddressPartCountryId.php | 7 +++--- .../AddressPart/AddressPartCountryName.php | 7 +++--- .../AddressPart/AddressPartIsNoAddress.php | 7 +++--- .../AddressPart/AddressPartPostCodeCode.php | 7 +++--- .../DQL/AddressPart/AddressPartPostCodeId.php | 7 +++--- .../AddressPart/AddressPartPostCodeLabel.php | 7 +++--- .../AddressPart/AddressPartStreetAddress1.php | 7 +++--- .../AddressPart/AddressPartStreetAddress2.php | 7 +++--- .../DQL/AddressPart/AddressPartValidFrom.php | 7 +++--- .../Entity/AccompanyingPeriod.php | 7 +++--- .../AccompanyingPeriodLocationHistory.php | 7 +++--- .../AccompanyingPeriodWork.php | 7 +++--- .../AccompanyingPeriodWorkEvaluation.php | 7 +++--- ...companyingPeriodWorkEvaluationDocument.php | 7 +++--- .../AccompanyingPeriodWorkGoal.php | 7 +++--- .../AccompanyingPeriod/ClosingMotive.php | 7 +++--- .../Entity/AccompanyingPeriod/Comment.php | 7 +++--- .../Entity/AccompanyingPeriod/Origin.php | 7 +++--- .../Entity/AccompanyingPeriod/Resource.php | 7 +++--- .../Entity/AccompanyingPeriod/UserHistory.php | 7 +++--- .../AccompanyingPeriodParticipation.php | 7 +++--- .../ChillPersonBundle/Entity/HasPerson.php | 7 +++--- .../Entity/Household/Household.php | 7 +++--- .../Entity/Household/HouseholdComposition.php | 7 +++--- .../Household/HouseholdCompositionType.php | 7 +++--- .../Entity/Household/HouseholdMember.php | 7 +++--- .../Household/PersonHouseholdAddress.php | 7 +++--- .../Entity/Household/Position.php | 7 +++--- .../Entity/MaritalStatus.php | 7 +++--- .../ChillPersonBundle/Entity/Person.php | 7 +++--- .../Entity/Person/PersonCurrentAddress.php | 7 +++--- .../Entity/Person/PersonResource.php | 7 +++--- .../Entity/Person/PersonResourceKind.php | 7 +++--- .../Entity/Person/ResidentialAddress.php | 7 +++--- .../Entity/PersonAltName.php | 7 +++--- .../Entity/PersonNotDuplicate.php | 7 +++--- .../ChillPersonBundle/Entity/PersonPhone.php | 7 +++--- .../Entity/Relationships/Relation.php | 7 +++--- .../Entity/Relationships/Relationship.php | 7 +++--- .../Entity/SocialWork/Evaluation.php | 7 +++--- .../Entity/SocialWork/Goal.php | 7 +++--- .../Entity/SocialWork/Result.php | 7 +++--- .../Entity/SocialWork/SocialAction.php | 7 +++--- .../Entity/SocialWork/SocialIssue.php | 7 +++--- .../Event/Person/PersonAddressMoveEvent.php | 7 +++--- .../AccompanyingPeriodWorkEventListener.php | 7 +++--- .../EventListener/PersonEventListener.php | 7 +++--- ...bstractAccompanyingPeriodExportElement.php | 7 +++--- .../AdministrativeLocationAggregator.php | 7 +++--- .../ClosingMotiveAggregator.php | 7 +++--- .../ConfidentialAggregator.php | 7 +++--- .../DurationAggregator.php | 7 +++--- .../EmergencyAggregator.php | 7 +++--- .../EvaluationAggregator.php | 7 +++--- .../IntensityAggregator.php | 7 +++--- .../JobAggregator.php | 7 +++--- .../OriginAggregator.php | 7 +++--- .../ReferrerAggregator.php | 7 +++--- .../ScopeAggregator.php | 7 +++--- .../SocialActionAggregator.php | 7 +++--- .../SocialIssueAggregator.php | 7 +++--- .../StepAggregator.php | 7 +++--- .../EvaluationTypeAggregator.php | 7 +++--- .../ChildrenNumberAggregator.php | 7 +++--- .../CompositionAggregator.php | 7 +++--- .../PersonAggregators/AgeAggregator.php | 7 +++--- .../CountryOfBirthAggregator.php | 7 +++--- .../PersonAggregators/GenderAggregator.php | 7 +++--- .../HouseholdPositionAggregator.php | 7 +++--- .../MaritalStatusAggregator.php | 7 +++--- .../NationalityAggregator.php | 7 +++--- .../ActionTypeAggregator.php | 7 +++--- .../SocialWorkAggregators/GoalAggregator.php | 7 +++--- .../SocialWorkAggregators/JobAggregator.php | 7 +++--- .../ReferrerAggregator.php | 7 +++--- .../ResultAggregator.php | 7 +++--- .../SocialWorkAggregators/ScopeAggregator.php | 7 +++--- .../ChillPersonBundle/Export/Declarations.php | 7 +++--- .../Export/Export/CountAccompanyingCourse.php | 7 +++--- .../Export/Export/CountEvaluation.php | 7 +++--- .../Export/Export/CountHousehold.php | 7 +++--- .../Export/Export/CountPerson.php | 7 +++--- .../CountPersonWithAccompanyingCourse.php | 7 +++--- .../Export/Export/CountSocialWorkActions.php | 7 +++--- .../Export/Export/ListPerson.php | 7 +++--- .../Export/Export/ListPersonDuplicate.php | 7 +++--- .../Export/StatAccompanyingCourseDuration.php | 7 +++--- .../ActiveOnDateFilter.php | 7 +++--- .../ActiveOneDayBetweenDatesFilter.php | 7 +++--- .../ActivityTypeFilter.php | 7 +++--- .../AdministrativeLocationFilter.php | 7 +++--- .../ClosingMotiveFilter.php | 7 +++--- .../ConfidentialFilter.php | 7 +++--- .../CurrentUserJobFilter.php | 7 +++--- .../CurrentUserScopeFilter.php | 7 +++--- .../EmergencyFilter.php | 7 +++--- .../EvaluationFilter.php | 7 +++--- .../GeographicalUnitStatFilter.php | 7 +++--- .../IntensityFilter.php | 7 +++--- .../OpenBetweenDatesFilter.php | 7 +++--- .../OriginFilter.php | 7 +++--- .../ReferrerFilter.php | 7 +++--- .../RequestorFilter.php | 7 +++--- .../SocialActionFilter.php | 7 +++--- .../SocialIssueFilter.php | 7 +++--- .../AccompanyingCourseFilters/StepFilter.php | 7 +++--- .../EvaluationTypeFilter.php | 7 +++--- .../EvaluationFilters/MaxDateFilter.php | 7 +++--- .../HouseholdFilters/CompositionFilter.php | 7 +++--- .../AccompanyingPeriodClosingFilter.php | 7 +++--- .../AccompanyingPeriodFilter.php | 7 +++--- .../AccompanyingPeriodOpeningFilter.php | 7 +++--- .../Export/Filter/PersonFilters/AgeFilter.php | 7 +++--- .../Filter/PersonFilters/BirthdateFilter.php | 7 +++--- .../PersonFilters/DeadOrAliveFilter.php | 19 +++++++-------- .../Filter/PersonFilters/DeathdateFilter.php | 7 +++--- .../PersonFilters/FamilySituationFilter.php | 7 +++--- .../Filter/PersonFilters/GenderFilter.php | 7 +++--- .../PersonFilters/NationalityFilter.php | 7 +++--- .../ResidentialAddressAtThirdpartyFilter.php | 7 +++--- .../ResidentialAddressAtUserFilter.php | 7 +++--- .../Filter/SocialWorkFilters/JobFilter.php | 7 +++--- .../SocialWorkFilters/ReferrerFilter.php | 7 +++--- .../Filter/SocialWorkFilters/ScopeFilter.php | 7 +++--- .../SocialWorkTypeFilter.php | 7 +++--- .../Form/AccompanyingCourseCommentType.php | 7 +++--- .../Form/AccompanyingCourseType.php | 7 +++--- .../Form/AccompanyingPeriodType.php | 7 +++--- .../Form/ChoiceLoader/PersonChoiceLoader.php | 7 +++--- .../Form/ClosingMotiveType.php | 7 +++--- .../Form/CreationPersonType.php | 7 +++--- .../DataMapper/PersonAltNameDataMapper.php | 7 +++--- .../DataTransformer/PersonToIdTransformer.php | 7 +++--- .../Form/HouseholdCompositionType.php | 7 +++--- .../Form/HouseholdCompositionTypeType.php | 7 +++--- .../Form/HouseholdMemberType.php | 7 +++--- .../Form/HouseholdPositionType.php | 7 +++--- .../ChillPersonBundle/Form/HouseholdType.php | 7 +++--- .../Form/MaritalStatusType.php | 7 +++--- .../ChillPersonBundle/Form/OriginType.php | 7 +++--- .../Form/PersonConfimDuplicateType.php | 7 +++--- .../Form/PersonFindManuallyDuplicateType.php | 7 +++--- .../Form/PersonResourceKindType.php | 7 +++--- .../Form/PersonResourceType.php | 7 +++--- .../ChillPersonBundle/Form/PersonType.php | 7 +++--- .../ChillPersonBundle/Form/RelationType.php | 7 +++--- .../Form/ResidentialAddressType.php | 7 +++--- .../Form/SocialWork/EvaluationType.php | 7 +++--- .../Form/SocialWork/GoalType.php | 7 +++--- .../Form/SocialWork/ResultType.php | 7 +++--- .../Form/SocialWork/SocialActionType.php | 7 +++--- .../Form/SocialWork/SocialIssueType.php | 7 +++--- .../Form/Type/ClosingMotivePickerType.php | 7 +++--- .../Form/Type/GenderType.php | 7 +++--- .../Form/Type/PersonAltNameType.php | 7 +++--- .../Form/Type/PersonPhoneType.php | 7 +++--- .../Form/Type/PickPersonDynamicType.php | 7 +++--- .../Form/Type/PickPersonType.php | 7 +++--- .../Form/Type/Select2MaritalStatusType.php | 7 +++--- .../Household/MembersEditor.php | 7 +++--- .../Household/MembersEditorFactory.php | 7 +++--- .../Menu/AccompanyingCourseMenuBuilder.php | 7 +++--- .../AdminAccompanyingCourseMenuBuilder.php | 7 +++--- .../Menu/AdminHouseholdMenuBuilder.php | 7 +++--- .../Menu/AdminPersonMenuBuilder.php | 7 +++--- .../Menu/AdminSocialWorkMenuBuilder.php | 7 +++--- .../Menu/HouseholdMenuBuilder.php | 7 +++--- .../Menu/PersonMenuBuilder.php | 7 +++--- .../Menu/SectionMenuBuilder.php | 7 +++--- .../Menu/UserMenuBuilder.php | 7 +++--- .../AccompanyingPeriodNotificationHandler.php | 7 +++--- .../AccompanyingPeriodPrivacyEvent.php | 7 +++--- .../Privacy/PrivacyEvent.php | 7 +++--- .../Privacy/PrivacyEventSubscriber.php | 7 +++--- ...PeriodWorkEvaluationDocumentRepository.php | 7 +++--- ...mpanyingPeriodWorkEvaluationRepository.php | 7 +++--- .../AccompanyingPeriodWorkGoalRepository.php | 7 +++--- .../AccompanyingPeriodWorkRepository.php | 7 +++--- .../ClosingMotiveRepository.php | 7 +++--- .../AccompanyingPeriod/CommentRepository.php | 7 +++--- .../AccompanyingPeriod/OriginRepository.php | 7 +++--- .../AccompanyingPeriod/ResourceRepository.php | 7 +++--- .../AccompanyingPeriodACLAwareRepository.php | 7 +++--- ...nyingPeriodACLAwareRepositoryInterface.php | 7 +++--- ...ompanyingPeriodParticipationRepository.php | 7 +++--- .../AccompanyingPeriodRepository.php | 7 +++--- .../Household/HouseholdACLAwareRepository.php | 7 +++--- .../HouseholdACLAwareRepositoryInterface.php | 7 +++--- .../HouseholdCompositionRepository.php | 7 +++--- .../HouseholdCompositionTypeRepository.php | 7 +++--- .../Household/HouseholdMembersRepository.php | 7 +++--- .../Household/HouseholdRepository.php | 7 +++--- .../PersonHouseholdAddressRepository.php | 7 +++--- .../Household/PositionRepository.php | 7 +++--- .../Repository/MaritalStatusRepository.php | 7 +++--- .../Repository/PersonACLAwareRepository.php | 7 +++--- .../PersonACLAwareRepositoryInterface.php | 7 +++--- .../Repository/PersonAltNameRepository.php | 7 +++--- .../PersonNotDuplicateRepository.php | 7 +++--- .../Repository/PersonRepository.php | 7 +++--- .../Repository/PersonResourceRepository.php | 7 +++--- .../Relationships/RelationRepository.php | 7 +++--- .../Relationships/RelationshipRepository.php | 7 +++--- .../ResidentialAddressRepository.php | 7 +++--- .../SocialWork/EvaluationRepository.php | 7 +++--- .../Repository/SocialWork/GoalRepository.php | 7 +++--- .../SocialWork/ResultRepository.php | 7 +++--- .../SocialWork/SocialActionRepository.php | 7 +++--- .../SocialWork/SocialIssueRepository.php | 23 ++----------------- .../ChillPersonBundle/Search/PersonSearch.php | 7 +++--- .../Search/SearchHouseholdApiProvider.php | 7 +++--- .../Search/SearchPersonApiProvider.php | 7 +++--- .../Search/SimilarPersonMatcher.php | 7 +++--- .../AccompanyingPeriodCommentVoter.php | 7 +++--- .../AccompanyingPeriodResourceVoter.php | 7 +++--- .../Authorization/AccompanyingPeriodVoter.php | 7 +++--- ...nyingPeriodWorkEvaluationDocumentVoter.php | 7 +++--- .../AccompanyingPeriodWorkEvaluationVoter.php | 7 +++--- .../AccompanyingPeriodWorkVoter.php | 7 +++--- .../Security/Authorization/HouseholdVoter.php | 7 +++--- .../Security/Authorization/PersonVoter.php | 7 +++--- .../AccompanyingPeriodDocGenNormalizer.php | 7 +++--- .../AccompanyingPeriodOriginNormalizer.php | 7 +++--- ...ompanyingPeriodParticipationNormalizer.php | 7 +++--- .../AccompanyingPeriodResourceNormalizer.php | 7 +++--- .../AccompanyingPeriodWorkDenormalizer.php | 7 +++--- ...anyingPeriodWorkEvaluationDenormalizer.php | 7 +++--- ...PeriodWorkEvaluationDocumentNormalizer.php | 7 +++--- ...mpanyingPeriodWorkEvaluationNormalizer.php | 7 +++--- .../AccompanyingPeriodWorkNormalizer.php | 7 +++--- .../Normalizer/MembersEditorNormalizer.php | 7 +++--- .../Normalizer/PersonDocGenNormalizer.php | 7 +++--- .../Normalizer/PersonJsonNormalizer.php | 7 +++--- .../PersonJsonNormalizerInterface.php | 7 +++--- .../RelationshipDocGenNormalizer.php | 7 +++--- .../Normalizer/SocialActionNormalizer.php | 7 +++--- .../Normalizer/SocialIssueNormalizer.php | 7 +++--- .../Normalizer/WorkflowNormalizer.php | 7 +++--- .../OldDraftAccompanyingPeriodRemover.php | 7 +++--- ...raftAccompanyingPeriodRemoverInterface.php | 7 +++--- .../AccompanyingPeriodContext.php | 7 +++--- .../AccompanyingPeriodWorkContext.php | 7 +++--- ...ccompanyingPeriodWorkEvaluationContext.php | 7 +++--- .../Service/DocGenerator/PersonContext.php | 7 +++--- .../Service/Import/ChillImporter.php | 7 +++--- .../Service/Import/SocialWorkMetadata.php | 7 +++--- .../Import/SocialWorkMetadataInterface.php | 7 +++--- .../Templating/Entity/ClosingMotiveRender.php | 7 +++--- .../Templating/Entity/PersonRender.php | 7 +++--- .../Entity/PersonRenderInterface.php | 7 +++--- .../Templating/Entity/ResourceKindRender.php | 7 +++--- .../Templating/Entity/SocialActionRender.php | 7 +++--- .../Templating/Entity/SocialIssueRender.php | 7 +++--- .../Test/PreparePersonTrait.php | 7 +++--- .../AccompanyingPeriodConfidentialTest.php | 7 +++--- .../Events/PersonMoveEventSubscriberTest.php | 7 +++--- ...cialIssueConsistencyEntityListenerTest.php | 7 +++--- .../Workflow/WorkflowEventSubscriberTest.php | 7 +++--- .../AccompanyingCourseApiControllerTest.php | 7 +++--- .../AccompanyingCourseControllerTest.php | 7 +++--- .../AccompanyingPeriodControllerTest.php | 7 +++--- ...yingPeriodRegulationListControllerTest.php | 7 +++--- .../Controller/HouseholdApiControllerTest.php | 7 +++--- .../Controller/HouseholdControllerTest.php | 7 +++--- .../HouseholdMemberControllerTest.php | 7 +++--- .../PersonAddressControllerTest.php | 7 +++--- .../Controller/PersonApiControllerTest.php | 7 +++--- .../Controller/PersonControllerCreateTest.php | 7 +++--- .../Controller/PersonControllerUpdateTest.php | 7 +++--- ...onControllerUpdateWithHiddenFieldsTest.php | 7 +++--- .../Controller/PersonControllerViewTest.php | 7 +++--- ...rsonControllerViewWithHiddenFieldsTest.php | 7 +++--- .../PersonDuplicateControllerViewTest.php | 7 +++--- .../RelationshipApiControllerTest.php | 7 +++--- .../SocialIssueApiControllerTest.php | 7 +++--- .../AccompanyingPeriod/ResourceTest.php | 7 +++--- .../Tests/Entity/AccompanyingPeriodTest.php | 7 +++--- .../Entity/Household/HouseholdMemberTest.php | 7 +++--- .../Tests/Entity/Household/HouseholdTest.php | 7 +++--- .../Tests/Entity/PersonTest.php | 7 +++--- .../Entity/SocialWork/SocialIssueTest.php | 7 +++--- .../Person/PersonAddressMoveEventTest.php | 7 +++--- .../EventListener/PersonCreateEventTest.php | 7 +++--- .../Aggregator/ActionTypeAggregatorTest.php | 7 +++--- .../Export/Aggregator/AgeAggregatorTest.php | 7 +++--- .../Aggregator/GenderAggregatorTest.php | 7 +++--- .../Export/Aggregator/GoalAggregatorTest.php | 7 +++--- .../Aggregator/NationalityAggregatorTest.php | 7 +++--- .../Aggregator/ReferrerAggregatorTest.php | 7 +++--- .../Aggregator/ResultAggregatorTest.php | 7 +++--- .../Export/CountAccompanyingCourseTest.php | 7 +++--- .../Tests/Export/Export/CountPersonTest.php | 7 +++--- .../Export/CountSocialWorkActionsTest.php | 7 +++--- .../Tests/Export/Export/ListPersonTest.php | 7 +++--- .../StatAccompanyingCourseDurationTest.php | 7 +++--- .../Filter/AccompanyingPeriodFilterTest.php | 7 +++--- .../Export/Filter/ActiveOnDateFilterTest.php | 7 +++--- .../ActiveOneDayBetweenDatesFilterTest.php | 7 +++--- .../Export/Filter/ActivityTypeFilterTest.php | 7 +++--- .../AdministrativeLocationFilterTest.php | 7 +++--- .../Export/Filter/BirthdayFilterTest.php | 7 +++--- .../Export/Filter/ClosingMotiveFilterTest.php | 7 +++--- .../Export/Filter/ConfidentialFilterTest.php | 7 +++--- .../Export/Filter/EmergencyFilterTest.php | 7 +++--- .../Export/Filter/EvaluationFilterTest.php | 7 +++--- .../Tests/Export/Filter/GenderFilterTest.php | 7 +++--- .../Filter/GeographicalUnitStatFilterTest.php | 7 +++--- .../Export/Filter/IntensityFilterTest.php | 7 +++--- .../Tests/Export/Filter/JobFilterTest.php | 7 +++--- .../Filter/OpenBetweenDatesFilterTest.php | 7 +++--- .../Tests/Export/Filter/OriginFilterTest.php | 7 +++--- .../Export/Filter/ReferrerFilterTest.php | 7 +++--- .../Export/Filter/RequestorFilterTest.php | 7 +++--- .../Tests/Export/Filter/ScopeFilterTest.php | 7 +++--- .../Export/Filter/SocialActionFilterTest.php | 7 +++--- .../Export/Filter/SocialIssueFilterTest.php | 7 +++--- .../Tests/Export/Filter/StepFilterTest.php | 7 +++--- .../Tests/Export/Filter/UserJobFilterTest.php | 7 +++--- .../Export/Filter/UserScopeFilterTest.php | 7 +++--- .../Tests/Form/Type/PickPersonTypeTest.php | 7 +++--- .../Tests/Household/MembersEditorTest.php | 7 +++--- .../Tests/Search/PersonSearchTest.php | 7 +++--- .../Authorization/PersonVoterTest.php | 7 +++--- ...AccompanyingPeriodDocGenNormalizerTest.php | 7 +++--- ...mpanyingPeriodWorkDocGenNormalizerTest.php | 7 +++--- ...ngPeriodWorkEvaluationDenormalizerTest.php | 7 +++--- .../Normalizer/HouseholdNormalizerTest.php | 7 +++--- .../Normalizer/PersonDocGenNormalizerTest.php | 7 +++--- .../Normalizer/PersonJsonNormalizerTest.php | 7 +++--- .../RelationshipDocGenNormalizerTest.php | 7 +++--- .../Normalizer/ResourceJsonNormalizerTest.php | 7 +++--- .../TimelineAccompanyingPeriodTest.php | 7 +++--- .../LocationValidityValidatorTest.php | 7 +++--- ...eholdMembershipSequentialValidatorTest.php | 7 +++--- .../Household/MaxHolderValidatorTest.php | 7 +++--- .../Person/BirthdateValidatorTest.php | 7 +++--- .../Person/PersonHasCenterValidatorTest.php | 7 +++--- .../Validator/Person/PersonValidationTest.php | 7 +++--- .../Workflows/AccompanyingPeriodLifecycle.php | 7 +++--- .../AbstractTimelineAccompanyingPeriod.php | 7 +++--- .../TimelineAccompanyingPeriodClosing.php | 7 +++--- .../TimelineAccompanyingPeriodOpening.php | 7 +++--- .../AccompanyingPeriodValidity.php | 7 +++--- .../AccompanyingPeriodValidityValidator.php | 7 +++--- .../ConfidentialCourseMustHaveReferrer.php | 7 +++--- ...dentialCourseMustHaveReferrerValidator.php | 7 +++--- .../AccompanyingPeriod/LocationValidity.php | 7 +++--- .../LocationValidityValidator.php | 7 +++--- .../ParticipationOverlap.php | 7 +++--- .../ParticipationOverlapValidator.php | 7 +++--- .../ResourceDuplicateCheck.php | 7 +++--- .../ResourceDuplicateCheckValidator.php | 7 +++--- .../HouseholdMembershipSequential.php | 7 +++--- ...HouseholdMembershipSequentialValidator.php | 7 +++--- .../Constraints/Household/MaxHolder.php | 7 +++--- .../Household/MaxHolderValidator.php | 7 +++--- .../Constraints/Person/Birthdate.php | 7 +++--- .../Constraints/Person/BirthdateValidator.php | 7 +++--- .../Constraints/Person/PersonHasCenter.php | 7 +++--- .../Person/PersonHasCenterValidator.php | 7 +++--- .../Relationship/RelationshipNoDuplicate.php | 7 +++--- .../RelationshipNoDuplicateValidator.php | 7 +++--- .../Widget/AddAPersonWidget.php | 7 +++--- .../Widget/PersonListWidget.php | 7 +++--- .../PersonFilteringInterface.php | 7 +++--- .../Widget/PersonListWidgetFactory.php | 7 +++--- ...dWorkEvaluationDocumentWorkflowHandler.php | 7 +++--- ...ingPeriodWorkEvaluationWorkflowHandler.php | 7 +++--- .../AccompanyingPeriodWorkWorkflowHandler.php | 7 +++--- .../migrations/Version20141129010948.php | 7 +++--- .../migrations/Version20150212173934.php | 7 +++--- .../migrations/Version20150607231010.php | 7 +++--- .../migrations/Version20150811152608.php | 7 +++--- .../migrations/Version20150812110708.php | 7 +++--- .../migrations/Version20150820113409.php | 7 +++--- .../migrations/Version20160310161006.php | 7 +++--- .../migrations/Version20160422000000.php | 7 +++--- .../migrations/Version20160818113633.php | 7 +++--- .../migrations/Version20160818151130.php | 7 +++--- .../migrations/Version20170117131924.php | 7 +++--- .../migrations/Version20180518144221.php | 7 +++--- .../migrations/Version20180820120000.php | 7 +++--- .../migrations/Version20181005140249.php | 7 +++--- .../migrations/Version20181023101621.php | 7 +++--- .../migrations/Version20190701124238.php | 7 +++--- .../migrations/Version20191106103452.php | 7 +++--- .../migrations/Version20200128084445.php | 7 +++--- .../migrations/Version20200130213446.php | 7 +++--- .../migrations/Version20200310090632.php | 7 +++--- .../migrations/Version20200422125935.php | 7 +++--- .../migrations/Version20210128152747.php | 7 +++--- .../migrations/Version20210318095831.php | 7 +++--- .../migrations/Version20210325141540.php | 7 +++--- .../migrations/Version20210326113045.php | 7 +++--- .../migrations/Version20210329090904.php | 7 +++--- .../migrations/Version20210329113152.php | 7 +++--- .../migrations/Version20210329144338.php | 7 +++--- .../migrations/Version20210330164922.php | 7 +++--- .../migrations/Version20210331084527.php | 7 +++--- .../migrations/Version20210419105054.php | 7 +++--- .../migrations/Version20210419105940.php | 7 +++--- .../migrations/Version20210419112619.php | 7 +++--- .../migrations/Version20210426145930.php | 7 +++--- .../migrations/Version20210427125700.php | 7 +++--- .../migrations/Version20210505093408.php | 7 +++--- .../migrations/Version20210505154316.php | 7 +++--- .../migrations/Version20210518075908.php | 7 +++--- .../migrations/Version20210518162439.php | 7 +++--- .../migrations/Version20210519204938.php | 7 +++--- .../migrations/Version20210525211214.php | 7 +++--- .../migrations/Version20210528092625.php | 7 +++--- .../migrations/Version20210528111624.php | 7 +++--- .../migrations/Version20210528132405.php | 7 +++--- .../migrations/Version20210528142121.php | 7 +++--- .../migrations/Version20210614191600.php | 7 +++--- .../migrations/Version20210615074857.php | 7 +++--- .../migrations/Version20210616102900.php | 7 +++--- .../migrations/Version20210617073504.php | 7 +++--- .../migrations/Version20210618080702.php | 7 +++--- .../migrations/Version20210620143757.php | 7 +++--- .../migrations/Version20210623135043.php | 7 +++--- .../migrations/Version20210623142046.php | 7 +++--- .../migrations/Version20210624131722.php | 7 +++--- .../migrations/Version20210624131723.php | 7 +++--- .../migrations/Version20210727152826.php | 7 +++--- .../migrations/Version20210729163023.php | 7 +++--- .../migrations/Version20210730094514.php | 7 +++--- .../migrations/Version20210730205407.php | 7 +++--- .../migrations/Version20210802202838.php | 7 +++--- .../migrations/Version20210820093927.php | 7 +++--- .../migrations/Version20210820100407.php | 7 +++--- .../migrations/Version20210831140339.php | 7 +++--- .../migrations/Version20210910161858.php | 7 +++--- .../migrations/Version20210915093624.php | 7 +++--- .../migrations/Version20211020131133.php | 7 +++--- .../migrations/Version20211021125359.php | 7 +++--- .../migrations/Version20211025141226.php | 7 +++--- .../migrations/Version20211029075117.php | 7 +++--- .../migrations/Version20211108100849.php | 7 +++--- .../migrations/Version20211112170027.php | 7 +++--- .../migrations/Version20211119211101.php | 7 +++--- .../migrations/Version20211119215630.php | 7 +++--- .../migrations/Version20211213150253.php | 7 +++--- .../migrations/Version20211213203147.php | 7 +++--- .../migrations/Version20211213213755.php | 7 +++--- .../migrations/Version20211216154008.php | 7 +++--- .../migrations/Version20211223150721.php | 7 +++--- .../migrations/Version20220104133334.php | 7 +++--- .../migrations/Version20220119091025.php | 7 +++--- .../migrations/Version20220119155944.php | 7 +++--- .../migrations/Version20220121121310.php | 7 +++--- .../migrations/Version20220128133039.php | 7 +++--- .../migrations/Version20220214200327.php | 7 +++--- .../migrations/Version20220215135509.php | 7 +++--- .../migrations/Version20220224145951.php | 7 +++--- .../migrations/Version20220303113855.php | 7 +++--- .../migrations/Version20220310063629.php | 7 +++--- .../migrations/Version20220310124318.php | 7 +++--- .../migrations/Version20220425000000.php | 7 +++--- .../migrations/Version20220427150431.php | 7 +++--- .../migrations/Version20220429133023.php | 7 +++--- .../migrations/Version20220527124737.php | 7 +++--- .../ChillReportBundle/ChillReportBundle.php | 7 +++--- .../Controller/ReportController.php | 7 +++--- .../DataFixtures/ORM/LoadCustomField.php | 7 +++--- .../ORM/LoadCustomFieldsGroup.php | 7 +++--- .../DataFixtures/ORM/LoadReportACL.php | 7 +++--- .../DataFixtures/ORM/LoadReports.php | 7 +++--- .../ChillReportExtension.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../ChillReportBundle/Entity/Report.php | 7 +++--- .../Export/Export/ReportList.php | 7 +++--- .../Export/Export/ReportListProvider.php | 7 +++--- .../Export/Filter/ReportDateFilter.php | 7 +++--- .../ChillReportBundle/Form/ReportType.php | 7 +++--- .../ChillReportBundle/Search/ReportSearch.php | 7 +++--- .../Security/Authorization/ReportVoter.php | 7 +++--- .../Controller/ReportControllerNextTest.php | 7 +++--- .../Tests/Controller/ReportControllerTest.php | 7 +++--- .../ChillReportExtensionTest.php | 7 +++--- .../Tests/Search/ReportSearchTest.php | 7 +++--- .../Authorization/ReportVoterTest.php | 7 +++--- .../Tests/Timeline/TimelineProviderTest.php | 7 +++--- .../Timeline/TimelineReportProvider.php | 7 +++--- .../migrations/Version20141129012050.php | 7 +++--- .../migrations/Version20150622233319.php | 7 +++--- .../ChillTaskBundle/ChillTaskBundle.php | 7 +++--- .../Controller/SingleTaskController.php | 7 +++--- .../Controller/TaskController.php | 7 +++--- .../DataFixtures/ORM/LoadTaskACL.php | 7 +++--- .../ChillTaskExtension.php | 7 +++--- .../TaskWorkflowDefinitionCompilerPass.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../ChillTaskBundle/Entity/AbstractTask.php | 7 +++--- .../ChillTaskBundle/Entity/RecurringTask.php | 7 +++--- .../ChillTaskBundle/Entity/SingleTask.php | 7 +++--- .../Entity/Task/AbstractTaskPlaceEvent.php | 7 +++--- .../Entity/Task/SingleTaskPlaceEvent.php | 7 +++--- .../Event/Lifecycle/TaskLifecycleEvent.php | 7 +++--- .../ChillTaskBundle/Event/TaskEvent.php | 7 +++--- .../ChillTaskBundle/Event/UI/UIEvent.php | 7 +++--- .../Form/SingleTaskListType.php | 7 +++--- .../ChillTaskBundle/Form/SingleTaskType.php | 7 +++--- .../ChillTaskBundle/Menu/MenuBuilder.php | 7 +++--- .../Menu/SectionMenuBuilder.php | 7 +++--- .../ChillTaskBundle/Menu/UserMenuBuilder.php | 7 +++--- .../Repository/AbstractTaskRepository.php | 7 +++--- .../Repository/RecurringTaskRepository.php | 7 +++--- .../SingleTaskAclAwareRepository.php | 7 +++--- .../SingleTaskAclAwareRepositoryInterface.php | 7 +++--- .../Repository/SingleTaskRepository.php | 7 +++--- .../Authorization/AuthorizationEvent.php | 7 +++--- .../Security/Authorization/TaskVoter.php | 7 +++--- .../Templating/TaskTwigExtension.php | 7 +++--- .../Templating/UI/CountNotificationTask.php | 7 +++--- .../Controller/SingleTaskControllerTest.php | 7 +++--- .../Tests/Controller/TaskControllerTest.php | 7 +++--- ...TaskTaskLifeCycleEventTimelineProvider.php | 7 +++--- .../TaskLifeCycleEventTimelineProvider.php | 7 +++--- .../Definition/DefaultTaskDefinition.php | 7 +++--- .../Workflow/Event/DefaultTaskGuardEvent.php | 7 +++--- .../Workflow/TaskWorkflowDefinition.php | 7 +++--- .../Workflow/TaskWorkflowManager.php | 7 +++--- .../migrations/Version20180413135614.php | 7 +++--- .../migrations/Version20180413201023.php | 7 +++--- .../migrations/Version20180426093011.php | 7 +++--- .../migrations/Version20180502194119.php | 7 +++--- .../migrations/Version20181113161925.php | 7 +++--- .../migrations/Version20181113164108.php | 7 +++--- .../migrations/Version20210909153533.php | 7 +++--- .../migrations/Version20211029213909.php | 7 +++--- .../ChillThirdPartyBundle.php | 7 +++--- .../Controller/AdminController.php | 7 +++--- .../ThirdPartyCategoryController.php | 7 +++--- .../Controller/ThirdPartyController.php | 7 +++--- .../DataFixtures/ORM/LoadThirdParty.php | 7 +++--- .../ORM/LoadThirdPartyCategory.php | 7 +++--- .../ORM/LoadThirdPartyProfession.php | 7 +++--- .../ChillThirdPartyExtension.php | 7 +++--- .../ThirdPartyTypeCompilerPass.php | 7 +++--- .../DependencyInjection/Configuration.php | 7 +++--- .../Entity/ThirdParty.php | 7 +++--- .../Entity/ThirdPartyCategory.php | 7 +++--- .../Entity/ThirdPartyProfession.php | 7 +++--- .../EventListener/ThirdPartyEventListener.php | 7 +++--- .../ChoiceLoader/ThirdPartyChoiceLoader.php | 7 +++--- .../Form/ThirdPartyCategoryType.php | 7 +++--- .../Form/ThirdPartyType.php | 7 +++--- .../Form/Type/PickThirdPartyType.php | 7 +++--- .../Type/PickThirdPartyTypeCategoryType.php | 7 +++--- .../Form/Type/PickThirdpartyDynamicType.php | 7 +++--- .../Menu/AdminMenuBuilder.php | 7 +++--- .../Menu/MenuBuilder.php | 7 +++--- .../ThirdPartyACLAwareRepository.php | 7 +++--- .../ThirdPartyACLAwareRepositoryInterface.php | 7 +++--- .../ThirdPartyCategoryRepository.php | 7 +++--- .../ThirdPartyProfessionRepository.php | 7 +++--- .../Repository/ThirdPartyRepository.php | 7 +++--- .../Search/ThirdPartyApiSearch.php | 7 +++--- .../Search/ThirdPartySearch.php | 7 +++--- .../Security/Voter/ThirdPartyVoter.php | 7 +++--- .../Normalizer/ThirdPartyNormalizer.php | 7 +++--- .../Templating/Entity/ThirdPartyRender.php | 7 +++--- .../Controller/ThirdPartyControllerTest.php | 7 +++--- .../Tests/Entity/ThirdPartyTest.php | 7 +++--- .../ThirdPartyDocGenNormalizerTest.php | 7 +++--- .../ThirdPartyJsonDenormalizerTest.php | 7 +++--- .../ThirdPartyType/ThirdPartyTypeManager.php | 7 +++--- .../ThirdPartyTypeProviderInterface.php | 7 +++--- .../migrations/Version20190307111314.php | 7 +++--- .../migrations/Version20190307131650.php | 7 +++--- .../migrations/Version20190418090842.php | 7 +++--- .../migrations/Version20190429171109.php | 7 +++--- .../migrations/Version20190502144206.php | 7 +++--- .../migrations/Version20210525211216.php | 7 +++--- .../migrations/Version20210719105918.php | 7 +++--- .../migrations/Version20211006200924.php | 7 +++--- .../migrations/Version20211007150459.php | 7 +++--- .../migrations/Version20211007165001.php | 7 +++--- .../migrations/Version20211007194942.php | 7 +++--- .../migrations/Version20220302143821.php | 7 +++--- .../migrations/Version20220322095659.php | 7 +++--- .../migrations/Version20220324175549.php | 7 +++--- .../ChillWopiBundle/src/ChillWopiBundle.php | 7 +++--- .../ChillWopiBundle/src/Controller/Editor.php | 7 +++--- .../ChillWopiExtension.php | 7 +++--- .../src/DependencyInjection/Configuration.php | 7 +++--- .../src/Resources/config/routes/routes.php | 7 +++--- .../src/Resources/config/services.php | 7 +++--- .../src/Service/Controller/Responder.php | 7 +++--- .../Service/Controller/ResponderInterface.php | 7 +++--- .../Service/Wopi/ChillDocumentLockManager.php | 7 +++--- .../src/Service/Wopi/ChillDocumentManager.php | 7 +++--- .../src/Service/Wopi/ChillWopi.php | 7 +++--- .../Wopi/ChillDocumentLockManagerTest.php | 7 +++--- 1619 files changed, 6476 insertions(+), 4891 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php index 21245504f..5c6a7f5d6 100644 --- a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php +++ b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php @@ -1,14 +1,15 @@ expr()->orX( $qb->expr()->andX( - $qb->expr()->isNull('person.deathdate'), - $qb->expr()->lte( - 'person.birthdate', - ':date_calc' - ) - ), + $qb->expr()->isNull('person.deathdate'), + $qb->expr()->lte( + 'person.birthdate', + ':date_calc' + ) + ), $qb->expr()->andX( $qb->expr()->isNotNull('person.deathdate'), $qb->expr()->gt( diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php index e955a33b9..7087919d5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php @@ -1,14 +1,15 @@ , - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. */ namespace Chill\PersonBundle\Repository\SocialWork; diff --git a/src/Bundle/ChillPersonBundle/Search/PersonSearch.php b/src/Bundle/ChillPersonBundle/Search/PersonSearch.php index 9b18ae244..f1bbae644 100644 --- a/src/Bundle/ChillPersonBundle/Search/PersonSearch.php +++ b/src/Bundle/ChillPersonBundle/Search/PersonSearch.php @@ -1,14 +1,15 @@ Date: Wed, 5 Oct 2022 16:55:52 +0200 Subject: [PATCH 06/13] fix cs for doc [ci-skip] --- .php_cs.dist.php | 10 ++++++++-- docs/source/_static/code/exports/BirthdateFilter.php | 9 ++++++++- docs/source/_static/code/exports/CountPerson.php | 9 ++++++++- docs/source/development/pagination/example.php | 9 ++++++++- .../useful-snippets/controller-secured-for-person.php | 9 ++++++++- .../user-interface/widgets/ChillMainConfiguration.php | 9 ++++++++- .../user-interface/widgets/ChillMainExtension.php | 9 ++++++++- .../widgets/ChillPersonAddAPersonListWidgetFactory.php | 9 ++++++++- .../widgets/ChillPersonAddAPersonWidget.php | 9 ++++++++- .../user-interface/widgets/ChillPersonExtension.php | 9 ++++++++- 10 files changed, 80 insertions(+), 11 deletions(-) diff --git a/.php_cs.dist.php b/.php_cs.dist.php index 4ad5af914..843d215ff 100644 --- a/.php_cs.dist.php +++ b/.php_cs.dist.php @@ -1,7 +1,7 @@ Date: Thu, 6 Oct 2022 08:54:23 +0200 Subject: [PATCH 07/13] fix cs: too much line before declaring strict type --- .../ChillActivityBundle/Controller/ActivityController.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityType.php | 1 - .../Aggregator/ACPAggregators/BySocialActionAggregator.php | 1 - .../Aggregator/ACPAggregators/BySocialIssueAggregator.php | 1 - .../Aggregator/ACPAggregators/ByThirdpartyAggregator.php | 1 - .../Export/Aggregator/ACPAggregators/ByUserAggregator.php | 1 - .../Export/Aggregator/ACPAggregators/DateAggregator.php | 1 - .../Aggregator/ACPAggregators/LocationTypeAggregator.php | 1 - .../Aggregator/ACPAggregators/UserScopeAggregator.php | 1 - .../Export/Aggregator/ActivityTypeAggregator.php | 1 - .../Export/Aggregator/ActivityUserAggregator.php | 1 - .../PersonAggregators/ActivityReasonAggregator.php | 1 - .../Export/Export/LinkedToACP/AvgActivityDuration.php | 1 - .../Export/Export/LinkedToACP/AvgActivityVisitDuration.php | 1 - .../Export/Export/LinkedToACP/CountActivity.php | 1 - .../Export/Export/LinkedToACP/SumActivityDuration.php | 1 - .../Export/Export/LinkedToACP/SumActivityVisitDuration.php | 1 - .../Export/Export/LinkedToPerson/CountActivity.php | 1 - .../Export/Export/LinkedToPerson/ListActivity.php | 1 - .../Export/Export/LinkedToPerson/StatActivityDuration.php | 1 - .../Export/Filter/ACPFilters/BySocialActionFilter.php | 1 - .../Export/Filter/ACPFilters/BySocialIssueFilter.php | 1 - .../Export/Filter/ACPFilters/ByUserFilter.php | 1 - .../Export/Filter/ACPFilters/EmergencyFilter.php | 1 - .../Export/Filter/ACPFilters/LocationTypeFilter.php | 1 - .../Export/Filter/ACPFilters/SentReceivedFilter.php | 1 - .../Export/Filter/ACPFilters/UserFilter.php | 1 - .../Export/Filter/ACPFilters/UserScopeFilter.php | 1 - .../Export/Filter/ActivityDateFilter.php | 1 - .../Export/Filter/ActivityTypeFilter.php | 1 - .../Export/Filter/PersonFilters/ActivityReasonFilter.php | 1 - .../PersonHavingActivityBetweenDateFilter.php | 1 - .../Form/Type/TranslatableActivityType.php | 1 - .../Repository/ActivityTypeRepository.php | 1 - .../Security/Authorization/ActivityStatsVoter.php | 1 - .../Tests/Export/Aggregator/ActivityTypeAggregatorTest.php | 1 - .../Tests/Export/Aggregator/ActivityUserAggregatorTest.php | 1 - .../Tests/Export/Filter/ActivityReasonFilterTest.php | 1 - .../Filter/PersonHavingActivityBetweenDateFilterTest.php | 1 - .../Export/Aggregator/AgentAggregator.php | 1 - .../Export/Aggregator/CancelReasonAggregator.php | 1 - .../Export/Aggregator/JobAggregator.php | 1 - .../Export/Aggregator/LocationAggregator.php | 1 - .../Export/Aggregator/LocationTypeAggregator.php | 1 - .../Export/Aggregator/MonthYearAggregator.php | 1 - .../Export/Aggregator/ScopeAggregator.php | 1 - .../Export/Export/CountAppointments.php | 1 - .../Export/Export/StatAppointmentAvgDuration.php | 1 - .../Export/Export/StatAppointmentSumDuration.php | 1 - .../ChillCalendarBundle/Export/Filter/AgentFilter.php | 1 - .../Export/Filter/BetweenDatesFilter.php | 1 - src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php | 1 - .../ChillCalendarBundle/Export/Filter/ScopeFilter.php | 1 - src/Bundle/ChillMainBundle/Controller/ExportController.php | 1 - src/Bundle/ChillMainBundle/Entity/GeographicalUnit.php | 1 - src/Bundle/ChillMainBundle/Export/ExportInterface.php | 1 - src/Bundle/ChillMainBundle/Export/ExportManager.php | 1 - .../Export/Formatter/SpreadSheetFormatter.php | 1 - src/Bundle/ChillMainBundle/Export/ModifierInterface.php | 1 - .../ChillMainBundle/Form/Type/Export/PickCenterType.php | 1 - src/Bundle/ChillMainBundle/Repository/CenterRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/ScopeRepository.php | 1 - .../Security/Authorization/ChillExportVoter.php | 1 - src/Bundle/ChillMainBundle/Test/ProphecyTrait.php | 1 - src/Bundle/ChillPersonBundle/Entity/Person.php | 1 - .../Export/AbstractAccompanyingPeriodExportElement.php | 1 - .../AdministrativeLocationAggregator.php | 1 - .../ClosingMotiveAggregator.php | 1 - .../ConfidentialAggregator.php | 1 - .../AccompanyingCourseAggregators/DurationAggregator.php | 1 - .../AccompanyingCourseAggregators/EmergencyAggregator.php | 1 - .../AccompanyingCourseAggregators/EvaluationAggregator.php | 1 - .../AccompanyingCourseAggregators/IntensityAggregator.php | 1 - .../AccompanyingCourseAggregators/JobAggregator.php | 1 - .../AccompanyingCourseAggregators/OriginAggregator.php | 1 - .../AccompanyingCourseAggregators/ReferrerAggregator.php | 1 - .../AccompanyingCourseAggregators/ScopeAggregator.php | 1 - .../SocialActionAggregator.php | 1 - .../SocialIssueAggregator.php | 1 - .../AccompanyingCourseAggregators/StepAggregator.php | 1 - .../EvaluationAggregators/EvaluationTypeAggregator.php | 1 - .../HouseholdAggregators/ChildrenNumberAggregator.php | 1 - .../HouseholdAggregators/CompositionAggregator.php | 1 - .../Export/Aggregator/PersonAggregators/AgeAggregator.php | 1 - .../PersonAggregators/CountryOfBirthAggregator.php | 1 - .../Aggregator/PersonAggregators/GenderAggregator.php | 1 - .../PersonAggregators/HouseholdPositionAggregator.php | 1 - .../PersonAggregators/MaritalStatusAggregator.php | 1 - .../Aggregator/PersonAggregators/NationalityAggregator.php | 1 - .../SocialWorkAggregators/ActionTypeAggregator.php | 1 - .../Aggregator/SocialWorkAggregators/GoalAggregator.php | 1 - .../Aggregator/SocialWorkAggregators/JobAggregator.php | 1 - .../SocialWorkAggregators/ReferrerAggregator.php | 1 - .../Aggregator/SocialWorkAggregators/ResultAggregator.php | 1 - .../Aggregator/SocialWorkAggregators/ScopeAggregator.php | 1 - .../Export/Export/CountAccompanyingCourse.php | 1 - .../ChillPersonBundle/Export/Export/CountEvaluation.php | 1 - .../ChillPersonBundle/Export/Export/CountHousehold.php | 1 - src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php | 1 - .../Export/Export/CountPersonWithAccompanyingCourse.php | 1 - .../Export/Export/CountSocialWorkActions.php | 1 - src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php | 1 - .../Export/Export/ListPersonDuplicate.php | 1 - .../Export/Export/StatAccompanyingCourseDuration.php | 1 - .../AccompanyingCourseFilters/ActiveOnDateFilter.php | 1 - .../ActiveOneDayBetweenDatesFilter.php | 1 - .../AdministrativeLocationFilter.php | 1 - .../AccompanyingCourseFilters/ClosingMotiveFilter.php | 1 - .../AccompanyingCourseFilters/ConfidentialFilter.php | 1 - .../AccompanyingCourseFilters/CurrentUserJobFilter.php | 1 - .../AccompanyingCourseFilters/CurrentUserScopeFilter.php | 1 - .../Filter/AccompanyingCourseFilters/EmergencyFilter.php | 1 - .../Filter/AccompanyingCourseFilters/EvaluationFilter.php | 1 - .../GeographicalUnitStatFilter.php | 1 - .../Filter/AccompanyingCourseFilters/IntensityFilter.php | 1 - .../AccompanyingCourseFilters/OpenBetweenDatesFilter.php | 1 - .../Filter/AccompanyingCourseFilters/OriginFilter.php | 1 - .../Filter/AccompanyingCourseFilters/ReferrerFilter.php | 1 - .../Filter/AccompanyingCourseFilters/RequestorFilter.php | 1 - .../AccompanyingCourseFilters/SocialActionFilter.php | 1 - .../Filter/AccompanyingCourseFilters/SocialIssueFilter.php | 1 - .../Export/Filter/AccompanyingCourseFilters/StepFilter.php | 1 - .../Filter/EvaluationFilters/EvaluationTypeFilter.php | 1 - .../Export/Filter/EvaluationFilters/MaxDateFilter.php | 1 - .../Export/Filter/HouseholdFilters/CompositionFilter.php | 1 - .../PersonFilters/AccompanyingPeriodClosingFilter.php | 1 - .../Filter/PersonFilters/AccompanyingPeriodFilter.php | 1 - .../PersonFilters/AccompanyingPeriodOpeningFilter.php | 1 - .../Export/Filter/PersonFilters/AgeFilter.php | 1 - .../Export/Filter/PersonFilters/BirthdateFilter.php | 1 - .../Export/Filter/PersonFilters/DeadOrAliveFilter.php | 7 +++---- .../Export/Filter/PersonFilters/DeathdateFilter.php | 1 - .../Export/Filter/PersonFilters/GenderFilter.php | 1 - .../Export/Filter/PersonFilters/NationalityFilter.php | 1 - .../PersonFilters/ResidentialAddressAtThirdpartyFilter.php | 1 - .../PersonFilters/ResidentialAddressAtUserFilter.php | 1 - .../Export/Filter/SocialWorkFilters/JobFilter.php | 1 - .../Export/Filter/SocialWorkFilters/ReferrerFilter.php | 1 - .../Export/Filter/SocialWorkFilters/ScopeFilter.php | 1 - .../Filter/SocialWorkFilters/SocialWorkTypeFilter.php | 1 - .../AccompanyingPeriod/ClosingMotiveRepository.php | 1 - .../Repository/PersonACLAwareRepository.php | 1 - .../Security/Authorization/AccompanyingPeriodVoter.php | 1 - .../Security/Authorization/HouseholdVoter.php | 1 - src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php | 1 - .../Tests/Export/Export/ListPersonTest.php | 1 - src/Bundle/ChillReportBundle/Export/Export/ReportList.php | 1 - .../ChillReportBundle/Export/Filter/ReportDateFilter.php | 1 - .../Repository/SingleTaskAclAwareRepository.php | 1 - 149 files changed, 3 insertions(+), 152 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index b7137ef90..c7908fcaf 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -1,6 +1,5 @@ expr()->andX( $qb->expr()->isNull('person.deathdate'), $qb->expr()->lte( - 'person.birthdate', - ':date_calc' - ) + 'person.birthdate', + ':date_calc' + ) ), $qb->expr()->andX( $qb->expr()->isNotNull('person.deathdate'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php index 7087919d5..31a2b0a64 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php @@ -1,6 +1,5 @@ Date: Thu, 6 Oct 2022 20:51:44 +0200 Subject: [PATCH 08/13] fix cs: declare type and license header mismatch --- src/Bundle/ChillActivityBundle/ChillActivityBundle.php | 1 - .../Controller/ActivityReasonCategoryController.php | 1 - .../ChillActivityBundle/Controller/ActivityReasonController.php | 1 - .../Controller/AdminActivityPresenceController.php | 1 - .../Controller/AdminActivityTypeCategoryController.php | 1 - .../Controller/AdminActivityTypeController.php | 1 - src/Bundle/ChillActivityBundle/Controller/AdminController.php | 1 - src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php | 1 - .../DataFixtures/ORM/LoadActivityNotifications.php | 1 - .../ChillActivityBundle/DataFixtures/ORM/LoadActivityReason.php | 1 - .../DataFixtures/ORM/LoadActivityReasonCategory.php | 1 - .../ChillActivityBundle/DataFixtures/ORM/LoadActivityType.php | 1 - .../DataFixtures/ORM/LoadActivityTypeCategory.php | 1 - .../ChillActivityBundle/DataFixtures/ORM/LoadActivitytACL.php | 1 - .../DependencyInjection/ChillActivityExtension.php | 1 - .../ChillActivityBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillActivityBundle/Entity/Activity.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityPresence.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityReason.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityTypeCategory.php | 1 - .../EntityListener/ActivityEntityListener.php | 1 - src/Bundle/ChillActivityBundle/Export/Declarations.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php | 1 - .../ChillActivityBundle/Form/ActivityReasonCategoryType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityTypeCategoryType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php | 1 - .../ChillActivityBundle/Form/Type/ActivityFieldPresence.php | 1 - .../ChillActivityBundle/Form/Type/TranslatableActivityReason.php | 1 - .../Form/Type/TranslatableActivityReasonCategory.php | 1 - .../ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php | 1 - src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php | 1 - .../Notification/ActivityNotificationHandler.php | 1 - .../Repository/ActivityACLAwareRepository.php | 1 - .../Repository/ActivityACLAwareRepositoryInterface.php | 1 - .../Repository/ActivityReasonCategoryRepository.php | 1 - .../ChillActivityBundle/Repository/ActivityReasonRepository.php | 1 - src/Bundle/ChillActivityBundle/Repository/ActivityRepository.php | 1 - .../Repository/ActivityTypeCategoryRepository.php | 1 - .../ChillActivityBundle/Security/Authorization/ActivityVoter.php | 1 - .../ChillActivityBundle/Service/DocGenerator/ActivityContext.php | 1 - .../DocGenerator/ListActivitiesByAccompanyingPeriodContext.php | 1 - .../Templating/Entity/ActivityReasonRender.php | 1 - src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php | 1 - .../Tests/Controller/ActivityControllerTest.php | 1 - .../Tests/Controller/ActivityReasonCategoryControllerTest.php | 1 - .../Tests/Controller/ActivityReasonControllerTest.php | 1 - .../Tests/Controller/ActivityTypeControllerTest.php | 1 - src/Bundle/ChillActivityBundle/Tests/Entity/ActivityTest.php | 1 - .../Tests/Export/Aggregator/ActivityReasonAggregatorTest.php | 1 - .../Tests/Export/Export/CountActivityTest.php | 1 - .../ChillActivityBundle/Tests/Export/Export/ListActivityTest.php | 1 - .../Tests/Export/Export/StatActivityDurationSumTest.php | 1 - src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php | 1 - .../Tests/Form/Type/TranslatableActivityReasonTest.php | 1 - .../Tests/Form/Type/TranslatableActivityTypeTest.php | 1 - .../Tests/Security/Authorization/ActivityVoterTest.php | 1 - .../ChillActivityBundle/Tests/Timeline/TimelineProviderTest.php | 1 - .../ChillActivityBundle/Timeline/TimelineActivityProvider.php | 1 - .../Validator/Constraints/ActivityValidity.php | 1 - .../Validator/Constraints/ActivityValidityValidator.php | 1 - .../ChillActivityBundle/migrations/Version20150701091248.php | 1 - .../ChillActivityBundle/migrations/Version20150702093317.php | 1 - .../ChillActivityBundle/migrations/Version20150704091347.php | 1 - .../ChillActivityBundle/migrations/Version20160222103457.php | 1 - .../ChillActivityBundle/migrations/Version20161114085659.php | 1 - .../ChillActivityBundle/migrations/Version20210304154629.php | 1 - .../ChillActivityBundle/migrations/Version20210311114250.php | 1 - .../ChillActivityBundle/migrations/Version20210401090853.php | 1 - .../ChillActivityBundle/migrations/Version20210408122329.php | 1 - .../ChillActivityBundle/migrations/Version20210415113216.php | 1 - .../ChillActivityBundle/migrations/Version20210422073711.php | 1 - .../ChillActivityBundle/migrations/Version20210422123846.php | 1 - .../ChillActivityBundle/migrations/Version20210506071150.php | 1 - .../ChillActivityBundle/migrations/Version20210506090417.php | 1 - .../ChillActivityBundle/migrations/Version20210506094520.php | 1 - .../ChillActivityBundle/migrations/Version20210506112500.php | 1 - .../ChillActivityBundle/migrations/Version20210520095626.php | 1 - .../ChillActivityBundle/migrations/Version20210528161250.php | 1 - .../ChillActivityBundle/migrations/Version20210602103243.php | 1 - .../ChillActivityBundle/migrations/Version20211119173555.php | 1 - .../ChillActivityBundle/migrations/Version20211207152023.php | 1 - .../ChillActivityBundle/migrations/Version20220425133027.php | 1 - .../ChillActivityBundle/migrations/Version20220527124438.php | 1 - .../ChillAsideActivityBundle/src/ChillAsideActivityBundle.php | 1 - .../ChillAsideActivityBundle/src/Controller/AdminController.php | 1 - .../src/Controller/AsideActivityCategoryController.php | 1 - .../src/Controller/AsideActivityController.php | 1 - .../src/DataFixtures/ORM/LoadAsideActivity.php | 1 - .../src/DataFixtures/ORM/LoadAsideActivityCategory.php | 1 - .../src/DependencyInjection/ChillAsideActivityExtension.php | 1 - .../src/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php | 1 - .../src/Entity/AsideActivityCategory.php | 1 - .../src/Form/AsideActivityCategoryType.php | 1 - .../ChillAsideActivityBundle/src/Form/AsideActivityFormType.php | 1 - .../ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php | 1 - .../ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php | 1 - src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php | 1 - .../src/Repository/AsideActivityCategoryRepository.php | 1 - .../src/Repository/AsideActivityRepository.php | 1 - .../src/Templating/Entity/CategoryRender.php | 1 - .../src/Tests/Controller/AsideActivityControllerTest.php | 1 - .../src/migrations/Version20210706124644.php | 1 - .../src/migrations/Version20210804082249.php | 1 - .../src/migrations/Version20210806140343.php | 1 - .../src/migrations/Version20210806140710.php | 1 - .../src/migrations/Version20210810084456.php | 1 - .../src/migrations/Version20210922182907.php | 1 - .../src/migrations/Version20211004134012.php | 1 - src/Bundle/ChillBudgetBundle/Calculator/CalculatorInterface.php | 1 - src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php | 1 - src/Bundle/ChillBudgetBundle/Calculator/CalculatorResult.php | 1 - src/Bundle/ChillBudgetBundle/ChillBudgetBundle.php | 1 - src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php | 1 - .../ChillBudgetBundle/Controller/AbstractElementController.php | 1 - src/Bundle/ChillBudgetBundle/Controller/ChargeController.php | 1 - src/Bundle/ChillBudgetBundle/Controller/ElementController.php | 1 - src/Bundle/ChillBudgetBundle/Controller/ResourceController.php | 1 - .../DependencyInjection/ChillBudgetExtension.php | 1 - .../DependencyInjection/Compiler/CalculatorCompilerPass.php | 1 - .../ChillBudgetBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php | 1 - src/Bundle/ChillBudgetBundle/Entity/Charge.php | 1 - src/Bundle/ChillBudgetBundle/Entity/Resource.php | 1 - src/Bundle/ChillBudgetBundle/Form/ChargeType.php | 1 - src/Bundle/ChillBudgetBundle/Form/ResourceType.php | 1 - src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php | 1 - src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php | 1 - src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php | 1 - src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php | 1 - .../Security/Authorization/BudgetElementVoter.php | 1 - src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php | 1 - .../ChillBudgetBundle/Service/Summary/SummaryBudgetInterface.php | 1 - src/Bundle/ChillBudgetBundle/Templating/Twig.php | 1 - .../ChillBudgetBundle/Tests/Controller/ElementControllerTest.php | 1 - .../ChillBudgetBundle/migrations/Version20180522080432.php | 1 - .../ChillBudgetBundle/migrations/Version20181219145631.php | 1 - .../ChillBudgetBundle/migrations/Version20220224090319.php | 1 - src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php | 1 - src/Bundle/ChillCalendarBundle/Controller/AdminController.php | 1 - .../ChillCalendarBundle/Controller/CalendarAPIController.php | 1 - src/Bundle/ChillCalendarBundle/Controller/CalendarController.php | 1 - .../Controller/CalendarRangeAPIController.php | 1 - .../ChillCalendarBundle/Controller/CancelReasonController.php | 1 - .../ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php | 1 - .../ChillCalendarBundle/DataFixtures/ORM/LoadCancelReason.php | 1 - src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php | 1 - .../DependencyInjection/ChillCalendarExtension.php | 1 - .../ChillCalendarBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillCalendarBundle/Entity/Calendar.php | 1 - src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php | 1 - src/Bundle/ChillCalendarBundle/Entity/CancelReason.php | 1 - src/Bundle/ChillCalendarBundle/Entity/Invite.php | 1 - src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php | 1 - src/Bundle/ChillCalendarBundle/Export/Declarations.php | 1 - src/Bundle/ChillCalendarBundle/Form/CalendarType.php | 1 - src/Bundle/ChillCalendarBundle/Form/CancelReasonType.php | 1 - .../ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php | 1 - src/Bundle/ChillCalendarBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php | 1 - .../ChillCalendarBundle/Repository/CalendarRangeRepository.php | 1 - src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php | 1 - .../ChillCalendarBundle/Repository/CancelReasonRepository.php | 1 - src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php | 1 - .../Tests/Controller/CalendarControllerTest.php | 1 - .../ChillCalendarBundle/migrations/Version20210715141731.php | 1 - .../ChillCalendarBundle/migrations/Version20210723074557.php | 1 - .../ChillCalendarBundle/migrations/Version20210723142003.php | 1 - .../ChillCalendarBundle/migrations/Version20210723142842.php | 1 - .../ChillCalendarBundle/migrations/Version20211119173557.php | 1 - .../ChillCalendarBundle/migrations/Version20220527124558.php | 1 - .../ChillCalendarBundle/migrations/Version20220527234046.php | 1 - src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php | 1 - .../Command/CreateFieldsOnGroupCommand.php | 1 - .../ChillCustomFieldsBundle/Controller/AdminController.php | 1 - .../ChillCustomFieldsBundle/Controller/CustomFieldController.php | 1 - .../Controller/CustomFieldsGroupController.php | 1 - .../ChillCustomFieldsBundle/CustomFields/AbstractCustomField.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php | 1 - .../CustomFields/CustomFieldInterface.php | 1 - .../CustomFields/CustomFieldLongChoice.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldText.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php | 1 - .../ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php | 1 - .../DependencyInjection/ChillCustomFieldsExtension.php | 1 - .../DependencyInjection/Configuration.php | 1 - .../DependencyInjection/CustomFieldCompilerPass.php | 1 - src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php | 1 - .../Entity/CustomFieldLongChoice/Option.php | 1 - .../ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php | 1 - src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php | 1 - .../EntityRepository/CustomFieldLongChoice/OptionRepository.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php | 1 - .../ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php | 1 - .../Form/DataTransformer/CustomFieldDataTransformer.php | 1 - .../Form/DataTransformer/CustomFieldsGroupToIdTransformer.php | 1 - .../Form/DataTransformer/JsonCustomFieldToArrayTransformer.php | 1 - .../ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php | 1 - .../Form/Extension/PostTextIntegerExtension.php | 1 - .../Form/Extension/PostTextNumberExtension.php | 1 - .../ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php | 1 - .../ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php | 1 - .../ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php | 1 - .../ChillCustomFieldsBundle/Service/CustomFieldProvider.php | 1 - .../ChillCustomFieldsBundle/Service/CustomFieldsHelper.php | 1 - .../Service/CustomFieldsHelperException.php | 1 - .../Templating/Twig/CustomFieldRenderingTwig.php | 1 - .../Templating/Twig/CustomFieldsGroupRenderingTwig.php | 1 - .../Tests/Config/ConfigCustomizablesEntitiesTest.php | 1 - .../Tests/Controller/CustomFieldControllerTest_TODO.php | 1 - .../Tests/Controller/CustomFieldsGroupControllerTest.php | 1 - .../ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php | 1 - .../Tests/CustomFields/CustomFieldsChoiceTest.php | 1 - .../Tests/CustomFields/CustomFieldsNumberTest.php | 1 - .../Tests/CustomFields/CustomFieldsTextTest.php | 1 - .../Tests/Form/Extension/PostTextIntegerExtensionTest.php | 1 - .../Tests/Form/Extension/PostTextNumberExtensionTest.php | 1 - .../ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php | 1 - .../Tests/Service/CustomFieldsHelperTest.php | 1 - .../Tests/Templating/Twig/CustomFieldRenderingTwigTest.php | 1 - .../Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20141128195430.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20150224164531.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20151210155904.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20151210205610.php | 1 - src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php | 1 - src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php | 1 - .../ChillDocGeneratorBundle/Context/ContextManagerInterface.php | 1 - .../Context/DocGeneratorContextInterface.php | 1 - .../Context/DocGeneratorContextWithAdminFormInterface.php | 1 - .../Context/DocGeneratorContextWithPublicFormInterface.php | 1 - .../Context/Exception/ContextNotFoundException.php | 1 - .../Context/Exception/UnexpectedTypeException.php | 1 - .../Controller/AdminDocGeneratorTemplateController.php | 1 - .../Controller/DocGeneratorTemplateController.php | 1 - .../DataFixtures/ORM/LoadDocGeneratorTemplate.php | 1 - .../DependencyInjection/ChillDocGeneratorExtension.php | 1 - .../DependencyInjection/Configuration.php | 1 - .../ChillDocGeneratorBundle/Entity/DocGeneratorTemplate.php | 1 - .../ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php | 1 - .../ChillDocGeneratorBundle/GeneratorDriver/DriverInterface.php | 1 - .../GeneratorDriver/Exception/TemplateException.php | 1 - .../ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php | 1 - src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php | 1 - .../Repository/DocGeneratorTemplateRepository.php | 1 - .../ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php | 1 - .../Serializer/Helper/NormalizeNullValueHelper.php | 1 - .../Serializer/Normalizer/CollectionDocGenNormalizer.php | 1 - .../Serializer/Normalizer/DocGenObjectNormalizer.php | 1 - .../ChillDocGeneratorBundle/Service/Context/BaseContextData.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20210805162522.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20210812214310.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20211103111010.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20211119173556.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20211201191757.php | 1 - .../tests/Serializer/Encoder/DocGenEncoderTest.php | 1 - .../tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php | 1 - .../tests/Service/Context/BaseContextDataTest.php | 1 - src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php | 1 - src/Bundle/ChillDocStoreBundle/Controller/AdminController.php | 1 - .../Controller/DocumentAccompanyingCourseController.php | 1 - .../Controller/DocumentCategoryController.php | 1 - .../ChillDocStoreBundle/Controller/DocumentPersonController.php | 1 - .../ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentACL.php | 1 - .../DataFixtures/ORM/LoadDocumentCategory.php | 1 - .../DependencyInjection/ChillDocStoreExtension.php | 1 - .../ChillDocStoreBundle/DependencyInjection/Configuration.php | 1 - .../ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/Document.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php | 1 - .../EntityRepository/AccompanyingCourseDocumentRepository.php | 1 - .../Exception/StoredObjectManagerException.php | 1 - .../ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php | 1 - src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php | 1 - src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php | 1 - src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php | 1 - src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php | 1 - .../ChillDocStoreBundle/Object/ObjectToAsyncFileTransformer.php | 1 - src/Bundle/ChillDocStoreBundle/Object/PersistenceChecker.php | 1 - .../Repository/AccompanyingCourseDocumentRepository.php | 1 - .../Repository/DocumentCategoryRepository.php | 1 - .../Repository/PersonDocumentACLAwareRepository.php | 1 - .../Repository/PersonDocumentACLAwareRepositoryInterface.php | 1 - .../ChillDocStoreBundle/Repository/StoredObjectRepository.php | 1 - .../Security/Authorization/AccompanyingCourseDocumentVoter.php | 1 - .../Security/Authorization/PersonDocumentVoter.php | 1 - .../Serializer/Normalizer/StoredObjectDenormalizer.php | 1 - src/Bundle/ChillDocStoreBundle/Service/StoredObjectManager.php | 1 - .../ChillDocStoreBundle/Service/StoredObjectManagerInterface.php | 1 - .../ChillDocStoreBundle/Templating/WopiEditTwigExtension.php | 1 - .../Templating/WopiEditTwigExtensionRuntime.php | 1 - src/Bundle/ChillDocStoreBundle/Tests/StoredObjectManagerTest.php | 1 - .../Workflow/AccompanyingCourseDocumentWorkflowHandler.php | 1 - .../ChillDocStoreBundle/migrations/Version20180605102533.php | 1 - .../ChillDocStoreBundle/migrations/Version20180606133338.php | 1 - .../ChillDocStoreBundle/migrations/Version20210903091534.php | 1 - .../ChillDocStoreBundle/migrations/Version20210903123835.php | 1 - .../ChillDocStoreBundle/migrations/Version20210928182542.php | 1 - .../ChillDocStoreBundle/migrations/Version20211119173558.php | 1 - .../ChillDocStoreBundle/migrations/Version20220131093117.php | 1 - .../ChillDocStoreBundle/migrations/Version20220525141646.php | 1 - src/Bundle/ChillEventBundle/ChillEventBundle.php | 1 - src/Bundle/ChillEventBundle/Controller/AdminController.php | 1 - src/Bundle/ChillEventBundle/Controller/EventController.php | 1 - src/Bundle/ChillEventBundle/Controller/EventTypeController.php | 1 - .../ChillEventBundle/Controller/ParticipationController.php | 1 - src/Bundle/ChillEventBundle/Controller/RoleController.php | 1 - src/Bundle/ChillEventBundle/Controller/StatusController.php | 1 - src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadEventTypes.php | 1 - .../ChillEventBundle/DataFixtures/ORM/LoadParticipation.php | 1 - src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadRolesACL.php | 1 - .../ChillEventBundle/DependencyInjection/ChillEventExtension.php | 1 - .../ChillEventBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillEventBundle/Entity/Event.php | 1 - src/Bundle/ChillEventBundle/Entity/EventType.php | 1 - src/Bundle/ChillEventBundle/Entity/Participation.php | 1 - src/Bundle/ChillEventBundle/Entity/Role.php | 1 - src/Bundle/ChillEventBundle/Entity/Status.php | 1 - .../ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php | 1 - src/Bundle/ChillEventBundle/Form/EventType.php | 1 - src/Bundle/ChillEventBundle/Form/EventTypeType.php | 1 - src/Bundle/ChillEventBundle/Form/ParticipationType.php | 1 - src/Bundle/ChillEventBundle/Form/RoleType.php | 1 - src/Bundle/ChillEventBundle/Form/StatusType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickEventType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php | 1 - src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php | 1 - src/Bundle/ChillEventBundle/Repository/EventRepository.php | 1 - .../ChillEventBundle/Repository/ParticipationRepository.php | 1 - src/Bundle/ChillEventBundle/Search/EventSearch.php | 1 - .../ChillEventBundle/Security/Authorization/EventVoter.php | 1 - .../Security/Authorization/ParticipationVoter.php | 1 - .../ChillEventBundle/Tests/Controller/EventControllerTest.php | 1 - .../Tests/Controller/EventTypeControllerTest.php | 1 - .../Tests/Controller/ParticipationControllerTest.php | 1 - .../ChillEventBundle/Tests/Controller/RoleControllerTest.php | 1 - .../ChillEventBundle/Tests/Controller/StatusControllerTest.php | 1 - src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php | 1 - src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20160318111334.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20190110140538.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20190115140042.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20190201143121.php | 1 - .../ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php | 1 - src/Bundle/ChillFamilyMembersBundle/Config/ConfigRepository.php | 1 - .../Controller/FamilyMemberController.php | 1 - .../DependencyInjection/ChillAMLIFamilyMembersExtension.php | 1 - .../DependencyInjection/Configuration.php | 1 - .../ChillFamilyMembersBundle/Entity/AbstractFamilyMember.php | 1 - src/Bundle/ChillFamilyMembersBundle/Entity/FamilyMember.php | 1 - src/Bundle/ChillFamilyMembersBundle/Form/FamilyMemberType.php | 1 - src/Bundle/ChillFamilyMembersBundle/Form/FamilyMembersType.php | 1 - src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php | 1 - .../Repository/FamilyMemberRepository.php | 1 - .../Resources/migrations/Version20180522142023.php | 1 - .../Security/Voter/FamilyMemberVoter.php | 1 - src/Bundle/ChillFamilyMembersBundle/Templating/Twig.php | 1 - .../Tests/Controller/FamilyMemberControllerTest.php | 1 - .../CRUD/CompilerPass/CRUDControllerCompilerPass.php | 1 - .../ChillMainBundle/CRUD/Controller/AbstractCRUDController.php | 1 - src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php | 1 - src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php | 1 - src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php | 1 - src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php | 1 - src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php | 1 - src/Bundle/ChillMainBundle/CRUD/Templating/TwigCRUDResolver.php | 1 - src/Bundle/ChillMainBundle/Center/GroupingCenterInterface.php | 1 - src/Bundle/ChillMainBundle/ChillMainBundle.php | 1 - src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php | 1 - .../Command/ChillUserSendRenewPasswordCodeCommand.php | 1 - .../Command/LoadAddressesBEFromBestAddressCommand.php | 1 - .../ChillMainBundle/Command/LoadAddressesFRFromBANOCommand.php | 1 - .../ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php | 1 - src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php | 1 - src/Bundle/ChillMainBundle/Command/LoadPostalCodeFR.php | 1 - src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php | 1 - src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php | 1 - src/Bundle/ChillMainBundle/Controller/AddressApiController.php | 1 - .../ChillMainBundle/Controller/AddressReferenceAPIController.php | 1 - src/Bundle/ChillMainBundle/Controller/AdminController.php | 1 - src/Bundle/ChillMainBundle/Controller/CenterController.php | 1 - src/Bundle/ChillMainBundle/Controller/CivilityApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/CivilityController.php | 1 - src/Bundle/ChillMainBundle/Controller/CountryController.php | 1 - src/Bundle/ChillMainBundle/Controller/DefaultController.php | 1 - src/Bundle/ChillMainBundle/Controller/LanguageController.php | 1 - src/Bundle/ChillMainBundle/Controller/LocationApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/LocationController.php | 1 - .../ChillMainBundle/Controller/LocationTypeApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/LocationTypeController.php | 1 - src/Bundle/ChillMainBundle/Controller/LoginController.php | 1 - src/Bundle/ChillMainBundle/Controller/MenuController.php | 1 - .../ChillMainBundle/Controller/NotificationApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/NotificationController.php | 1 - src/Bundle/ChillMainBundle/Controller/PasswordController.php | 1 - .../ChillMainBundle/Controller/PermissionApiController.php | 1 - .../ChillMainBundle/Controller/PermissionsGroupController.php | 1 - .../ChillMainBundle/Controller/PostalCodeAPIController.php | 1 - src/Bundle/ChillMainBundle/Controller/PostalCodeController.php | 1 - src/Bundle/ChillMainBundle/Controller/ScopeController.php | 1 - src/Bundle/ChillMainBundle/Controller/SearchController.php | 1 - .../ChillMainBundle/Controller/TimelineCenterController.php | 1 - src/Bundle/ChillMainBundle/Controller/UIController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserJobApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserJobController.php | 1 - src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/WorkflowController.php | 1 - .../DataFixtures/ORM/LoadAbstractNotificationsTrait.php | 1 - .../ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCenters.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCivility.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadGroupCenters.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php | 1 - .../ChillMainBundle/DataFixtures/ORM/LoadPermissionsGroup.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadRoleScopes.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadScopes.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php | 1 - .../ChillMainBundle/DependencyInjection/ChillMainExtension.php | 1 - .../DependencyInjection/CompilerPass/ACLFlagsCompilerPass.php | 1 - .../DependencyInjection/CompilerPass/ExportsCompilerPass.php | 1 - .../CompilerPass/GroupingCenterCompilerPass.php | 1 - .../DependencyInjection/CompilerPass/MenuCompilerPass.php | 1 - .../CompilerPass/NotificationCounterCompilerPass.php | 1 - .../CompilerPass/SearchableServicesCompilerPass.php | 1 - .../DependencyInjection/CompilerPass/TimelineCompilerClass.php | 1 - .../DependencyInjection/CompilerPass/WidgetsCompilerPass.php | 1 - .../DependencyInjection/ConfigConsistencyCompilerPass.php | 1 - src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php | 1 - .../DependencyInjection/MissingBundleException.php | 1 - .../DependencyInjection/RoleProvidersCompilerPass.php | 1 - .../DependencyInjection/Widget/AbstractWidgetsCompilerPass.php | 1 - .../DependencyInjection/Widget/AddWidgetConfigurationTrait.php | 1 - .../DependencyInjection/Widget/Factory/AbstractWidgetFactory.php | 1 - .../Widget/Factory/WidgetFactoryInterface.php | 1 - .../Widget/HasWidgetFactoriesExtensionInterface.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/OverlapsI.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php | 1 - .../ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php | 1 - .../Doctrine/Event/TrackCreateUpdateSubscriber.php | 1 - .../ChillMainBundle/Doctrine/Migrations/VersionComparator.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/Point.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/PointException.php | 1 - .../ChillMainBundle/Doctrine/Model/TrackCreationInterface.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/TrackCreationTrait.php | 1 - .../ChillMainBundle/Doctrine/Model/TrackUpdateInterface.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/TrackUpdateTrait.php | 1 - .../Doctrine/ORM/Hydration/FlatHierarchyEntityHydrator.php | 1 - .../ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Type/PointType.php | 1 - src/Bundle/ChillMainBundle/Entity/Address.php | 1 - src/Bundle/ChillMainBundle/Entity/AddressReference.php | 1 - src/Bundle/ChillMainBundle/Entity/Center.php | 1 - src/Bundle/ChillMainBundle/Entity/Civility.php | 1 - src/Bundle/ChillMainBundle/Entity/Country.php | 1 - .../ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php | 1 - .../Entity/Embeddable/PrivateCommentEmbeddable.php | 1 - src/Bundle/ChillMainBundle/Entity/GroupCenter.php | 1 - src/Bundle/ChillMainBundle/Entity/HasCenterInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/HasCentersInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/HasScopeInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/HasScopesInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/Language.php | 1 - src/Bundle/ChillMainBundle/Entity/Location.php | 1 - src/Bundle/ChillMainBundle/Entity/LocationType.php | 1 - src/Bundle/ChillMainBundle/Entity/Notification.php | 1 - src/Bundle/ChillMainBundle/Entity/NotificationComment.php | 1 - src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php | 1 - src/Bundle/ChillMainBundle/Entity/PostalCode.php | 1 - src/Bundle/ChillMainBundle/Entity/RoleScope.php | 1 - src/Bundle/ChillMainBundle/Entity/Scope.php | 1 - src/Bundle/ChillMainBundle/Entity/User.php | 1 - src/Bundle/ChillMainBundle/Entity/UserJob.php | 1 - src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php | 1 - .../ChillMainBundle/Entity/Workflow/EntityWorkflowComment.php | 1 - .../ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php | 1 - src/Bundle/ChillMainBundle/Export/AggregatorInterface.php | 1 - src/Bundle/ChillMainBundle/Export/DirectExportInterface.php | 1 - src/Bundle/ChillMainBundle/Export/ExportElementInterface.php | 1 - .../ChillMainBundle/Export/ExportElementValidatedInterface.php | 1 - .../ChillMainBundle/Export/ExportElementsProviderInterface.php | 1 - src/Bundle/ChillMainBundle/Export/FilterInterface.php | 1 - src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php | 1 - src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php | 1 - .../ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php | 1 - .../Export/Formatter/SpreadsheetListFormatter.php | 1 - src/Bundle/ChillMainBundle/Export/FormatterInterface.php | 1 - src/Bundle/ChillMainBundle/Export/GroupedExportInterface.php | 1 - src/Bundle/ChillMainBundle/Export/ListInterface.php | 1 - src/Bundle/ChillMainBundle/Form/AdvancedSearchType.php | 1 - src/Bundle/ChillMainBundle/Form/CenterType.php | 1 - .../ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php | 1 - src/Bundle/ChillMainBundle/Form/CivilityType.php | 1 - src/Bundle/ChillMainBundle/Form/CountryType.php | 1 - src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php | 1 - .../ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php | 1 - .../ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php | 1 - src/Bundle/ChillMainBundle/Form/EntityWorkflowCommentType.php | 1 - src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php | 1 - src/Bundle/ChillMainBundle/Form/LanguageType.php | 1 - src/Bundle/ChillMainBundle/Form/LocationFormType.php | 1 - src/Bundle/ChillMainBundle/Form/LocationTypeType.php | 1 - src/Bundle/ChillMainBundle/Form/NotificationCommentType.php | 1 - src/Bundle/ChillMainBundle/Form/NotificationType.php | 1 - src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php | 1 - src/Bundle/ChillMainBundle/Form/ScopeType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/AddressDateType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/AddressType.php | 1 - .../ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/CommentType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php | 1 - .../Form/Type/DataTransformer/AddressToIdDataTransformer.php | 1 - .../Form/Type/DataTransformer/CenterTransformer.php | 1 - .../Form/Type/DataTransformer/DateIntervalTransformer.php | 1 - .../Form/Type/DataTransformer/EntityToJsonTransformer.php | 1 - .../Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php | 1 - .../Form/Type/DataTransformer/ObjectToIdTransformer.php | 1 - .../Form/Type/DataTransformer/ScopeTransformer.php | 1 - src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php | 1 - .../ChillMainBundle/Form/Type/Export/PickFormatterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php | 1 - .../ChillMainBundle/Form/Type/TranslatableStringFormType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php | 1 - src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php | 1 - src/Bundle/ChillMainBundle/Form/UserJobType.php | 1 - src/Bundle/ChillMainBundle/Form/UserPasswordType.php | 1 - src/Bundle/ChillMainBundle/Form/UserType.php | 1 - .../ChillMainBundle/Form/Utils/PermissionsGroupFlagProvider.php | 1 - src/Bundle/ChillMainBundle/Form/WorkflowStepType.php | 1 - src/Bundle/ChillMainBundle/Form/WorkflowTransitionType.php | 1 - .../Notification/Counter/NotificationByUserCounter.php | 1 - .../ChillMainBundle/Notification/Email/NotificationMailer.php | 1 - .../PersistNotificationOnTerminateEventSubscriber.php | 1 - .../Notification/Exception/NotificationHandlerNotFound.php | 1 - src/Bundle/ChillMainBundle/Notification/Mailer.php | 1 - .../Notification/NotificationHandlerInterface.php | 1 - .../ChillMainBundle/Notification/NotificationHandlerManager.php | 1 - .../ChillMainBundle/Notification/NotificationPersister.php | 1 - .../Notification/NotificationPersisterInterface.php | 1 - src/Bundle/ChillMainBundle/Notification/NotificationPresence.php | 1 - .../Notification/Templating/NotificationTwigExtension.php | 1 - .../Notification/Templating/NotificationTwigExtensionRuntime.php | 1 - src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php | 1 - src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php | 1 - src/Bundle/ChillMainBundle/Pagination/Page.php | 1 - src/Bundle/ChillMainBundle/Pagination/PageGenerator.php | 1 - src/Bundle/ChillMainBundle/Pagination/PageInterface.php | 1 - src/Bundle/ChillMainBundle/Pagination/Paginator.php | 1 - src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php | 1 - src/Bundle/ChillMainBundle/Pagination/PaginatorInterface.php | 1 - .../ChillMainBundle/Phonenumber/PhoneNumberHelperInterface.php | 1 - src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php | 1 - src/Bundle/ChillMainBundle/Phonenumber/Templating.php | 1 - src/Bundle/ChillMainBundle/Redis/ChillRedis.php | 1 - src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php | 1 - .../ChillMainBundle/Repository/AddressReferenceRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/AddressRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/CivilityRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/CountryRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/GroupCenterRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/LanguageRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/LocationRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/LocationTypeRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/NotificationRepository.php | 1 - .../ChillMainBundle/Repository/PermissionsGroupRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/RoleScopeRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php | 1 - .../Repository/UserACLAwareRepositoryInterface.php | 1 - src/Bundle/ChillMainBundle/Repository/UserJobRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/UserRepository.php | 1 - .../Repository/Workflow/EntityWorkflowRepository.php | 1 - .../Repository/Workflow/EntityWorkflowStepRepository.php | 1 - src/Bundle/ChillMainBundle/Routing/Loader/ChillRoutesLoader.php | 1 - src/Bundle/ChillMainBundle/Routing/LocalMenuBuilderInterface.php | 1 - .../Routing/MenuBuilder/AdminLanguageMenuBuilder.php | 1 - .../Routing/MenuBuilder/AdminLocationMenuBuilder.php | 1 - .../ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php | 1 - .../ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php | 1 - .../ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php | 1 - src/Bundle/ChillMainBundle/Routing/MenuComposer.php | 1 - src/Bundle/ChillMainBundle/Routing/MenuTwig.php | 1 - src/Bundle/ChillMainBundle/Search/AbstractSearch.php | 1 - .../ChillMainBundle/Search/Entity/SearchUserApiProvider.php | 1 - .../ChillMainBundle/Search/HasAdvancedSearchFormInterface.php | 1 - src/Bundle/ChillMainBundle/Search/Model/Result.php | 1 - src/Bundle/ChillMainBundle/Search/ParsingException.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApi.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiInterface.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiQuery.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiResult.php | 1 - src/Bundle/ChillMainBundle/Search/SearchInterface.php | 1 - src/Bundle/ChillMainBundle/Search/SearchProvider.php | 1 - .../ChillMainBundle/Search/UnknowSearchDomainException.php | 1 - src/Bundle/ChillMainBundle/Search/UnknowSearchNameException.php | 1 - .../ChillMainBundle/Search/Utils/ExtractDateFromPattern.php | 1 - .../Search/Utils/ExtractPhonenumberFromPattern.php | 1 - .../ChillMainBundle/Search/Utils/SearchExtractionResult.php | 1 - .../Security/Authorization/AbstractChillVoter.php | 1 - .../Security/Authorization/AuthorizationHelper.php | 1 - .../Security/Authorization/AuthorizationHelperInterface.php | 1 - .../Security/Authorization/ChillVoterInterface.php | 1 - .../Security/Authorization/DefaultVoterHelper.php | 1 - .../Security/Authorization/DefaultVoterHelperFactory.php | 1 - .../Security/Authorization/DefaultVoterHelperGenerator.php | 1 - .../Security/Authorization/EntityWorkflowVoter.php | 1 - .../ChillMainBundle/Security/Authorization/NotificationVoter.php | 1 - .../Security/Authorization/VoterGeneratorInterface.php | 1 - .../Security/Authorization/VoterHelperFactoryInterface.php | 1 - .../Security/Authorization/VoterHelperInterface.php | 1 - .../Security/Authorization/WorkflowEntityDeletionVoter.php | 1 - src/Bundle/ChillMainBundle/Security/ParentRoleHelper.php | 1 - .../Security/PasswordRecover/PasswordRecoverEvent.php | 1 - .../Security/PasswordRecover/PasswordRecoverEventSubscriber.php | 1 - .../Security/PasswordRecover/PasswordRecoverLocker.php | 1 - .../Security/PasswordRecover/PasswordRecoverVoter.php | 1 - .../Security/PasswordRecover/RecoverPasswordHelper.php | 1 - .../ChillMainBundle/Security/PasswordRecover/TokenManager.php | 1 - .../ChillMainBundle/Security/ProvideRoleHierarchyInterface.php | 1 - src/Bundle/ChillMainBundle/Security/ProvideRoleInterface.php | 1 - .../Security/Resolver/CenterResolverDispatcher.php | 1 - .../Security/Resolver/CenterResolverDispatcherInterface.php | 1 - .../Security/Resolver/CenterResolverInterface.php | 1 - .../ChillMainBundle/Security/Resolver/CenterResolverManager.php | 1 - .../Security/Resolver/CenterResolverManagerInterface.php | 1 - .../ChillMainBundle/Security/Resolver/DefaultCenterResolver.php | 1 - .../ChillMainBundle/Security/Resolver/DefaultScopeResolver.php | 1 - .../ChillMainBundle/Security/Resolver/ResolverTwigExtension.php | 1 - .../Security/Resolver/ScopeResolverDispatcher.php | 1 - .../ChillMainBundle/Security/Resolver/ScopeResolverInterface.php | 1 - src/Bundle/ChillMainBundle/Security/RoleProvider.php | 1 - .../ChillMainBundle/Security/UserProvider/UserProvider.php | 1 - src/Bundle/ChillMainBundle/Serializer/Model/Collection.php | 1 - src/Bundle/ChillMainBundle/Serializer/Model/Counter.php | 1 - .../ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php | 1 - .../Serializer/Normalizer/CollectionNormalizer.php | 1 - .../Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/DateNormalizer.php | 1 - .../Serializer/Normalizer/DiscriminatedObjectDenormalizer.php | 1 - .../Serializer/Normalizer/DoctrineExistingEntityNormalizer.php | 1 - .../Serializer/Normalizer/EntityWorkflowNormalizer.php | 1 - .../Serializer/Normalizer/EntityWorkflowStepNormalizer.php | 1 - .../Serializer/Normalizer/NotificationNormalizer.php | 1 - .../Serializer/Normalizer/PhonenumberNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/PointNormalizer.php | 1 - .../Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/UserNormalizer.php | 1 - .../Service/Import/AddressReferenceBEFromBestAddress.php | 1 - .../Service/Import/AddressReferenceBaseImporter.php | 1 - .../ChillMainBundle/Service/Import/AddressReferenceFromBano.php | 1 - .../Service/Import/PostalCodeBEFromBestAddress.php | 1 - .../ChillMainBundle/Service/Import/PostalCodeBaseImporter.php | 1 - .../ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php | 1 - src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php | 1 - src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php | 1 - .../ChillMainBundle/Templating/ChillMarkdownRenderExtension.php | 1 - src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php | 1 - src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php | 1 - .../Templating/Entity/AbstractChillEntityRender.php | 1 - src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php | 1 - .../ChillMainBundle/Templating/Entity/ChillEntityRender.php | 1 - .../Templating/Entity/ChillEntityRenderExtension.php | 1 - .../Templating/Entity/ChillEntityRenderInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php | 1 - src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php | 1 - .../Templating/Events/DelegatedBlockRenderingEvent.php | 1 - .../ChillMainBundle/Templating/Listing/FilterOrderHelper.php | 1 - .../Templating/Listing/FilterOrderHelperBuilder.php | 1 - .../Templating/Listing/FilterOrderHelperFactory.php | 1 - .../Templating/Listing/FilterOrderHelperFactoryInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/Listing/Templating.php | 1 - .../ChillMainBundle/Templating/TranslatableStringHelper.php | 1 - .../Templating/TranslatableStringHelperInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php | 1 - .../ChillMainBundle/Templating/UI/CountNotificationUser.php | 1 - .../Templating/UI/NotificationCounterInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/Widget/WidgetInterface.php | 1 - .../ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php | 1 - .../ChillMainBundle/Test/Export/AbstractAggregatorTest.php | 1 - src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php | 1 - src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareCenterTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareCircleTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareScopeTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php | 1 - .../ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php | 1 - .../ChillMainBundle/Tests/Controller/AddressControllerTest.php | 1 - .../Tests/Controller/AddressReferenceApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/CenterControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/ExportControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/LoginControllerTest.php | 1 - .../Tests/Controller/NotificationApiControllerTest.php | 1 - .../Tests/Controller/PermissionApiControllerTest.php | 1 - .../Tests/Controller/PermissionsGroupControllerTest.php | 1 - .../Tests/Controller/PostalCodeApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/ScopeControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/SearchApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/SearchControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/UserApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/UserControllerTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php | 1 - .../ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php | 1 - .../ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php | 1 - .../PersistNotificationOnTerminateEventSubscriberTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php | 1 - .../ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php | 1 - .../ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php | 1 - .../Tests/Search/Utils/ExtractDateFromPatternTest.php | 1 - .../Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php | 1 - .../Tests/Security/Authorization/AuthorizationHelperTest.php | 1 - .../Tests/Security/PasswordRecover/TokenManagerTest.php | 1 - .../Tests/Security/Resolver/CenterResolverDispatcherTest.php | 1 - .../Tests/Security/Resolver/DefaultScopeResolverTest.php | 1 - .../Tests/Security/Resolver/ScopeResolverDispatcherTest.php | 1 - .../Tests/Serializer/Normalizer/DateNormalizerTest.php | 1 - .../Normalizer/DoctrineExistingEntityNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php | 1 - .../Tests/Services/Import/AddressReferenceBaseImporterTest.php | 1 - .../Tests/Services/Import/PostalCodeBaseImporterTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php | 1 - .../Tests/Templating/ChillMarkdownRenderExtensionTest.php | 1 - .../Tests/Templating/Entity/AddressRenderTest.php | 1 - src/Bundle/ChillMainBundle/Tests/TestHelper.php | 1 - src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php | 1 - .../Workflow/EventSubscriber/NotificationOnTransitionTest.php | 1 - src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php | 1 - .../ChillMainBundle/Timeline/TimelineProviderInterface.php | 1 - src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php | 1 - src/Bundle/ChillMainBundle/Util/CountriesInfo.php | 1 - src/Bundle/ChillMainBundle/Util/DateRangeCovering.php | 1 - .../Validation/Constraint/PhonenumberConstraint.php | 1 - .../Validation/Constraint/RoleScopeScopePresenceConstraint.php | 1 - .../Constraint/UserUniqueEmailAndUsernameConstraint.php | 1 - .../Validation/Validator/RoleScopeScopePresence.php | 1 - .../Validation/Validator/UserUniqueEmailAndUsername.php | 1 - .../ChillMainBundle/Validation/Validator/ValidPhonenumber.php | 1 - .../Validator/Constraints/Entity/UserCircleConsistency.php | 1 - .../Constraints/Entity/UserCircleConsistencyValidator.php | 1 - .../Validator/Constraints/Export/ExportElementConstraint.php | 1 - .../Constraints/Export/ExportElementConstraintValidator.php | 1 - .../ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php | 1 - .../ChillMainBundle/Workflow/EntityWorkflowHandlerInterface.php | 1 - src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php | 1 - .../EventSubscriber/EntityWorkflowTransitionEventSubscriber.php | 1 - .../Workflow/EventSubscriber/NotificationOnTransition.php | 1 - .../Workflow/EventSubscriber/SendAccessKeyEventSubscriber.php | 1 - .../Workflow/Exception/HandlerNotFoundException.php | 1 - src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php | 1 - .../Workflow/Notification/WorkflowNotificationHandler.php | 1 - .../Workflow/RelatedEntityWorkflowSupportsStrategy.php | 1 - .../Workflow/Templating/WorkflowTwigExtension.php | 1 - .../Workflow/Templating/WorkflowTwigExtensionRuntime.php | 1 - .../Workflow/Validator/EntityWorkflowCreation.php | 1 - .../Workflow/Validator/EntityWorkflowCreationValidator.php | 1 - src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValid.php | 1 - .../Workflow/Validator/StepDestValidValidator.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20100000000000.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20141128194409.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20150821105642.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20150821122935.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20160310122322.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180703191509.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180709181423.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180905101426.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180911093642.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20200422122715.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210304085819.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210308111926.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210414091001.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210420115006.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210503085107.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210505153727.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210525144016.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210528090000.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210610140248.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210616134328.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210903144853.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210929192242.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211006151653.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211007150019.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211012141336.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211013124455.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211015084653.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211022094429.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211116162847.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211119173554.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211123093355.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211125142016.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211125142017.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211213112628.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211216213649.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211225231532.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211228183221.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211228215919.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211229140308.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211230003532.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220112123436.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220112150413.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220112161136.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220114132105.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220114165950.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220120155303.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220124085957.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220125134253.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220128211748.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220217133607.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220223171457.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220302132728.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220325134944.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220413154743.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220413225830.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220413230159.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220506131307.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220506145935.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220513151853.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220516085659.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220711150006.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220729205416.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220730204216.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220829132409.php | 1 - .../Events/PersonAddressMoveEventSubscriber.php | 1 - .../AccompanyingPeriod/Events/UserRefEventSubscriber.php | 1 - .../AccompanyingPeriodLinkedWithSocialIssuesEntityInterface.php | 1 - .../AccompanyingPeriodSocialIssueConsistencyEntityListener.php | 1 - .../AccompanyingPeriod/Suggestion/ReferralsSuggestion.php | 1 - .../Suggestion/ReferralsSuggestionInterface.php | 1 - src/Bundle/ChillPersonBundle/Actions/ActionEvent.php | 1 - src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php | 1 - .../CRUD/Controller/EntityPersonCRUDController.php | 1 - .../CRUD/Controller/OneToOneEntityPersonCRUDController.php | 1 - src/Bundle/ChillPersonBundle/ChillPersonBundle.php | 1 - src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php | 1 - .../ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php | 1 - .../ChillPersonBundle/Command/ImportSocialWorkMetadata.php | 1 - .../Command/RemoveOldDraftAccompanyingPeriodCommand.php | 1 - .../ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php | 1 - .../Controller/AccompanyingCourseApiController.php | 1 - .../Controller/AccompanyingCourseCommentController.php | 1 - .../Controller/AccompanyingCourseController.php | 1 - .../Controller/AccompanyingCourseWorkApiController.php | 1 - .../Controller/AccompanyingCourseWorkController.php | 1 - .../Controller/AccompanyingPeriodController.php | 1 - .../Controller/AccompanyingPeriodRegulationListController.php | 1 - .../Controller/AccompanyingPeriodWorkEvaluationApiController.php | 1 - src/Bundle/ChillPersonBundle/Controller/AdminController.php | 1 - .../ChillPersonBundle/Controller/ClosingMotiveController.php | 1 - .../ChillPersonBundle/Controller/HouseholdApiController.php | 1 - .../Controller/HouseholdCompositionController.php | 1 - .../Controller/HouseholdCompositionTypeApiController.php | 1 - .../Controller/HouseholdCompositionTypeController.php | 1 - src/Bundle/ChillPersonBundle/Controller/HouseholdController.php | 1 - .../ChillPersonBundle/Controller/HouseholdMemberController.php | 1 - .../ChillPersonBundle/Controller/HouseholdPositionController.php | 1 - .../ChillPersonBundle/Controller/MaritalStatusController.php | 1 - src/Bundle/ChillPersonBundle/Controller/OpeningApiController.php | 1 - src/Bundle/ChillPersonBundle/Controller/OriginController.php | 1 - .../ChillPersonBundle/Controller/PersonAddressController.php | 1 - src/Bundle/ChillPersonBundle/Controller/PersonApiController.php | 1 - src/Bundle/ChillPersonBundle/Controller/PersonController.php | 1 - .../ChillPersonBundle/Controller/PersonDuplicateController.php | 1 - .../ChillPersonBundle/Controller/PersonResourceController.php | 1 - .../Controller/PersonResourceKindController.php | 1 - .../Controller/ReassignAccompanyingPeriodController.php | 1 - src/Bundle/ChillPersonBundle/Controller/RelationController.php | 1 - .../ChillPersonBundle/Controller/RelationshipApiController.php | 1 - .../Controller/ResidentialAddressController.php | 1 - .../ChillPersonBundle/Controller/SocialIssueApiController.php | 1 - .../Controller/SocialWork/EvaluationController.php | 1 - .../ChillPersonBundle/Controller/SocialWork/GoalController.php | 1 - .../ChillPersonBundle/Controller/SocialWork/ResultController.php | 1 - .../Controller/SocialWork/SocialActionController.php | 1 - .../Controller/SocialWork/SocialIssueController.php | 1 - .../Controller/SocialWorkEvaluationApiController.php | 1 - .../ChillPersonBundle/Controller/SocialWorkGoalApiController.php | 1 - .../Controller/SocialWorkResultApiController.php | 1 - .../Controller/SocialWorkSocialActionApiController.php | 1 - .../ChillPersonBundle/Controller/TimelinePersonController.php | 1 - .../Controller/UserAccompanyingPeriodController.php | 1 - .../ChillPersonBundle/DataFixtures/Helper/PersonRandomHelper.php | 1 - .../DataFixtures/Helper/RandomPersonHelperTrait.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodClosingMotive.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodNotifications.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodOrigin.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodWork.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHousehold.php | 1 - .../DataFixtures/ORM/LoadHouseholdCompositionType.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadHouseholdPosition.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadMaritalStatus.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPersonACL.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelations.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php | 1 - .../DataFixtures/ORM/LoadSocialWorkMetadata.php | 1 - .../DependencyInjection/ChillPersonExtension.php | 1 - .../CompilerPass/AccompanyingPeriodTimelineCompilerPass.php | 1 - .../ChillPersonBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartAddressId.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartCountryCode.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartCountryId.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartCountryName.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartIsNoAddress.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartPostCodeCode.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartPostCodeId.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartPostCodeLabel.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartStreetAddress1.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartStreetAddress2.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartValidFrom.php | 1 - src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodLocationHistory.php | 1 - .../Entity/AccompanyingPeriod/AccompanyingPeriodWork.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php | 1 - .../AccompanyingPeriodWorkEvaluationDocument.php | 1 - .../Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php | 1 - .../Entity/AccompanyingPeriod/ClosingMotive.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/Comment.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/Origin.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php | 1 - src/Bundle/ChillPersonBundle/Entity/HasPerson.php | 1 - src/Bundle/ChillPersonBundle/Entity/Household/Household.php | 1 - .../ChillPersonBundle/Entity/Household/HouseholdComposition.php | 1 - .../Entity/Household/HouseholdCompositionType.php | 1 - .../ChillPersonBundle/Entity/Household/HouseholdMember.php | 1 - .../Entity/Household/PersonHouseholdAddress.php | 1 - src/Bundle/ChillPersonBundle/Entity/Household/Position.php | 1 - src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php | 1 - .../ChillPersonBundle/Entity/Person/PersonCurrentAddress.php | 1 - src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php | 1 - .../ChillPersonBundle/Entity/Person/PersonResourceKind.php | 1 - .../ChillPersonBundle/Entity/Person/ResidentialAddress.php | 1 - src/Bundle/ChillPersonBundle/Entity/PersonAltName.php | 1 - src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php | 1 - src/Bundle/ChillPersonBundle/Entity/PersonPhone.php | 1 - src/Bundle/ChillPersonBundle/Entity/Relationships/Relation.php | 1 - .../ChillPersonBundle/Entity/Relationships/Relationship.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/Goal.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php | 1 - .../ChillPersonBundle/Event/Person/PersonAddressMoveEvent.php | 1 - .../EventListener/AccompanyingPeriodWorkEventListener.php | 1 - .../ChillPersonBundle/EventListener/PersonEventListener.php | 1 - src/Bundle/ChillPersonBundle/Export/Declarations.php | 1 - .../Filter/AccompanyingCourseFilters/ActivityTypeFilter.php | 1 - .../Export/Filter/PersonFilters/FamilySituationFilter.php | 1 - .../ChillPersonBundle/Form/AccompanyingCourseCommentType.php | 1 - src/Bundle/ChillPersonBundle/Form/AccompanyingCourseType.php | 1 - src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php | 1 - .../ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php | 1 - src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php | 1 - src/Bundle/ChillPersonBundle/Form/CreationPersonType.php | 1 - .../Form/DataMapper/PersonAltNameDataMapper.php | 1 - .../Form/DataTransformer/PersonToIdTransformer.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php | 1 - .../ChillPersonBundle/Form/HouseholdCompositionTypeType.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdPositionType.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdType.php | 1 - src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php | 1 - src/Bundle/ChillPersonBundle/Form/OriginType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php | 1 - .../ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonResourceKindType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonResourceType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonType.php | 1 - src/Bundle/ChillPersonBundle/Form/RelationType.php | 1 - src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php | 1 - .../ChillPersonBundle/Form/SocialWork/SocialActionType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php | 1 - .../ChillPersonBundle/Form/Type/ClosingMotivePickerType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/GenderType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php | 1 - .../ChillPersonBundle/Form/Type/Select2MaritalStatusType.php | 1 - src/Bundle/ChillPersonBundle/Household/MembersEditor.php | 1 - src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php | 1 - .../ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php | 1 - .../Menu/AdminAccompanyingCourseMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php | 1 - .../Notification/AccompanyingPeriodNotificationHandler.php | 1 - .../ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php | 1 - src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php | 1 - src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentRepository.php | 1 - .../AccompanyingPeriodWorkEvaluationRepository.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodWorkGoalRepository.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodWorkRepository.php | 1 - .../Repository/AccompanyingPeriod/CommentRepository.php | 1 - .../Repository/AccompanyingPeriod/OriginRepository.php | 1 - .../Repository/AccompanyingPeriod/ResourceRepository.php | 1 - .../Repository/AccompanyingPeriodACLAwareRepository.php | 1 - .../Repository/AccompanyingPeriodACLAwareRepositoryInterface.php | 1 - .../Repository/AccompanyingPeriodParticipationRepository.php | 1 - .../Repository/AccompanyingPeriodRepository.php | 1 - .../Repository/Household/HouseholdACLAwareRepository.php | 1 - .../Household/HouseholdACLAwareRepositoryInterface.php | 1 - .../Repository/Household/HouseholdCompositionRepository.php | 1 - .../Repository/Household/HouseholdCompositionTypeRepository.php | 1 - .../Repository/Household/HouseholdMembersRepository.php | 1 - .../Repository/Household/HouseholdRepository.php | 1 - .../Repository/Household/PersonHouseholdAddressRepository.php | 1 - .../Repository/Household/PositionRepository.php | 1 - .../ChillPersonBundle/Repository/MaritalStatusRepository.php | 1 - .../Repository/PersonACLAwareRepositoryInterface.php | 1 - .../ChillPersonBundle/Repository/PersonAltNameRepository.php | 1 - .../Repository/PersonNotDuplicateRepository.php | 1 - src/Bundle/ChillPersonBundle/Repository/PersonRepository.php | 1 - .../ChillPersonBundle/Repository/PersonResourceRepository.php | 1 - .../Repository/Relationships/RelationRepository.php | 1 - .../Repository/Relationships/RelationshipRepository.php | 1 - .../Repository/ResidentialAddressRepository.php | 1 - .../Repository/SocialWork/EvaluationRepository.php | 1 - .../ChillPersonBundle/Repository/SocialWork/GoalRepository.php | 1 - .../ChillPersonBundle/Repository/SocialWork/ResultRepository.php | 1 - .../Repository/SocialWork/SocialActionRepository.php | 1 - .../Repository/SocialWork/SocialIssueRepository.php | 1 - src/Bundle/ChillPersonBundle/Search/PersonSearch.php | 1 - .../ChillPersonBundle/Search/SearchHouseholdApiProvider.php | 1 - src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php | 1 - src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php | 1 - .../Security/Authorization/AccompanyingPeriodCommentVoter.php | 1 - .../Security/Authorization/AccompanyingPeriodResourceVoter.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentVoter.php | 1 - .../Authorization/AccompanyingPeriodWorkEvaluationVoter.php | 1 - .../Security/Authorization/AccompanyingPeriodWorkVoter.php | 1 - .../ChillPersonBundle/Security/Authorization/PersonVoter.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php | 1 - .../Normalizer/AccompanyingPeriodParticipationNormalizer.php | 1 - .../Normalizer/AccompanyingPeriodResourceNormalizer.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php | 1 - .../Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentNormalizer.php | 1 - .../Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php | 1 - .../Serializer/Normalizer/MembersEditorNormalizer.php | 1 - .../Serializer/Normalizer/PersonDocGenNormalizer.php | 1 - .../Serializer/Normalizer/PersonJsonNormalizer.php | 1 - .../Serializer/Normalizer/PersonJsonNormalizerInterface.php | 1 - .../Serializer/Normalizer/RelationshipDocGenNormalizer.php | 1 - .../Serializer/Normalizer/SocialActionNormalizer.php | 1 - .../Serializer/Normalizer/SocialIssueNormalizer.php | 1 - .../Serializer/Normalizer/WorkflowNormalizer.php | 1 - .../AccompanyingPeriod/OldDraftAccompanyingPeriodRemover.php | 1 - .../OldDraftAccompanyingPeriodRemoverInterface.php | 1 - .../Service/DocGenerator/AccompanyingPeriodContext.php | 1 - .../Service/DocGenerator/AccompanyingPeriodWorkContext.php | 1 - .../DocGenerator/AccompanyingPeriodWorkEvaluationContext.php | 1 - .../ChillPersonBundle/Service/DocGenerator/PersonContext.php | 1 - src/Bundle/ChillPersonBundle/Service/Import/ChillImporter.php | 1 - .../ChillPersonBundle/Service/Import/SocialWorkMetadata.php | 1 - .../Service/Import/SocialWorkMetadataInterface.php | 1 - .../ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php | 1 - src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php | 1 - .../Templating/Entity/PersonRenderInterface.php | 1 - .../ChillPersonBundle/Templating/Entity/ResourceKindRender.php | 1 - .../ChillPersonBundle/Templating/Entity/SocialActionRender.php | 1 - .../ChillPersonBundle/Templating/Entity/SocialIssueRender.php | 1 - src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php | 1 - .../AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php | 1 - ...ccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php | 1 - .../AccompanyingPeriod/Workflow/WorkflowEventSubscriberTest.php | 1 - .../Tests/Controller/AccompanyingCourseApiControllerTest.php | 1 - .../Tests/Controller/AccompanyingCourseControllerTest.php | 1 - .../Tests/Controller/AccompanyingPeriodControllerTest.php | 1 - .../AccompanyingPeriodRegulationListControllerTest.php | 1 - .../Tests/Controller/HouseholdApiControllerTest.php | 1 - .../Tests/Controller/HouseholdControllerTest.php | 1 - .../Tests/Controller/HouseholdMemberControllerTest.php | 1 - .../Tests/Controller/PersonAddressControllerTest.php | 1 - .../Tests/Controller/PersonApiControllerTest.php | 1 - .../Tests/Controller/PersonControllerCreateTest.php | 1 - .../Tests/Controller/PersonControllerUpdateTest.php | 1 - .../Controller/PersonControllerUpdateWithHiddenFieldsTest.php | 1 - .../Tests/Controller/PersonControllerViewTest.php | 1 - .../Controller/PersonControllerViewWithHiddenFieldsTest.php | 1 - .../Tests/Controller/PersonDuplicateControllerViewTest.php | 1 - .../Tests/Controller/RelationshipApiControllerTest.php | 1 - .../Tests/Controller/SocialIssueApiControllerTest.php | 1 - .../Tests/Entity/AccompanyingPeriod/ResourceTest.php | 1 - .../ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php | 1 - .../Tests/Entity/Household/HouseholdMemberTest.php | 1 - .../ChillPersonBundle/Tests/Entity/Household/HouseholdTest.php | 1 - .../Tests/Entity/SocialWork/SocialIssueTest.php | 1 - .../Tests/Event/Person/PersonAddressMoveEventTest.php | 1 - .../Tests/EventListener/PersonCreateEventTest.php | 1 - .../Tests/Export/Aggregator/ActionTypeAggregatorTest.php | 1 - .../Tests/Export/Aggregator/AgeAggregatorTest.php | 1 - .../Tests/Export/Aggregator/GenderAggregatorTest.php | 1 - .../Tests/Export/Aggregator/GoalAggregatorTest.php | 1 - .../Tests/Export/Aggregator/NationalityAggregatorTest.php | 1 - .../Tests/Export/Aggregator/ReferrerAggregatorTest.php | 1 - .../Tests/Export/Aggregator/ResultAggregatorTest.php | 1 - .../Tests/Export/Export/CountAccompanyingCourseTest.php | 1 - .../ChillPersonBundle/Tests/Export/Export/CountPersonTest.php | 1 - .../Tests/Export/Export/CountSocialWorkActionsTest.php | 1 - .../Tests/Export/Export/StatAccompanyingCourseDurationTest.php | 1 - .../Tests/Export/Filter/AccompanyingPeriodFilterTest.php | 1 - .../Tests/Export/Filter/ActiveOnDateFilterTest.php | 1 - .../Tests/Export/Filter/ActiveOneDayBetweenDatesFilterTest.php | 1 - .../Tests/Export/Filter/ActivityTypeFilterTest.php | 1 - .../Tests/Export/Filter/AdministrativeLocationFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php | 1 - .../Tests/Export/Filter/ClosingMotiveFilterTest.php | 1 - .../Tests/Export/Filter/ConfidentialFilterTest.php | 1 - .../Tests/Export/Filter/EmergencyFilterTest.php | 1 - .../Tests/Export/Filter/EvaluationFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php | 1 - .../Tests/Export/Filter/GeographicalUnitStatFilterTest.php | 1 - .../Tests/Export/Filter/IntensityFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/JobFilterTest.php | 1 - .../Tests/Export/Filter/OpenBetweenDatesFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/OriginFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/ReferrerFilterTest.php | 1 - .../Tests/Export/Filter/RequestorFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/ScopeFilterTest.php | 1 - .../Tests/Export/Filter/SocialActionFilterTest.php | 1 - .../Tests/Export/Filter/SocialIssueFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/StepFilterTest.php | 1 - .../ChillPersonBundle/Tests/Export/Filter/UserJobFilterTest.php | 1 - .../Tests/Export/Filter/UserScopeFilterTest.php | 1 - .../ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php | 1 - .../ChillPersonBundle/Tests/Household/MembersEditorTest.php | 1 - src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php | 1 - .../Tests/Security/Authorization/PersonVoterTest.php | 1 - .../Normalizer/AccompanyingPeriodDocGenNormalizerTest.php | 1 - .../Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php | 1 - .../AccompanyingPeriodWorkEvaluationDenormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/HouseholdNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php | 1 - .../Serializer/Normalizer/RelationshipDocGenNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php | 1 - .../Tests/Timeline/TimelineAccompanyingPeriodTest.php | 1 - .../AccompanyingPeriod/LocationValidityValidatorTest.php | 1 - .../Household/HouseholdMembershipSequentialValidatorTest.php | 1 - .../Tests/Validator/Household/MaxHolderValidatorTest.php | 1 - .../Tests/Validator/Person/BirthdateValidatorTest.php | 1 - .../Tests/Validator/Person/PersonHasCenterValidatorTest.php | 1 - .../Tests/Validator/Person/PersonValidationTest.php | 1 - .../Tests/Workflows/AccompanyingPeriodLifecycle.php | 1 - .../Timeline/AbstractTimelineAccompanyingPeriod.php | 1 - .../Timeline/TimelineAccompanyingPeriodClosing.php | 1 - .../Timeline/TimelineAccompanyingPeriodOpening.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodValidity.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodValidityValidator.php | 1 - .../AccompanyingPeriod/ConfidentialCourseMustHaveReferrer.php | 1 - .../ConfidentialCourseMustHaveReferrerValidator.php | 1 - .../Constraints/AccompanyingPeriod/LocationValidity.php | 1 - .../Constraints/AccompanyingPeriod/LocationValidityValidator.php | 1 - .../Constraints/AccompanyingPeriod/ParticipationOverlap.php | 1 - .../AccompanyingPeriod/ParticipationOverlapValidator.php | 1 - .../Constraints/AccompanyingPeriod/ResourceDuplicateCheck.php | 1 - .../AccompanyingPeriod/ResourceDuplicateCheckValidator.php | 1 - .../Constraints/Household/HouseholdMembershipSequential.php | 1 - .../Household/HouseholdMembershipSequentialValidator.php | 1 - .../Validator/Constraints/Household/MaxHolder.php | 1 - .../Validator/Constraints/Household/MaxHolderValidator.php | 1 - .../ChillPersonBundle/Validator/Constraints/Person/Birthdate.php | 1 - .../Validator/Constraints/Person/BirthdateValidator.php | 1 - .../Validator/Constraints/Person/PersonHasCenter.php | 1 - .../Validator/Constraints/Person/PersonHasCenterValidator.php | 1 - .../Constraints/Relationship/RelationshipNoDuplicate.php | 1 - .../Relationship/RelationshipNoDuplicateValidator.php | 1 - src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php | 1 - src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php | 1 - .../Widget/PersonListWidget/PersonFilteringInterface.php | 1 - src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php | 1 - .../Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php | 1 - .../Workflow/AccompanyingPeriodWorkWorkflowHandler.php | 1 - .../ChillPersonBundle/migrations/Version20141129010948.php | 1 - .../ChillPersonBundle/migrations/Version20150212173934.php | 1 - .../ChillPersonBundle/migrations/Version20150607231010.php | 1 - .../ChillPersonBundle/migrations/Version20150811152608.php | 1 - .../ChillPersonBundle/migrations/Version20150812110708.php | 1 - .../ChillPersonBundle/migrations/Version20150820113409.php | 1 - .../ChillPersonBundle/migrations/Version20160310161006.php | 1 - .../ChillPersonBundle/migrations/Version20160422000000.php | 1 - .../ChillPersonBundle/migrations/Version20160818113633.php | 1 - .../ChillPersonBundle/migrations/Version20160818151130.php | 1 - .../ChillPersonBundle/migrations/Version20170117131924.php | 1 - .../ChillPersonBundle/migrations/Version20180518144221.php | 1 - .../ChillPersonBundle/migrations/Version20180820120000.php | 1 - .../ChillPersonBundle/migrations/Version20181005140249.php | 1 - .../ChillPersonBundle/migrations/Version20181023101621.php | 1 - .../ChillPersonBundle/migrations/Version20190701124238.php | 1 - .../ChillPersonBundle/migrations/Version20191106103452.php | 1 - .../ChillPersonBundle/migrations/Version20200128084445.php | 1 - .../ChillPersonBundle/migrations/Version20200130213446.php | 1 - .../ChillPersonBundle/migrations/Version20200310090632.php | 1 - .../ChillPersonBundle/migrations/Version20200422125935.php | 1 - .../ChillPersonBundle/migrations/Version20210128152747.php | 1 - .../ChillPersonBundle/migrations/Version20210318095831.php | 1 - .../ChillPersonBundle/migrations/Version20210325141540.php | 1 - .../ChillPersonBundle/migrations/Version20210326113045.php | 1 - .../ChillPersonBundle/migrations/Version20210329090904.php | 1 - .../ChillPersonBundle/migrations/Version20210329113152.php | 1 - .../ChillPersonBundle/migrations/Version20210329144338.php | 1 - .../ChillPersonBundle/migrations/Version20210330164922.php | 1 - .../ChillPersonBundle/migrations/Version20210331084527.php | 1 - .../ChillPersonBundle/migrations/Version20210419105054.php | 1 - .../ChillPersonBundle/migrations/Version20210419105940.php | 1 - .../ChillPersonBundle/migrations/Version20210419112619.php | 1 - .../ChillPersonBundle/migrations/Version20210426145930.php | 1 - .../ChillPersonBundle/migrations/Version20210427125700.php | 1 - .../ChillPersonBundle/migrations/Version20210505093408.php | 1 - .../ChillPersonBundle/migrations/Version20210505154316.php | 1 - .../ChillPersonBundle/migrations/Version20210518075908.php | 1 - .../ChillPersonBundle/migrations/Version20210518162439.php | 1 - .../ChillPersonBundle/migrations/Version20210519204938.php | 1 - .../ChillPersonBundle/migrations/Version20210525211214.php | 1 - .../ChillPersonBundle/migrations/Version20210528092625.php | 1 - .../ChillPersonBundle/migrations/Version20210528111624.php | 1 - .../ChillPersonBundle/migrations/Version20210528132405.php | 1 - .../ChillPersonBundle/migrations/Version20210528142121.php | 1 - .../ChillPersonBundle/migrations/Version20210614191600.php | 1 - .../ChillPersonBundle/migrations/Version20210615074857.php | 1 - .../ChillPersonBundle/migrations/Version20210616102900.php | 1 - .../ChillPersonBundle/migrations/Version20210617073504.php | 1 - .../ChillPersonBundle/migrations/Version20210618080702.php | 1 - .../ChillPersonBundle/migrations/Version20210620143757.php | 1 - .../ChillPersonBundle/migrations/Version20210623135043.php | 1 - .../ChillPersonBundle/migrations/Version20210623142046.php | 1 - .../ChillPersonBundle/migrations/Version20210624131722.php | 1 - .../ChillPersonBundle/migrations/Version20210624131723.php | 1 - .../ChillPersonBundle/migrations/Version20210727152826.php | 1 - .../ChillPersonBundle/migrations/Version20210729163023.php | 1 - .../ChillPersonBundle/migrations/Version20210730094514.php | 1 - .../ChillPersonBundle/migrations/Version20210730205407.php | 1 - .../ChillPersonBundle/migrations/Version20210802202838.php | 1 - .../ChillPersonBundle/migrations/Version20210820093927.php | 1 - .../ChillPersonBundle/migrations/Version20210820100407.php | 1 - .../ChillPersonBundle/migrations/Version20210831140339.php | 1 - .../ChillPersonBundle/migrations/Version20210910161858.php | 1 - .../ChillPersonBundle/migrations/Version20210915093624.php | 1 - .../ChillPersonBundle/migrations/Version20211020131133.php | 1 - .../ChillPersonBundle/migrations/Version20211021125359.php | 1 - .../ChillPersonBundle/migrations/Version20211025141226.php | 1 - .../ChillPersonBundle/migrations/Version20211029075117.php | 1 - .../ChillPersonBundle/migrations/Version20211108100849.php | 1 - .../ChillPersonBundle/migrations/Version20211112170027.php | 1 - .../ChillPersonBundle/migrations/Version20211119211101.php | 1 - .../ChillPersonBundle/migrations/Version20211119215630.php | 1 - .../ChillPersonBundle/migrations/Version20211213150253.php | 1 - .../ChillPersonBundle/migrations/Version20211213203147.php | 1 - .../ChillPersonBundle/migrations/Version20211213213755.php | 1 - .../ChillPersonBundle/migrations/Version20211216154008.php | 1 - .../ChillPersonBundle/migrations/Version20211223150721.php | 1 - .../ChillPersonBundle/migrations/Version20220104133334.php | 1 - .../ChillPersonBundle/migrations/Version20220119091025.php | 1 - .../ChillPersonBundle/migrations/Version20220119155944.php | 1 - .../ChillPersonBundle/migrations/Version20220121121310.php | 1 - .../ChillPersonBundle/migrations/Version20220128133039.php | 1 - .../ChillPersonBundle/migrations/Version20220214200327.php | 1 - .../ChillPersonBundle/migrations/Version20220215135509.php | 1 - .../ChillPersonBundle/migrations/Version20220224145951.php | 1 - .../ChillPersonBundle/migrations/Version20220303113855.php | 1 - .../ChillPersonBundle/migrations/Version20220310063629.php | 1 - .../ChillPersonBundle/migrations/Version20220310124318.php | 1 - .../ChillPersonBundle/migrations/Version20220425000000.php | 1 - .../ChillPersonBundle/migrations/Version20220427150431.php | 1 - .../ChillPersonBundle/migrations/Version20220429133023.php | 1 - .../ChillPersonBundle/migrations/Version20220527124737.php | 1 - src/Bundle/ChillReportBundle/ChillReportBundle.php | 1 - src/Bundle/ChillReportBundle/Controller/ReportController.php | 1 - .../ChillReportBundle/DataFixtures/ORM/LoadCustomField.php | 1 - .../ChillReportBundle/DataFixtures/ORM/LoadCustomFieldsGroup.php | 1 - src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReportACL.php | 1 - src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php | 1 - .../DependencyInjection/ChillReportExtension.php | 1 - .../ChillReportBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillReportBundle/Entity/Report.php | 1 - .../ChillReportBundle/Export/Export/ReportListProvider.php | 1 - src/Bundle/ChillReportBundle/Form/ReportType.php | 1 - src/Bundle/ChillReportBundle/Search/ReportSearch.php | 1 - .../ChillReportBundle/Security/Authorization/ReportVoter.php | 1 - .../Tests/Controller/ReportControllerNextTest.php | 1 - .../ChillReportBundle/Tests/Controller/ReportControllerTest.php | 1 - .../Tests/DependencyInjection/ChillReportExtensionTest.php | 1 - src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php | 1 - .../Tests/Security/Authorization/ReportVoterTest.php | 1 - .../ChillReportBundle/Tests/Timeline/TimelineProviderTest.php | 1 - src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php | 1 - .../ChillReportBundle/migrations/Version20141129012050.php | 1 - .../ChillReportBundle/migrations/Version20150622233319.php | 1 - src/Bundle/ChillTaskBundle/ChillTaskBundle.php | 1 - src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php | 1 - src/Bundle/ChillTaskBundle/Controller/TaskController.php | 1 - src/Bundle/ChillTaskBundle/DataFixtures/ORM/LoadTaskACL.php | 1 - .../ChillTaskBundle/DependencyInjection/ChillTaskExtension.php | 1 - .../Compiler/TaskWorkflowDefinitionCompilerPass.php | 1 - src/Bundle/ChillTaskBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillTaskBundle/Entity/AbstractTask.php | 1 - src/Bundle/ChillTaskBundle/Entity/RecurringTask.php | 1 - src/Bundle/ChillTaskBundle/Entity/SingleTask.php | 1 - .../ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php | 1 - src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php | 1 - .../ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php | 1 - src/Bundle/ChillTaskBundle/Event/TaskEvent.php | 1 - src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php | 1 - src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php | 1 - src/Bundle/ChillTaskBundle/Form/SingleTaskType.php | 1 - src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php | 1 - src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php | 1 - src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php | 1 - src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php | 1 - .../ChillTaskBundle/Repository/RecurringTaskRepository.php | 1 - .../Repository/SingleTaskAclAwareRepositoryInterface.php | 1 - src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php | 1 - .../Security/Authorization/AuthorizationEvent.php | 1 - src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php | 1 - src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php | 1 - .../ChillTaskBundle/Templating/UI/CountNotificationTask.php | 1 - .../Tests/Controller/SingleTaskControllerTest.php | 1 - .../ChillTaskBundle/Tests/Controller/TaskControllerTest.php | 1 - .../Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php | 1 - .../Timeline/TaskLifeCycleEventTimelineProvider.php | 1 - .../Workflow/Definition/DefaultTaskDefinition.php | 1 - .../ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php | 1 - src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php | 1 - src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180413135614.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180413201023.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180426093011.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180502194119.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20181113161925.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20181113164108.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20210909153533.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20211029213909.php | 1 - src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php | 1 - src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php | 1 - .../Controller/ThirdPartyCategoryController.php | 1 - .../ChillThirdPartyBundle/Controller/ThirdPartyController.php | 1 - .../ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdParty.php | 1 - .../DataFixtures/ORM/LoadThirdPartyCategory.php | 1 - .../DataFixtures/ORM/LoadThirdPartyProfession.php | 1 - .../DependencyInjection/ChillThirdPartyExtension.php | 1 - .../CompilerPass/ThirdPartyTypeCompilerPass.php | 1 - .../ChillThirdPartyBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php | 1 - src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyCategory.php | 1 - src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php | 1 - .../EventListener/ThirdPartyEventListener.php | 1 - .../Form/ChoiceLoader/ThirdPartyChoiceLoader.php | 1 - src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyCategoryType.php | 1 - src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php | 1 - .../ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php | 1 - .../Form/Type/PickThirdPartyTypeCategoryType.php | 1 - .../Form/Type/PickThirdpartyDynamicType.php | 1 - src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php | 1 - .../Repository/ThirdPartyACLAwareRepository.php | 1 - .../Repository/ThirdPartyACLAwareRepositoryInterface.php | 1 - .../Repository/ThirdPartyCategoryRepository.php | 1 - .../Repository/ThirdPartyProfessionRepository.php | 1 - .../ChillThirdPartyBundle/Repository/ThirdPartyRepository.php | 1 - src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php | 1 - src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php | 1 - .../ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php | 1 - .../Serializer/Normalizer/ThirdPartyNormalizer.php | 1 - .../ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php | 1 - .../Tests/Controller/ThirdPartyControllerTest.php | 1 - src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php | 1 - .../Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php | 1 - .../Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php | 1 - .../ThirdPartyType/ThirdPartyTypeManager.php | 1 - .../ThirdPartyType/ThirdPartyTypeProviderInterface.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190307111314.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190307131650.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190418090842.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190429171109.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190502144206.php | 1 - .../ChillThirdPartyBundle/migrations/Version20210525211216.php | 1 - .../ChillThirdPartyBundle/migrations/Version20210719105918.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211006200924.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211007150459.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211007165001.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211007194942.php | 1 - .../ChillThirdPartyBundle/migrations/Version20220302143821.php | 1 - .../ChillThirdPartyBundle/migrations/Version20220322095659.php | 1 - .../ChillThirdPartyBundle/migrations/Version20220324175549.php | 1 - src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php | 1 - src/Bundle/ChillWopiBundle/src/Controller/Editor.php | 1 - .../src/DependencyInjection/ChillWopiExtension.php | 1 - .../ChillWopiBundle/src/DependencyInjection/Configuration.php | 1 - .../ChillWopiBundle/src/Resources/config/routes/routes.php | 1 - src/Bundle/ChillWopiBundle/src/Resources/config/services.php | 1 - src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php | 1 - .../src/Service/Controller/ResponderInterface.php | 1 - .../src/Service/Wopi/ChillDocumentLockManager.php | 1 - .../ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php | 1 - src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillWopi.php | 1 - .../tests/Service/Wopi/ChillDocumentLockManagerTest.php | 1 - 1470 files changed, 1470 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php index 5c6a7f5d6..5f872a7dc 100644 --- a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php +++ b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php @@ -1,6 +1,5 @@ Date: Thu, 6 Oct 2022 22:22:08 +0200 Subject: [PATCH 09/13] [Fixed] Add required import for exception handling --- .../Service/Import/AddressReferenceBEFromBestAddress.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php index 412a1269b..8dfc84bc3 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\MainBundle\Service\Import; +use Exception; use League\Csv\Reader; use League\Csv\Statement; use RuntimeException; From 6b5f746efc3fee763246dbed0b6f36ff908ae1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 00:23:07 +0200 Subject: [PATCH 10/13] Remove deprecation of `AuthorizationHelper::getReachableScope`, as it is widely used --- phpstan-deprecations.neon | 53 ------------------- .../Authorization/AuthorizationHelper.php | 2 - 2 files changed, 55 deletions(-) diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index 1f6ca4401..9a6d862b5 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -175,13 +175,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Form/ActivityType.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php - message: """ @@ -294,14 +287,6 @@ parameters: count: 1 path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Search/EventSearch.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -390,13 +375,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Export/ExportInterface.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ExportManager.php - message: """ @@ -754,14 +732,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Controller/ReportController.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -794,14 +764,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Form/ReportType.php - - message: """ #^Parameter \\$role of method Chill\\\\ReportBundle\\\\Form\\\\ReportType\\:\\:appendScopeChoices\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -810,14 +772,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Form/ReportType.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Search/ReportSearch.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -826,13 +780,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Search/ReportSearch.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 2 - path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php - message: """ diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php index f897bdb64..930a2c4d1 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php @@ -190,8 +190,6 @@ class AuthorizationHelper implements AuthorizationHelperInterface /** * Return all reachable scope for a given user, center and role. * - * @deprecated Use getReachableCircles - * * @param Center|Center[] $center * * @return array|Scope[] From add71ea373843a0c32df45cb689d45673086a755 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 7 Oct 2022 15:04:27 +0200 Subject: [PATCH 11/13] add scope to docs if required --- .../Service/DocGenerator/PersonContext.php | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php index 8fbd639c9..cfb24dda0 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Service\DocGenerator; use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface; +use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface; use Chill\DocGeneratorBundle\Context\Exception\UnexpectedTypeException; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Chill\DocGeneratorBundle\Service\Context\BaseContextData; @@ -19,6 +20,8 @@ use Chill\DocStoreBundle\Entity\DocumentCategory; use Chill\DocStoreBundle\Entity\PersonDocument; use Chill\DocStoreBundle\Entity\StoredObject; use Chill\DocStoreBundle\Repository\DocumentCategoryRepository; +use Chill\MainBundle\Form\ScopeType; +use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\Person; use DateTime; @@ -31,7 +34,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; -class PersonContext implements DocGeneratorContextWithAdminFormInterface +class PersonContext implements DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithPublicFormInterface { private BaseContextData $baseContextData; @@ -45,13 +48,16 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface private TranslatorInterface $translator; + private AuthorizationHelper $authorizationHelper; + public function __construct( DocumentCategoryRepository $documentCategoryRepository, NormalizerInterface $normalizer, TranslatableStringHelperInterface $translatableStringHelper, EntityManagerInterface $em, TranslatorInterface $translator, - BaseContextData $baseContextData + BaseContextData $baseContextData, + AuthorizationHelper $authorizationHelper ) { $this->documentCategoryRepository = $documentCategoryRepository; $this->normalizer = $normalizer; @@ -59,6 +65,7 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface $this->em = $em; $this->baseContextData = $baseContextData; $this->translator = $translator; + $this->authorizationHelper = $authorizationHelper; } public function adminFormReverseTransform(array $data): array @@ -178,6 +185,42 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface ); } + if ($this->showScopes()) { + + $scopes = $this->authorizationHelper->getReachableScopes(); + + if (count($scopes > 1)) + { + $scope = $this->getFormData(); + $doc->setScope($scope); + + } else { + + $doc->setScope($scopes[0]); + + } + } + $this->em->persist($doc); } + + public function showScopes(){ + return $this->parameterBag->get('chill_main')['acl']['form_show_scopes']; + } + + public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void + { + $builder->add('Center', ScopeType::class, [ + 'required' => true + ]); + } + + public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool + { + if ($this->showScopes()) { + return true; + } else { + return false; + } + } } From a2d85d471021604068cad1a52b2b463ca736acdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 00:02:02 +0200 Subject: [PATCH 12/13] DX: deprecated ProphecyTrait in favour of the one coming from Prophecy\PhpUnit package. --- src/Bundle/ChillMainBundle/Test/ProphecyTrait.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php b/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php index a6b903af5..7f59b5dd8 100644 --- a/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php +++ b/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php @@ -17,6 +17,7 @@ namespace Chill\MainBundle\Test; * **Usage : ** You must set up trait with `setUpTrait` before use * and use tearDownTrait after usage. * + * @deprecated use @see{\Prophecy\PhpUnit\ProphecyTrait} instead * @codeCoverageIgnore */ trait ProphecyTrait From 391bbfa32a9515e89684b7ef8e82ceff6ed44edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 00:21:37 +0200 Subject: [PATCH 13/13] Fixed: add scope to generated document ref #11 --- .../Service/DocGenerator/PersonContext.php | 120 +++++--- .../DocGenerator/PersonContextTest.php | 265 ++++++++++++++++++ 2 files changed, 342 insertions(+), 43 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php index cfb24dda0..a9ebdc0bb 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php @@ -20,52 +20,72 @@ use Chill\DocStoreBundle\Entity\DocumentCategory; use Chill\DocStoreBundle\Entity\PersonDocument; use Chill\DocStoreBundle\Entity\StoredObject; use Chill\DocStoreBundle\Repository\DocumentCategoryRepository; -use Chill\MainBundle\Form\ScopeType; +use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter; +use Chill\MainBundle\Entity\Scope; +use Chill\MainBundle\Form\Type\ScopePickerType; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; +use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface; +use Chill\MainBundle\Security\Resolver\CenterResolverManagerInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\Person; use DateTime; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; +use LogicException; use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Security\Core\Security; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; +use function count; class PersonContext implements DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithPublicFormInterface { + private AuthorizationHelperInterface $authorizationHelper; + private BaseContextData $baseContextData; + private CenterResolverManagerInterface $centerResolverManager; + private DocumentCategoryRepository $documentCategoryRepository; private EntityManagerInterface $em; private NormalizerInterface $normalizer; + private Security $security; + + private bool $showScopes; + private TranslatableStringHelperInterface $translatableStringHelper; private TranslatorInterface $translator; - private AuthorizationHelper $authorizationHelper; - public function __construct( - DocumentCategoryRepository $documentCategoryRepository, - NormalizerInterface $normalizer, - TranslatableStringHelperInterface $translatableStringHelper, - EntityManagerInterface $em, - TranslatorInterface $translator, + AuthorizationHelperInterface $authorizationHelper, BaseContextData $baseContextData, - AuthorizationHelper $authorizationHelper + CenterResolverManagerInterface $centerResolverManager, + DocumentCategoryRepository $documentCategoryRepository, + EntityManagerInterface $em, + NormalizerInterface $normalizer, + ParameterBagInterface $parameterBag, + Security $security, + TranslatorInterface $translator, + TranslatableStringHelperInterface $translatableStringHelper ) { - $this->documentCategoryRepository = $documentCategoryRepository; - $this->normalizer = $normalizer; - $this->translatableStringHelper = $translatableStringHelper; - $this->em = $em; - $this->baseContextData = $baseContextData; - $this->translator = $translator; $this->authorizationHelper = $authorizationHelper; + $this->centerResolverManager = $centerResolverManager; + $this->baseContextData = $baseContextData; + $this->documentCategoryRepository = $documentCategoryRepository; + $this->em = $em; + $this->normalizer = $normalizer; + $this->security = $security; + $this->showScopes = $parameterBag->get('chill_main')['acl']['form_show_scopes']; + $this->translator = $translator; + $this->translatableStringHelper = $translatableStringHelper; } public function adminFormReverseTransform(array $data): array @@ -112,6 +132,18 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface, DocGen ]); } + /** + * @param Person $entity + */ + public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void + { + $builder->add('scope', ScopePickerType::class, [ + 'center' => $this->centerResolverManager->resolveCenters($entity), + 'role' => PersonDocumentVoter::CREATE, + 'label' => 'Scope', + ]); + } + public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array { if (!$entity instanceof Person) { @@ -163,6 +195,14 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface, DocGen return true; } + /** + * @param Person $entity + */ + public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool + { + return $this->isScopeNecessary($entity); + } + /** * @param Person $entity */ @@ -185,42 +225,36 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface, DocGen ); } - if ($this->showScopes()) { - - $scopes = $this->authorizationHelper->getReachableScopes(); - - if (count($scopes > 1)) - { - $scope = $this->getFormData(); - $doc->setScope($scope); - - } else { - - $doc->setScope($scopes[0]); + if ($this->isScopeNecessary($entity)) { + $doc->setScope($contextGenerationData['scope']); + } elseif ($this->showScopes) { + // in this case, it should have only one scope possible, we get it through AuthorizationHelper::getReachableScopes + $scopes = $this->authorizationHelper->getReachableScopes( + $this->security->getUser(), + PersonDocumentVoter::CREATE, + $this->centerResolverManager->resolveCenters($entity) + ); + if (1 !== count($scopes)) { + throw new LogicException('at this step, it should have only one scope'); } + + $doc->setScope($scopes[0]); } $this->em->persist($doc); } - public function showScopes(){ - return $this->parameterBag->get('chill_main')['acl']['form_show_scopes']; - } - - public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void + private function isScopeNecessary(Person $person): bool { - $builder->add('Center', ScopeType::class, [ - 'required' => true - ]); - } - - public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool - { - if ($this->showScopes()) { + if ($this->showScopes && 1 < $this->authorizationHelper->getReachableScopes( + $this->security->getUser(), + PersonDocumentVoter::CREATE, + $this->centerResolverManager->resolveCenters($person) + )) { return true; - } else { - return false; } + + return false; } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php new file mode 100644 index 000000000..c7c9a00e4 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php @@ -0,0 +1,265 @@ +setName(['fr' => 'template']); + + $parameter = new ParameterBag(['chill_main' => ['acl' => ['form_show_scopes' => false]]]); + $em = $this->prophesize(EntityManagerInterface::class); + $em->persist(Argument::type(PersonDocument::class)) + ->should(static function ($calls, $object, $method) { + if (1 !== count($calls)) { + throw new FailedPredictionException(sprintf('the persist should be called exactly once, %d receivved', count($calls))); + } + + /** @var PersonDocument $personDocument */ + $personDocument = $calls[0]->getArguments()[0]; + + if (null !== $personDocument->getScope()) { + throw new FailedPredictionException('the person document should not have any scope'); + } + }); + + $personContext = $this->buildPersonContext( + null, + null, + null, + null, + $em->reveal(), + null, + $parameter + ); + + $this->assertFalse($personContext->hasPublicForm($docGen, $person)); + + $personContext->storeGenerated( + $docGen, + new StoredObject(), + $person, + [] + ); + } + + public function testScopeScopeMustBeShownInFormsAndUserAccessMultipleScope() + { + $person = new Person(); + $docGen = (new DocGeneratorTemplate()) + ->setName(['fr' => 'template']); + $scope = new Scope(); + + $em = $this->prophesize(EntityManagerInterface::class); + $em->persist(Argument::type(PersonDocument::class)) + ->should(static function ($calls, $object, $method) use ($scope) { + if (1 !== count($calls)) { + throw new FailedPredictionException(sprintf('the persist should be called exactly once, %d receivved', count($calls))); + } + + /** @var PersonDocument $personDocument */ + $personDocument = $calls[0]->getArguments()[0]; + + if ($personDocument->getScope() !== $scope) { + throw new FailedPredictionException('the person document should show the exactly prepared scope'); + } + }); + + $authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class); + $authorizationHelper->getReachableScopes(Argument::type(UserInterface::class), PersonDocumentVoter::CREATE, Argument::type('array')) + ->willReturn([$scope, new Scope()]); + + $personContext = $this->buildPersonContext( + $authorizationHelper->reveal(), + null, + null, + null, + $em->reveal(), + ); + + $this->assertTrue($personContext->hasPublicForm($docGen, $person)); + + $personContext->storeGenerated( + $docGen, + new StoredObject(), + $person, + ['scope' => $scope] + ); + } + + public function testScopeScopeMustBeShownInFormsAndUserAccessOneScope() + { + $person = new Person(); + $docGen = (new DocGeneratorTemplate()) + ->setName(['fr' => 'template']); + $scope = new Scope(); + + $em = $this->prophesize(EntityManagerInterface::class); + $em->persist(Argument::type(PersonDocument::class)) + ->should(static function ($calls, $object, $method) use ($scope) { + if (1 !== count($calls)) { + throw new FailedPredictionException(sprintf('the persist should be called exactly once, %d receivved', count($calls))); + } + + /** @var PersonDocument $personDocument */ + $personDocument = $calls[0]->getArguments()[0]; + + if ($personDocument->getScope() !== $scope) { + throw new FailedPredictionException('the person document should show the exactly prepared scope'); + } + }); + + $authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class); + $authorizationHelper->getReachableScopes(Argument::type(UserInterface::class), PersonDocumentVoter::CREATE, Argument::type('array')) + ->willReturn([$scope]); + + $personContext = $this->buildPersonContext( + $authorizationHelper->reveal(), + null, + null, + null, + $em->reveal(), + ); + + $this->assertTrue($personContext->hasPublicForm($docGen, $person)); + + $personContext->storeGenerated( + $docGen, + new StoredObject(), + $person, + ['scope' => $scope] + ); + } + + private function buildPersonContext( + ?AuthorizationHelperInterface $authorizationHelper = null, + ?BaseContextData $baseContextData = null, + ?CenterResolverManagerInterface $centerResolverManager = null, + ?DocumentCategoryRepository $documentCategoryRepository = null, + ?EntityManagerInterface $em = null, + ?NormalizerInterface $normalizer = null, + ?ParameterBagInterface $parameterBag = null, + ?Security $security = null, + ?TranslatorInterface $translator = null, + ?TranslatableStringHelperInterface $translatableStringHelper = null + ): PersonContext { + if (null === $authorizationHelper) { + $authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class)->reveal(); + } + + if (null === $baseContextData) { + $baseContextData = $this->prophesize(BaseContextData::class)->reveal(); + } + + if (null === $centerResolverManager) { + $centerResolverManager = $this->prophesize(CenterResolverManagerInterface::class); + $centerResolverManager->resolveCenters(Argument::any(), Argument::any()) + ->willReturn([new Center()]); + $centerResolverManager = $centerResolverManager->reveal(); + } + + if (null === $documentCategoryRepository) { + $documentCategoryRepository = $this->prophesize(DocumentCategoryRepository::class); + $documentCategoryRepository->find(Argument::type('integer'))->willReturn( + new DocumentCategory(PersonDocument::class, 1) + ); + $documentCategoryRepository = $documentCategoryRepository->reveal(); + } + + if (null === $em) { + $em = $this->prophesize(EntityManagerInterface::class)->reveal(); + } + + if (null === $normalizer) { + $normalizer = $this->prophesize(NormalizerInterface::class); + $normalizer->normalize(Argument::type(Person::class), 'docgen', Argument::any()) + ->willReturn(['type' => 'person']); + $normalizer = $normalizer->reveal(); + } + + if (null === $parameterBag) { + $parameterBag = new ParameterBag(['chill_main' => ['acl' => ['form_show_scopes' => true]]]); + } + + if (null === $security) { + $security = $this->prophesize(Security::class); + $security->getUser()->willReturn(new User()); + $security = $security->reveal(); + } + + if (null === $translator) { + $translator = $this->prophesize(TranslatorInterface::class)->reveal(); + } + + if (null === $translatableStringHelper) { + $translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class); + // return only the 'fr' key + $translatableStringHelper->localize(Argument::type('array'))->will(static function ($args) { + return $args[0]['fr']; + }); + $translatableStringHelper = $translatableStringHelper->reveal(); + } + + return new PersonContext( + $authorizationHelper, + $baseContextData, + $centerResolverManager, + $documentCategoryRepository, + $em, + $normalizer, + $parameterBag, + $security, + $translator, + $translatableStringHelper + ); + } +}