diff --git a/.php_cs.dist.php b/.php_cs.dist.php index 86c5c62c2..4ad5af914 100644 --- a/.php_cs.dist.php +++ b/.php_cs.dist.php @@ -21,11 +21,7 @@ $config $rules = $config->getRules(); $riskyRules = [ - 'final_internal_class' => false, - 'strict_param' => false, - 'declare_strict_types' => false, 'ternary_to_elvis_operator' => false, - 'strict_comparison' => false, 'php_unit_mock_short_will_return' => false, 'php_unit_set_up_tear_down_visibility' => false, 'php_unit_construct' => false, @@ -36,6 +32,10 @@ $riskyRules = [ 'php_unit_no_expectation_annotation' => false, 'php_unit_test_case_static_method_calls' => false, 'php_unit_test_annotation' => false, + // 'final_internal_class' => false, + // 'strict_param' => false, + // 'declare_strict_types' => false, + // 'strict_comparison' => false, // 'no_unreachable_default_argument_value' => false, // 'ereg_to_preg' => false, // 'ordered_interfaces' => false, diff --git a/docs/source/_static/code/exports/BirthdateFilter.php b/docs/source/_static/code/exports/BirthdateFilter.php index e3ca24e72..b7675215b 100644 --- a/docs/source/_static/code/exports/BirthdateFilter.php +++ b/docs/source/_static/code/exports/BirthdateFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\PersonBundle\Export\Filter; use Chill\MainBundle\Export\ExportElementValidatedInterface; diff --git a/docs/source/_static/code/exports/CountPerson.php b/docs/source/_static/code/exports/CountPerson.php index 343108898..bfbc73873 100644 --- a/docs/source/_static/code/exports/CountPerson.php +++ b/docs/source/_static/code/exports/CountPerson.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\PersonBundle\Export\Export; use Chill\MainBundle\Export\ExportInterface; diff --git a/docs/source/development/pagination/example.php b/docs/source/development/pagination/example.php index f86cd5bb2..e3ab97530 100644 --- a/docs/source/development/pagination/example.php +++ b/docs/source/development/pagination/example.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MyBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; diff --git a/docs/source/development/useful-snippets/controller-secured-for-person.php b/docs/source/development/useful-snippets/controller-secured-for-person.php index dab116cef..6ab18b14b 100644 --- a/docs/source/development/useful-snippets/controller-secured-for-person.php +++ b/docs/source/development/useful-snippets/controller-secured-for-person.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\HealthBundle\Controller; use Chill\HealthBundle\Security\Authorization\ConsultationVoter; diff --git a/docs/source/development/user-interface/widgets/ChillMainConfiguration.php b/docs/source/development/user-interface/widgets/ChillMainConfiguration.php index 94ff340a2..c2bb41262 100644 --- a/docs/source/development/user-interface/widgets/ChillMainConfiguration.php +++ b/docs/source/development/user-interface/widgets/ChillMainConfiguration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait; diff --git a/docs/source/development/user-interface/widgets/ChillMainExtension.php b/docs/source/development/user-interface/widgets/ChillMainExtension.php index 1a784fd5f..4ad56eb73 100644 --- a/docs/source/development/user-interface/widgets/ChillMainExtension.php +++ b/docs/source/development/user-interface/widgets/ChillMainExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface; diff --git a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php index d8d2d6ca5..1ce8529c5 100644 --- a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php +++ b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\PersonBundle\Widget; use Chill\MainBundle\DependencyInjection\Widget\Factory\AbstractWidgetFactory; diff --git a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php index 44f1d2983..71f840a34 100644 --- a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php +++ b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\PersonBundle\Widget; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; diff --git a/docs/source/development/user-interface/widgets/ChillPersonExtension.php b/docs/source/development/user-interface/widgets/ChillPersonExtension.php index b5ed095a0..a42141509 100644 --- a/docs/source/development/user-interface/widgets/ChillPersonExtension.php +++ b/docs/source/development/user-interface/widgets/ChillPersonExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\PersonBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php index f449ac07f..fb2eae20d 100644 --- a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php +++ b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php index a748641a8..c56a17181 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Controller; use Chill\ActivityBundle\Entity\ActivityReasonCategory; diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php index 6c48229de..19aaa6c2b 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Controller; use Chill\ActivityBundle\Entity\ActivityReason; diff --git a/src/Bundle/ChillActivityBundle/Controller/AdminActivityPresenceController.php b/src/Bundle/ChillActivityBundle/Controller/AdminActivityPresenceController.php index 4bcdcbed5..6a79f1afa 100644 --- a/src/Bundle/ChillActivityBundle/Controller/AdminActivityPresenceController.php +++ b/src/Bundle/ChillActivityBundle/Controller/AdminActivityPresenceController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeCategoryController.php b/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeCategoryController.php index 8af556cb2..6e72e5e3a 100644 --- a/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeCategoryController.php +++ b/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeCategoryController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeController.php b/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeController.php index 81c978bf2..4e01bd9dd 100644 --- a/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeController.php +++ b/src/Bundle/ChillActivityBundle/Controller/AdminActivityTypeController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillActivityBundle/Controller/AdminController.php b/src/Bundle/ChillActivityBundle/Controller/AdminController.php index 16de242fb..81611d3f9 100644 --- a/src/Bundle/ChillActivityBundle/Controller/AdminController.php +++ b/src/Bundle/ChillActivityBundle/Controller/AdminController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php index 2683b0abf..97fda4229 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php index 38ea21c1f..34fa949a3 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReason.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReason.php index f840c988b..9b334873b 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReason.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReason.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Entity\ActivityReason; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReasonCategory.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReasonCategory.php index 72f93e411..081e5ebeb 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReasonCategory.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityReasonCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Entity\ActivityReasonCategory; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityType.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityType.php index 6c641aceb..1c2b137d1 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityType.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Entity\ActivityType; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityTypeCategory.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityTypeCategory.php index e98a9bb7d..abd04e9cc 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityTypeCategory.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityTypeCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Entity\ActivityTypeCategory; diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivitytACL.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivitytACL.php index 3ebf2f6fe..798392aa7 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivitytACL.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivitytACL.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DataFixtures\ORM; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; @@ -48,7 +57,7 @@ class LoadActivitytACL extends AbstractFixture implements OrderedFixtureInterfac case 'administrative': case 'direction': - if (in_array($scope->getName()['en'], ['administrative', 'social'])) { + if (in_array($scope->getName()['en'], ['administrative', 'social'], true)) { break 2; // we do not want any power on social or administrative } diff --git a/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php b/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php index cec67e671..7814893c6 100644 --- a/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php +++ b/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DependencyInjection; use Chill\ActivityBundle\Security\Authorization\ActivityVoter; diff --git a/src/Bundle/ChillActivityBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillActivityBundle/DependencyInjection/Configuration.php index ad9bbac76..14ea8029b 100644 --- a/src/Bundle/ChillActivityBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillActivityBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index d09028dba..16b4640fc 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Entity; use Chill\ActivityBundle\Validator\Constraints as ActivityValidator; diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityPresence.php b/src/Bundle/ChillActivityBundle/Entity/ActivityPresence.php index 087469692..2f1e01026 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityPresence.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityPresence.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php b/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php index 69adaf843..afe4b3c29 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php b/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php index 722cdaa08..b8b352ed2 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php index 4cb4250b5..494bce9dc 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index 957e3e748..11d268c3d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Export\Aggregator; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; diff --git a/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php index 2dca1b220..8fcb6ec6f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php @@ -206,7 +206,7 @@ class ListActivity implements ListInterface ->setParameter('authorized_centers', $centers); foreach ($this->fields as $f) { - if (in_array($f, $data['fields'])) { + if (in_array($f, $data['fields'], true)) { switch ($f) { case 'id': $qb->addSelect('activity.id AS id'); diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php b/src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php index 105812caa..b8d520d27 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form; use Chill\ActivityBundle\Entity\ActivityPresence; diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php b/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php index 2f3589d7a..255377903 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php b/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php index 38c65bb2a..65bb90059 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form; use Chill\ActivityBundle\Form\Type\TranslatableActivityReasonCategory; diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 9846c9a7d..d2431dbb5 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form; use Chill\ActivityBundle\Entity\Activity; @@ -385,7 +394,7 @@ class ActivityType extends AbstractType // test if the timestamp is in the choices. // If not, recreate the field with the new timestamp - if (!in_array($data->getTimestamp(), $timeChoices)) { + if (!in_array($data->getTimestamp(), $timeChoices, true)) { // the data are not in the possible values. add them $timeChoices[$data->format('H:i')] = $data->getTimestamp(); $form = $builder->create($fieldName, ChoiceType::class, array_merge( diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityTypeCategoryType.php b/src/Bundle/ChillActivityBundle/Form/ActivityTypeCategoryType.php index 081f8ac99..594a53a9c 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityTypeCategoryType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityTypeCategoryType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form; use Chill\ActivityBundle\Entity\ActivityTypeCategory; diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php b/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php index 682d73aaf..a05a9365d 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form; use Chill\ActivityBundle\Entity\ActivityTypeCategory; diff --git a/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php b/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php index 960762d35..872f4713e 100644 --- a/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php +++ b/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form\Type; use Chill\ActivityBundle\Entity\ActivityType; diff --git a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReason.php b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReason.php index 65350c84c..ded7df384 100644 --- a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReason.php +++ b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReason.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form\Type; use Chill\ActivityBundle\Entity\ActivityReason; diff --git a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategory.php b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategory.php index 79611e425..6aff50475 100644 --- a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategory.php +++ b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Form\Type; use Doctrine\ORM\EntityRepository; diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php index 8c3ed58f3..b1642137b 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Menu; use Chill\ActivityBundle\Security\Authorization\ActivityVoter; diff --git a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php index f734ff6a0..58b0825dc 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php @@ -31,7 +31,7 @@ final class AdminMenuBuilder implements LocalMenuBuilderInterface return; } - if (in_array($menuId, ['admin_index', 'admin_section'])) { + if (in_array($menuId, ['admin_index', 'admin_section'], true)) { $menu->addChild('Activities', [ 'route' => 'chill_admin_activity_index', ]) diff --git a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php index 23df91954..f5059b7b3 100644 --- a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Menu; use Chill\ActivityBundle\Security\Authorization\ActivityVoter; diff --git a/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php b/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php index 79290f2aa..cded77198 100644 --- a/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php +++ b/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Notification; use Chill\ActivityBundle\Entity\Activity; @@ -26,6 +35,6 @@ final class ActivityNotificationRenderer public function supports(Notification $notification, array $options = []): bool { - return $notification->getRelatedEntityClass() == Activity::class; + return $notification->getRelatedEntityClass() === Activity::class; } } diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php index 2c92f9e85..e80dc5522 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php @@ -160,7 +160,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte foreach ($reachableCenters as $center) { // we pass if not in centers - if (!in_array($center, $args['centers'])) { + if (!in_array($center, $args['centers'], true)) { continue; } // we get all the reachable scopes for this center diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepositoryInterface.php b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepositoryInterface.php index b09f62115..3bad5aff5 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Repository; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php index ac7b207d0..c859315ed 100644 --- a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php +++ b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; diff --git a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php index a2dfe7f92..6f199176e 100644 --- a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php +++ b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Composer\Autoload\ClassLoader; use Doctrine\Common\Annotations\AnnotationRegistry; diff --git a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/cache/dev/appDevDebugProjectContainer.php b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/cache/dev/appDevDebugProjectContainer.php index 7beb848ce..f77202a37 100644 --- a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/cache/dev/appDevDebugProjectContainer.php +++ b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/cache/dev/appDevDebugProjectContainer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\InactiveScopeException; diff --git a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/web/app_dev.php b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/web/app_dev.php index 3122a0243..cce0df8eb 100644 --- a/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/web/app_dev.php +++ b/src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/web/app_dev.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\Debug\Debug; use Symfony\Component\HttpFoundation\Request; @@ -18,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request; // Feel free to remove this, extend it, or make something more sophisticated. if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) - || !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || \PHP_SAPI === 'cli-server') + || !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1'], true) || \PHP_SAPI === 'cli-server') ) { header('HTTP/1.0 403 Forbidden'); diff --git a/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php b/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php index 7c850c67d..4579a41fa 100644 --- a/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php +++ b/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Security\Authorization; use Chill\MainBundle\Entity\Center; @@ -63,7 +72,7 @@ class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierar protected function supports($attribute, $subject) { if ($subject instanceof Center - && in_array($attribute, $this->getAttributes())) { + && in_array($attribute, $this->getAttributes(), true)) { return true; } diff --git a/src/Bundle/ChillActivityBundle/Templating/Entity/ActivityReasonRender.php b/src/Bundle/ChillActivityBundle/Templating/Entity/ActivityReasonRender.php index f095e13e5..9eb1ead64 100644 --- a/src/Bundle/ChillActivityBundle/Templating/Entity/ActivityReasonRender.php +++ b/src/Bundle/ChillActivityBundle/Templating/Entity/ActivityReasonRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Templating\Entity; use Chill\ActivityBundle\Entity\ActivityReason; diff --git a/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php b/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php index 2942b7948..ee172994d 100644 --- a/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php +++ b/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Test; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php index 728a76c26..d032aed95 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Controller; use RuntimeException; @@ -19,11 +28,11 @@ use function in_array; * @internal * @coversNothing */ -class ActivityControllerTest extends WebTestCase +final class ActivityControllerTest extends WebTestCase { public function getSecuredPagesAuthenticated() { - static::bootKernel(); + self::bootKernel(); $person = $this->getPersonFromFixtures(); $activities = $this->getActivitiesForPerson($person); @@ -59,7 +68,7 @@ class ActivityControllerTest extends WebTestCase */ public function getSecuredPagesUnauthenticated() { - static::bootKernel(); + self::bootKernel(); $person = $this->getPersonFromFixtures(); $activities = $this->getActivitiesForPerson($person); @@ -202,7 +211,7 @@ class ActivityControllerTest extends WebTestCase */ private function createFakeUser() { - $container = static::$kernel->getContainer(); + $container = self::$kernel->getContainer(); $em = $container->get('doctrine.orm.entity_manager'); //get the social PermissionGroup, and remove CHILL_ACTIVITY_* @@ -244,7 +253,7 @@ class ActivityControllerTest extends WebTestCase private function getActivitiesForPerson(\Chill\PersonBundle\Entity\Person $person) { - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $activities = $em->getRepository('ChillActivityBundle:Activity') @@ -265,7 +274,7 @@ class ActivityControllerTest extends WebTestCase */ private function getAuthenticatedClient($username = 'center a_social') { - return static::createClient([], [ + return self::createClient([], [ 'PHP_AUTH_USER' => $username, 'PHP_AUTH_PW' => 'password', ]); @@ -276,7 +285,7 @@ class ActivityControllerTest extends WebTestCase */ private function getPersonFromFixtures() { - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $person = $em->getRepository('ChillPersonBundle:Person') @@ -300,14 +309,14 @@ class ActivityControllerTest extends WebTestCase */ private function getRandomActivityReason(array $excludeIds = []) { - $reasons = static::$kernel->getContainer() + $reasons = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillActivityBundle:ActivityReason') ->findAll(); $reason = $reasons[array_rand($reasons)]; - if (in_array($reason->getId(), $excludeIds)) { + if (in_array($reason->getId(), $excludeIds, true)) { return $this->getRandomActivityReason($excludeIds); } @@ -319,7 +328,7 @@ class ActivityControllerTest extends WebTestCase */ private function getRandomActivityType() { - $types = static::$kernel->getContainer() + $types = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillActivityBundle:ActivityType') ->findAll(); @@ -335,7 +344,7 @@ class ActivityControllerTest extends WebTestCase */ private function getRandomScope($username, $centerName) { - $user = static::$kernel->getContainer() + $user = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillMainBundle:User') ->findOneByUsername($username); @@ -345,20 +354,20 @@ class ActivityControllerTest extends WebTestCase . 'does not exists in database. Did you add fixtures ?'); } - $center = static::$kernel->getContainer() + $center = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillMainBundle:Center') ->findOneByName($centerName); // get scope reachable by both role UPDATE and DELETE - $reachableScopesUpdate = static::$kernel->getContainer() + $reachableScopesUpdate = self::$kernel->getContainer() ->get('chill.main.security.authorization.helper') ->getReachableScopes( $user, new Role('CHILL_ACTIVITY_UPDATE'), $center ); - $reachableScopesDelete = static::$kernel->getContainer() + $reachableScopesDelete = self::$kernel->getContainer() ->get('chill.main.security.authorization.helper') ->getReachableScopes( $user, @@ -376,7 +385,7 @@ class ActivityControllerTest extends WebTestCase } foreach ($reachableScopesUpdate as $scope) { - if (in_array($scope->getId(), $reachableScopesId)) { + if (in_array($scope->getId(), $reachableScopesId, true)) { $reachableScopes[] = $scope; } } diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php index dde5ed304..6de88c18c 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ActivityReasonCategoryControllerTest extends WebTestCase +final class ActivityReasonCategoryControllerTest extends WebTestCase { public function testToWrite() { diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php index 88a41206b..370763bcc 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ActivityReasonControllerTest extends WebTestCase +final class ActivityReasonControllerTest extends WebTestCase { public function testToWrite() { diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php index 42b2106a1..63bf84159 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ActivityTypeControllerTest extends WebTestCase +final class ActivityTypeControllerTest extends WebTestCase { public function testToWrite() { diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php index d0a164cd2..239bebeb2 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Aggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; @@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest; * @internal * @coversNothing */ -class ActivityReasonAggregatorTest extends AbstractAggregatorTest +final class ActivityReasonAggregatorTest extends AbstractAggregatorTest { /** * @var \Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator @@ -26,9 +35,9 @@ class ActivityReasonAggregatorTest extends AbstractAggregatorTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $container = static::$kernel->getContainer(); + $container = self::$kernel->getContainer(); $this->aggregator = $container->get('chill.activity.export.reason_aggregator'); @@ -57,11 +66,11 @@ class ActivityReasonAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php index a1803809d..b63800218 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Aggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; @@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest; * @internal * @coversNothing */ -class ActivityTypeAggregatorTest extends AbstractAggregatorTest +final class ActivityTypeAggregatorTest extends AbstractAggregatorTest { /** * @var \Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator @@ -26,9 +35,9 @@ class ActivityTypeAggregatorTest extends AbstractAggregatorTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $container = static::$kernel->getContainer(); + $container = self::$kernel->getContainer(); $this->aggregator = $container->get('chill.activity.export.type_aggregator'); @@ -56,11 +65,11 @@ class ActivityTypeAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php index c47df37a9..9b347aef5 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Aggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; @@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest; * @internal * @coversNothing */ -class ActivityUserAggregatorTest extends AbstractAggregatorTest +final class ActivityUserAggregatorTest extends AbstractAggregatorTest { /** * @var \Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator @@ -26,9 +35,9 @@ class ActivityUserAggregatorTest extends AbstractAggregatorTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $container = static::$kernel->getContainer(); + $container = self::$kernel->getContainer(); $this->aggregator = $container->get('chill.activity.export.user_aggregator'); @@ -56,11 +65,11 @@ class ActivityUserAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php index ffc13f6b3..9a6f16caa 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Export\Export; use Chill\MainBundle\Test\Export\AbstractExportTest; @@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest; * @internal * @coversNothing */ -class CountActivityTest extends AbstractExportTest +final class CountActivityTest extends AbstractExportTest { /** * @var @@ -24,7 +33,7 @@ class CountActivityTest extends AbstractExportTest public function setUp() { - static::bootKernel(); + self::bootKernel(); /** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */ $container = self::$kernel->getContainer(); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php index c71aee64f..50397cf69 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Export\Export; use Chill\MainBundle\Test\Export\AbstractExportTest; @@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest; * @internal * @coversNothing */ -class ListActivityTest extends AbstractExportTest +final class ListActivityTest extends AbstractExportTest { /** * @var \Chill\ActivityBundle\Export\Export\ListActivity @@ -24,7 +33,7 @@ class ListActivityTest extends AbstractExportTest public function setUp() { - static::bootKernel(); + self::bootKernel(); /** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */ $container = self::$kernel->getContainer(); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php index ce8d2e312..61ac4cd7c 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Export\Export; use Chill\MainBundle\Test\Export\AbstractExportTest; @@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest; * @internal * @coversNothing */ -class StatActivityDurationSumTest extends AbstractExportTest +final class StatActivityDurationSumTest extends AbstractExportTest { /** * @var \Chill\ActivityBundle\Export\Export\StatActivityDuration @@ -26,7 +35,7 @@ class StatActivityDurationSumTest extends AbstractExportTest public function setUp() { - static::bootKernel(); + self::bootKernel(); /** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */ $container = self::$kernel->getContainer(); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php index 13f2ae2c4..29484f9fd 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Filter; use Chill\MainBundle\Test\Export\AbstractFilterTest; @@ -16,7 +25,7 @@ use Doctrine\Common\Collections\ArrayCollection; * @internal * @coversNothing */ -class ActivityReasonFilterTest extends AbstractFilterTest +final class ActivityReasonFilterTest extends AbstractFilterTest { /** * @var \Chill\PersonBundle\Export\Filter\GenderFilter @@ -25,9 +34,9 @@ class ActivityReasonFilterTest extends AbstractFilterTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $container = static::$kernel->getContainer(); + $container = self::$kernel->getContainer(); $this->filter = $container->get('chill.activity.export.reason_filter'); @@ -48,11 +57,11 @@ class ActivityReasonFilterTest extends AbstractFilterTest public function getFormData() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $reasons = $em->createQuery('SELECT reason ' @@ -69,11 +78,11 @@ class ActivityReasonFilterTest extends AbstractFilterTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php index d422957f4..bc2d0969c 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Filter; use Chill\MainBundle\Test\Export\AbstractFilterTest; @@ -17,7 +26,7 @@ use function array_slice; * @internal * @coversNothing */ -class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest +final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { /** * @var \Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter @@ -26,9 +35,9 @@ class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $container = static::$kernel->getContainer(); + $container = self::$kernel->getContainer(); $this->filter = $container->get('chill.activity.export.' . 'person_having_an_activity_between_date_filter'); @@ -69,11 +78,11 @@ class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); return [ @@ -98,11 +107,11 @@ class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest */ private function getActivityReasons() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - return static::$kernel->getContainer() + return self::$kernel->getContainer() ->get('chill_activity.repository.reason') ->findAll(); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php index 6cd46ccbe..2d27a04b9 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Form; use Chill\ActivityBundle\Entity\Activity; @@ -21,7 +30,7 @@ use Symfony\Component\Security\Core\Role\Role; * @internal * @coversNothing */ -class ActivityTypeTest extends KernelTestCase +final class ActivityTypeTest extends KernelTestCase { /** * @var \Chill\MainBundle\Entity\Center diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php index 8e83f5a1d..5fe59def5 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Form\Type; use Chill\ActivityBundle\Form\Type\TranslatableActivityReason; @@ -20,7 +29,7 @@ use Symfony\Component\Form\Test\TypeTestCase; * @internal * @coversNothing */ -class TranslatableActivityReasonTest extends TypeTestCase +final class TranslatableActivityReasonTest extends TypeTestCase { /** * @var Prophecy\Prophet diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php index 1e5a6714b..4c7c8b0fc 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Form\Type; use Chill\ActivityBundle\Form\Type\TranslatableActivityType; @@ -17,7 +26,7 @@ use Symfony\Component\Form\Extension\Core\Type\FormType; * @internal * @coversNothing */ -class TranslatableActivityTypeTest extends KernelTestCase +final class TranslatableActivityTypeTest extends KernelTestCase { /** * @var \Symfony\Component\Form\FormBuilderInterface diff --git a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php index 3c16197a8..9ed3448f9 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Security\Authorization; use Chill\ActivityBundle\Test\PrepareActivityTrait; @@ -24,7 +33,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; * @internal * @coversNothing */ -class ActivityVoterTest extends KernelTestCase +final class ActivityVoterTest extends KernelTestCase { use PrepareActivityTrait; use PrepareCenterTrait; @@ -44,8 +53,8 @@ class ActivityVoterTest extends KernelTestCase public function setUp() { - static::bootKernel(); - $this->voter = static::$kernel->getContainer() + self::bootKernel(); + $this->voter = self::$kernel->getContainer() ->get('chill.activity.security.authorization.activity_voter'); $this->prophet = new \Prophecy\Prophet(); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillActivityBundle/Tests/Timeline/TimelineProviderTest.php index 2179c5361..ff43441bb 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Timeline/TimelineProviderTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Tests\Timeline; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class TimelineProviderTest extends WebTestCase +final class TimelineProviderTest extends WebTestCase { public function testAnActivityIsShownOnTimeline() { diff --git a/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php b/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php index 4cc176a00..072ba39d9 100644 --- a/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php +++ b/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php @@ -119,7 +119,7 @@ class TimelineActivityProvider implements TimelineProviderInterface */ private function checkContext(string $context) { - if (false === in_array($context, self::SUPPORTED_CONTEXTS)) { + if (false === in_array($context, self::SUPPORTED_CONTEXTS, true)) { throw new LogicException( sprintf( "The context '%s' is not supported. Currently only 'person' is supported", @@ -160,7 +160,7 @@ class TimelineActivityProvider implements TimelineProviderInterface // loop on reachable scopes foreach ($reachableScopes as $scope) { - if (in_array($scope->getId(), $scopes_ids)) { + if (in_array($scope->getId(), $scopes_ids, true)) { continue; } $scopes_ids[] = '?'; diff --git a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php index 6164c3c5d..a8bd30a05 100644 --- a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php +++ b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Validator\Constraints; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php index a0537319f..5d73252c0 100644 --- a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php +++ b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ActivityBundle\Validator\Constraints; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillActivityBundle/migrations/Version20150701091248.php b/src/Bundle/ChillActivityBundle/migrations/Version20150701091248.php index 1a7d66c86..21cd09e99 100644 --- a/src/Bundle/ChillActivityBundle/migrations/Version20150701091248.php +++ b/src/Bundle/ChillActivityBundle/migrations/Version20150701091248.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Activity; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20150701091248 extends AbstractMigration public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE Activity DROP CONSTRAINT FK_55026B0C59BB1592'); $this->addSql('ALTER TABLE ActivityReason DROP CONSTRAINT FK_654A2FCD12469DE2'); @@ -38,7 +47,7 @@ class Version20150701091248 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE SEQUENCE Activity_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE ActivityReason_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); diff --git a/src/Bundle/ChillActivityBundle/migrations/Version20150702093317.php b/src/Bundle/ChillActivityBundle/migrations/Version20150702093317.php index 0dd9798ad..2a7cc052b 100644 --- a/src/Bundle/ChillActivityBundle/migrations/Version20150702093317.php +++ b/src/Bundle/ChillActivityBundle/migrations/Version20150702093317.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Activity; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20150702093317 extends AbstractMigration public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE ActivityReasonCategory DROP COLUMN name;'); $this->addSql('ALTER TABLE ActivityReasonCategory ADD COLUMN label VARCHAR(255) NOT NULL;'); @@ -33,7 +42,7 @@ class Version20150702093317 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE ActivityReasonCategory DROP COLUMN label;'); $this->addSql('ALTER TABLE ActivityReasonCategory ADD COLUMN name JSON;'); diff --git a/src/Bundle/ChillActivityBundle/migrations/Version20150704091347.php b/src/Bundle/ChillActivityBundle/migrations/Version20150704091347.php index 5dea48f5a..094c3ba03 100644 --- a/src/Bundle/ChillActivityBundle/migrations/Version20150704091347.php +++ b/src/Bundle/ChillActivityBundle/migrations/Version20150704091347.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Activity; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20150704091347 extends AbstractMigration public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE Activity ALTER COLUMN remark SET NOT NULL;'); $this->addSql('ALTER TABLE Activity ALTER COLUMN attendee DROP NOT NULL;'); @@ -29,7 +38,7 @@ class Version20150704091347 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE Activity ALTER COLUMN remark DROP NOT NULL;'); $this->addSql('ALTER TABLE Activity ALTER COLUMN attendee DROP NOT NULL;'); diff --git a/src/Bundle/ChillActivityBundle/migrations/Version20160222103457.php b/src/Bundle/ChillActivityBundle/migrations/Version20160222103457.php index 193b6bffe..8f29cad45 100644 --- a/src/Bundle/ChillActivityBundle/migrations/Version20160222103457.php +++ b/src/Bundle/ChillActivityBundle/migrations/Version20160222103457.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Activity; use Doctrine\DBAL\Schema\Schema; @@ -23,7 +32,7 @@ class Version20160222103457 extends AbstractMigration public function down(Schema $schema): void { $this->abortIf( - $this->connection->getDatabasePlatform()->getName() != 'postgresql', + $this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.' ); @@ -50,7 +59,7 @@ class Version20160222103457 extends AbstractMigration public function up(Schema $schema): void { $this->abortIf( - $this->connection->getDatabasePlatform()->getName() != 'postgresql', + $this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.' ); diff --git a/src/Bundle/ChillActivityBundle/migrations/Version20161114085659.php b/src/Bundle/ChillActivityBundle/migrations/Version20161114085659.php index 3f2710cfc..d278c8842 100644 --- a/src/Bundle/ChillActivityBundle/migrations/Version20161114085659.php +++ b/src/Bundle/ChillActivityBundle/migrations/Version20161114085659.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Activity; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php index 90029bb20..f8a3e296e 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php index 05a498c46..d6f2c8fdd 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\DataFixtures\ORM; use Chill\AsideActivityBundle\Entity\AsideActivity; diff --git a/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivityCategory.php index d09652640..0955af630 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivityCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\DataFixtures\ORM; use Chill\AsideActivityBundle\Entity\AsideActivityCategory; diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/Configuration.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/Configuration.php index 599331ab7..ad19d2f0d 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index c5551991c..3c843b046 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Form; use Chill\AsideActivityBundle\Entity\AsideActivity; @@ -143,7 +152,7 @@ final class AsideActivityFormType extends AbstractType // test if the timestamp is in the choices. // If not, recreate the field with the new timestamp - if (!in_array($data->getTimestamp(), $timeChoices)) { + if (!in_array($data->getTimestamp(), $timeChoices, true)) { // the data are not in the possible values. add them $timeChoices[$data->format('H:i')] = $data->getTimestamp(); $form = $builder->create($fieldName, ChoiceType::class, array_merge( diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php index c878821e2..50e162cc6 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Menu; use Knp\Menu\MenuItem; @@ -29,7 +38,7 @@ final class AdminMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuild return; } - if (in_array($menuId, ['admin_index', 'admin_section'])) { + if (in_array($menuId, ['admin_index', 'admin_section'], true)) { $menu->addChild('Aside activities', [ 'route' => 'chill_crud_aside_activity_category_index', ]) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php index 078ae8a76..d129f9903 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php index 39a6f6acd..669653dc3 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php b/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php index 7d0b69bd1..dd4c17369 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Templating\Entity; use Chill\AsideActivityBundle\Entity\AsideActivityCategory; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php b/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php index a905ebff4..feaccb906 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AsideActivityBundle\Tests\Controller; use Chill\AsideActivityBundle\Entity\AsideActivity; @@ -20,7 +29,7 @@ use function shuffle; * @internal * @coversNothing */ -class AsideActivityControllerTest extends WebTestCase +final class AsideActivityControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorInterface.php b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorInterface.php index 3a9290c56..f2b0c45f9 100644 --- a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorInterface.php +++ b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Calculator; use Chill\AMLI\BudgetBundle\Entity\AbstractElement; diff --git a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php index 2057aadde..5ca2dc2e5 100644 --- a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php +++ b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Calculator; use Chill\AMLI\BudgetBundle\Entity\AbstractElement; diff --git a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorResult.php b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorResult.php index e99edab6d..c2b14b7da 100644 --- a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorResult.php +++ b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorResult.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Calculator; class CalculatorResult diff --git a/src/Bundle/ChillBudgetBundle/ChillAMLIBudgetBundle.php b/src/Bundle/ChillBudgetBundle/ChillAMLIBudgetBundle.php index 60f848056..48015911a 100644 --- a/src/Bundle/ChillBudgetBundle/ChillAMLIBudgetBundle.php +++ b/src/Bundle/ChillBudgetBundle/ChillAMLIBudgetBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle; use Chill\AMLI\BudgetBundle\DependencyInjection\Compiler\CalculatorCompilerPass; diff --git a/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php b/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php index 1302b8414..abe45b49e 100644 --- a/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php +++ b/src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Config; class ConfigRepository diff --git a/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php b/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php index 8b8dafc6b..218f86efe 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Controller; use Chill\AMLI\BudgetBundle\Entity\AbstractElement; diff --git a/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php b/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php index 50e7bacd1..1333f01f9 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Controller; use Chill\AMLI\BudgetBundle\Entity\Charge; diff --git a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php index affe9e605..c08abc5a8 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Controller; use Chill\AMLI\BudgetBundle\Calculator\CalculatorManager; diff --git a/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php b/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php index 7ab00a798..6a9e48fac 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Controller; use Chill\AMLI\BudgetBundle\Entity\Resource; diff --git a/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillAMLIBudgetExtension.php b/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillAMLIBudgetExtension.php index 66b301dec..80d60fffe 100644 --- a/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillAMLIBudgetExtension.php +++ b/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillAMLIBudgetExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\DependencyInjection; use Chill\AMLI\BudgetBundle\Security\Authorization\BudgetElementVoter; diff --git a/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php b/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php index 7e750868f..a85424fa2 100644 --- a/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php +++ b/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/Bundle/ChillBudgetBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillBudgetBundle/DependencyInjection/Configuration.php index bfc4c4705..bae1f177d 100644 --- a/src/Bundle/ChillBudgetBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillBudgetBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php b/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php index 72fa2b88d..41f2af812 100644 --- a/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php +++ b/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Entity; use Chill\PersonBundle\Entity\Person; @@ -136,7 +145,7 @@ abstract class AbstractElement public function isEmpty() { - return 0 == $this->amount; + return 0 === $this->amount; } abstract public function isResource(): bool; diff --git a/src/Bundle/ChillBudgetBundle/Entity/Charge.php b/src/Bundle/ChillBudgetBundle/Entity/Charge.php index 455bb9043..83755ed42 100644 --- a/src/Bundle/ChillBudgetBundle/Entity/Charge.php +++ b/src/Bundle/ChillBudgetBundle/Entity/Charge.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Entity; use Chill\MainBundle\Entity\HasCenterInterface; diff --git a/src/Bundle/ChillBudgetBundle/Entity/Resource.php b/src/Bundle/ChillBudgetBundle/Entity/Resource.php index 9963de94c..d055035ff 100644 --- a/src/Bundle/ChillBudgetBundle/Entity/Resource.php +++ b/src/Bundle/ChillBudgetBundle/Entity/Resource.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Entity; use Chill\MainBundle\Entity\HasCenterInterface; diff --git a/src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php index c5701b5ce..ab9e9fac2 100644 --- a/src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Menu; use Chill\AMLI\BudgetBundle\Security\Authorization\BudgetElementVoter; diff --git a/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php index c8cb7cab0..103de0a5b 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Repository; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php index 91bd7f258..d718c510c 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Repository; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php b/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php index 4dda9f8f2..883fa15c0 100644 --- a/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php +++ b/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Security\Authorization; use Chill\AMLI\BudgetBundle\Entity\AbstractElement; @@ -62,8 +71,8 @@ class BudgetElementVoter extends AbstractChillVoter implements ProvideRoleHierar protected function supports($attribute, $subject) { - return (in_array($attribute, self::ROLES) && $subject instanceof AbstractElement) - || ($subject instanceof Person && in_array($attribute, [self::SHOW, self::CREATE])); + return (in_array($attribute, self::ROLES, true) && $subject instanceof AbstractElement) + || ($subject instanceof Person && in_array($attribute, [self::SHOW, self::CREATE], true)); } protected function voteOnAttribute($attribute, $subject, \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token) diff --git a/src/Bundle/ChillBudgetBundle/Templating/Twig.php b/src/Bundle/ChillBudgetBundle/Templating/Twig.php index aba53f3c4..93d7ad96f 100644 --- a/src/Bundle/ChillBudgetBundle/Templating/Twig.php +++ b/src/Bundle/ChillBudgetBundle/Templating/Twig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Templating; use Chill\AMLI\BudgetBundle\Config\ConfigRepository; diff --git a/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php b/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php index c25e2cc36..4ef5865c5 100644 --- a/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php +++ b/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\BudgetBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,18 +24,18 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ElementControllerTest extends WebTestCase +final class ElementControllerTest extends WebTestCase { public function testIndex() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/index'); } public function testList() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/list'); } diff --git a/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php b/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php index a42c0eca1..f9ca69ac8 100644 --- a/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php +++ b/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php index 2eb4c5ade..e4e60263a 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php index 19e72099c..a13e1063f 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCancelReason.php b/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCancelReason.php index 508195081..22a5094e1 100644 --- a/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCancelReason.php +++ b/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCancelReason.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\DataFixtures\ORM; use Chill\CalendarBundle\Entity\CancelReason; diff --git a/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php b/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php index 926797899..5f8bc3a59 100644 --- a/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php +++ b/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\DataFixtures\ORM; use Chill\CalendarBundle\Entity\Invite; diff --git a/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php b/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php index 3ac0b54ad..3ed730b90 100644 --- a/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php +++ b/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/Bundle/ChillCalendarBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillCalendarBundle/DependencyInjection/Configuration.php index 0d1c32d3f..d24666d92 100644 --- a/src/Bundle/ChillCalendarBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillCalendarBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php index d1facc4a5..a4ca6803d 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php +++ b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Entity; use Chill\ActivityBundle\Entity\Activity; @@ -264,7 +273,7 @@ class Calendar $personsNotAssociated = []; foreach ($this->persons as $person) { - if (!in_array($person, $this->getPersonsAssociated())) { + if (!in_array($person, $this->getPersonsAssociated(), true)) { $personsNotAssociated[] = $person; } } diff --git a/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php b/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php index 0a749c0ba..ded4b113f 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php +++ b/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Entity; use Chill\CalendarBundle\Repository\CalendarRangeRepository; diff --git a/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php b/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php index 4d8236c9a..3491c63ee 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php +++ b/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Entity; use Chill\CalendarBundle\Repository\CancelReasonRepository; diff --git a/src/Bundle/ChillCalendarBundle/Entity/Invite.php b/src/Bundle/ChillCalendarBundle/Entity/Invite.php index 7204f8067..127c58f53 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/Invite.php +++ b/src/Bundle/ChillCalendarBundle/Entity/Invite.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Entity; use Chill\CalendarBundle\Repository\InviteRepository; diff --git a/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php b/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php index b0b473250..8dfb07de2 100644 --- a/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php +++ b/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Event; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php index a54dfc200..24d5eb056 100644 --- a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php +++ b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Form; use Chill\CalendarBundle\Entity\Calendar; diff --git a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php index 451dee836..3d5faa686 100644 --- a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php index 0fe9baecb..b90ad7261 100644 --- a/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php index aaa5a2a23..00269b6ba 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Repository; use Chill\CalendarBundle\Entity\CalendarRange; diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php index 2789d83b9..77fe1b8f8 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Repository; use Chill\CalendarBundle\Entity\Calendar; diff --git a/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php index 20e01304a..098e7daff 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Repository; use Chill\CalendarBundle\Entity\CancelReason; diff --git a/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php b/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php index 73f7c1299..484a6b38d 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Repository; use Chill\CalendarBundle\Entity\Invite; diff --git a/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php index 2ec95df65..30e9335b6 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CalendarBundle\Tests\Controller; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -19,15 +28,15 @@ use function random_int; * @internal * @coversNothing */ -class CalendarControllerTest extends WebTestCase +final class CalendarControllerTest extends WebTestCase { /** * Setup before each test method (see phpunit doc). */ public function setUp() { - static::bootKernel(); - $this->client = static::createClient([], [ + self::bootKernel(); + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); @@ -35,8 +44,8 @@ class CalendarControllerTest extends WebTestCase public function provideAccompanyingPeriod(): iterable { - static::bootKernel(); - $em = static::$container->get(EntityManagerInterface::class); + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); $nb = $em->createQueryBuilder() ->from(AccompanyingPeriod::class, 'ac') diff --git a/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php b/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php index 7bfa8572b..22cb1f716 100644 --- a/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php +++ b/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle; use Chill\CustomFieldsBundle\DependencyInjection\CustomFieldCompilerPass; diff --git a/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php b/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php index bb88b30f1..42b9a51bc 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php +++ b/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Command; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -139,7 +148,7 @@ class CreateFieldsOnGroupCommand extends Command $question->setNormalizer( static function ($answer) use ($customFieldsGroups) { foreach ($customFieldsGroups as $customFieldsGroup) { - if ($customFieldsGroup->getId() == $answer) { + if ($customFieldsGroup->getId() === $answer) { return $customFieldsGroup; } } diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/AdminController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/AdminController.php index 4103dc96c..69af87041 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/AdminController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/AdminController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php index dff603613..e49dfc91a 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Controller; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php index 7caa9e1ba..91187818f 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Controller; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -117,7 +126,7 @@ class CustomFieldsGroupController extends AbstractController $makeDefaultFormViews = []; foreach ($cfGroups as $group) { - if (!in_array($group->getId(), $defaultGroups)) { + if (!in_array($group->getId(), $defaultGroups, true)) { $makeDefaultFormViews[$group->getId()] = $this->createMakeDefaultForm($group)->createView(); } } @@ -419,7 +428,7 @@ class CustomFieldsGroupController extends AbstractController . 'customizables_entities'); foreach ($options as $key => $definition) { - if ($definition['class'] == $entity) { + if ($definition['class'] === $entity) { foreach ($definition['options'] as $key => $value) { yield $key; } diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/AbstractCustomField.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/AbstractCustomField.php index d46446018..65eaced41 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/AbstractCustomField.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/AbstractCustomField.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php index 65786eb44..c92521630 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -90,7 +99,7 @@ class CustomFieldChoice extends AbstractCustomField ]; //if allow_other = true - if (true == $customFieldOptions[self::ALLOW_OTHER]) { + if (true === $customFieldOptions[self::ALLOW_OTHER]) { $otherValueLabel = null; if (array_key_exists(self::OTHER_VALUE_LABEL, $customFieldOptions)) { @@ -233,10 +242,10 @@ class CustomFieldChoice extends AbstractCustomField if ($cf->getOptions()[self::MULTIPLE]) { if ($cf->getOptions()[self::ALLOW_OTHER]) { - return in_array($choiceSlug, $this->deserialize($data, $cf)['_choices']); + return in_array($choiceSlug, $this->deserialize($data, $cf)['_choices'], true); } - return in_array($choiceSlug, $this->deserialize($data, $cf)); + return in_array($choiceSlug, $this->deserialize($data, $cf), true); } if ($cf->getOptions()[self::ALLOW_OTHER]) { @@ -295,13 +304,13 @@ class CustomFieldChoice extends AbstractCustomField $selected = (is_array($data)) ? $data : [$data]; $choices = $customField->getOptions()[self::CHOICES]; - if (in_array('_other', $selected)) { + if (in_array('_other', $selected, true)) { $choices[] = ['name' => $value['_other'], 'slug' => '_other']; } $template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.html.twig'; - if ('csv' == $documentType) { + if ('csv' === $documentType) { $template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.csv.twig'; } diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php index d6a98f62f..fd95cefe8 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldInterface.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldInterface.php index 1c94d439b..c98e40bb8 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldInterface.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php index 80d676d5e..488cd3b93 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php index cb8c955ea..c04b4028c 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -103,7 +112,7 @@ class CustomFieldText extends AbstractCustomField { $template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.html.twig'; - if ('csv' == $documentType) { + if ('csv' === $documentType) { $template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.csv.twig'; } diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php index 1c59c7d2e..fd66ef87b 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\CustomFields; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php b/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php index 798b5367b..f417d0e84 100644 --- a/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php +++ b/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\DataFixtures\ORM; use Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option; diff --git a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php index 9e4590a70..c7c2e0a44 100644 --- a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php +++ b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/Configuration.php index dcbd219b1..e5c0d759e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php index ddd91b0ef..124d65a52 100644 --- a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php +++ b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\DependencyInjection; use LogicException; diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php index 74d8270cd..5cb2dde8e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php index fbcfb644a..78e2b98d4 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice; use Doctrine\Common\Collections\Collection; diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php index e219fa3e8..962bbc089 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php index 9a0633e09..b4fefb317 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php b/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php index 8e9fd181e..f9709bd09 100644 --- a/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php +++ b/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\EntityRepository\CustomFieldLongChoice; use Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php index 29e249493..59a1f954d 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form; use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldsGroupToIdTransformer; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php index e0f7d1410..8d65b134b 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php index 3efc2fa82..a203c63d3 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\DataTransformer; use Chill\CustomFieldsBundle\CustomFields\CustomFieldInterface; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php index 448327826..5b342ada1 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\DataTransformer; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php index 1ac9f3d4b..67ebe6902 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Extension; use Symfony\Component\Form\AbstractTypeExtension; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextIntegerExtension.php b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextIntegerExtension.php index 107fefd05..93fdf2e53 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextIntegerExtension.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextIntegerExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Extension; use Symfony\Component\Form\Extension\Core\Type\IntegerType; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextNumberExtension.php b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextNumberExtension.php index 356c293ac..bfab8a0dc 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextNumberExtension.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextNumberExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Extension; use Symfony\Component\Form\Extension\Core\Type\NumberType; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php index c8845139a..ac080b4ff 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php index f27d0d4b0..d545ebd2c 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Type; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php index c6685caa7..b2c4f37cb 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php index c3ea7bc52..de0acf24f 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Type; use Chill\CustomFieldsBundle\Service\CustomFieldProvider; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php index 7d65b115c..f6e0efa3b 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php index c705c3224..4ebfcb04c 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Form\Type; use Chill\MainBundle\Templating\TranslatableStringHelper; diff --git a/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/AppKernel.php b/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/AppKernel.php index 554ed89e7..d406419fb 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/AppKernel.php +++ b/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/AppKernel.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; diff --git a/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/autoload.php b/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/autoload.php index a2dfe7f92..6f199176e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/autoload.php +++ b/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/app/autoload.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Composer\Autoload\ClassLoader; use Doctrine\Common\Annotations\AnnotationRegistry; diff --git a/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/web/app_dev.php b/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/web/app_dev.php index 3122a0243..cce0df8eb 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/web/app_dev.php +++ b/src/Bundle/ChillCustomFieldsBundle/Resources/test/Fixtures/App/web/app_dev.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\Debug\Debug; use Symfony\Component\HttpFoundation\Request; @@ -18,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request; // Feel free to remove this, extend it, or make something more sophisticated. if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) - || !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || \PHP_SAPI === 'cli-server') + || !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1'], true) || \PHP_SAPI === 'cli-server') ) { header('HTTP/1.0 403 Forbidden'); diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php index 955421abc..a6f313abf 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php +++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Service; use LogicException; diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php index e32a35cee..2b257856b 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php +++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Service; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php index 88a40b58b..8c58be86f 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php +++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Service; use Exception; diff --git a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php index d7e3ad444..21a5300eb 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php +++ b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Templating\Twig; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php index f1c49551c..7bdfb1287 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php +++ b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Templating\Twig; use Symfony\Component\DependencyInjection\Container; diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php index cee8dfd50..ceeb62f98 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests\Config; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -17,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class ConfigCustomizablesEntitiesTest extends KernelTestCase +final class ConfigCustomizablesEntitiesTest extends KernelTestCase { /** * Test that the 'chill_custom_fields.customizables_entities' is filled @@ -28,7 +37,7 @@ class ConfigCustomizablesEntitiesTest extends KernelTestCase public function testNotEmptyConfig() { self::bootKernel(['environment' => 'test_customizable_entities_test_not_empty_config']); - $customizableEntities = static::$kernel->getContainer() + $customizableEntities = self::$kernel->getContainer() ->getParameter('chill_custom_fields.customizables_entities'); $this->assertInternalType('array', $customizableEntities); @@ -51,7 +60,7 @@ class ConfigCustomizablesEntitiesTest extends KernelTestCase public function testNotPresentInConfig() { self::bootKernel(['environment' => 'test']); - $customizableEntities = static::$kernel->getContainer() + $customizableEntities = self::$kernel->getContainer() ->getParameter('chill_custom_fields.customizables_entities'); $this->assertInternalType('array', $customizableEntities); diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php index c3e13435c..0bde1e63f 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class CustomFieldControllerTest_TODO extends WebTestCase +final class CustomFieldControllerTest_TODO extends WebTestCase { /* public function testCompleteScenario() diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php index b9bb5c785..1c78b40af 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Client; @@ -16,13 +25,13 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class CustomFieldsGroupControllerTest extends WebTestCase +final class CustomFieldsGroupControllerTest extends WebTestCase { public function testCompleteScenario() { self::bootKernel(['environment' => 'test_customizable_entities_test_not_empty_config']); // Create a new client to browse the application - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'olala', ]); diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php index c608b7a65..97cca305e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php index 815e529bb..5fc10c4f6 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests; use Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice; @@ -23,7 +32,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class CustomFieldsChoiceTest extends KernelTestCase +final class CustomFieldsChoiceTest extends KernelTestCase { /** * @var \Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice @@ -37,9 +46,9 @@ class CustomFieldsChoiceTest extends KernelTestCase public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->cfProvider = static::$kernel->getContainer() + $this->cfProvider = self::$kernel->getContainer() ->get('chill.custom_field.provider'); $this->cfChoice = $this->cfProvider->getCustomFieldByType('choice'); } diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php index 8fd3f255e..e0307e663 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests; use Chill\CustomFieldsBundle\CustomFields\CustomFieldNumber; @@ -20,7 +29,7 @@ use function count; * @internal * @coversNothing */ -class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase +final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase { /** * @var CustomFieldNumber @@ -126,7 +135,7 @@ class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTes $cfGroup = (new \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup()) ->addCustomField($cf); - $form = static::$kernel->getContainer()->get('form.factory') + $form = self::$kernel->getContainer()->get('form.factory') ->createBuilder(\Chill\CustomFieldsBundle\Form\Type\CustomFieldType::class, [], [ 'group' => $cfGroup, ]) @@ -151,7 +160,7 @@ class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTes $cfGroup = (new \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup()) ->addCustomField($cf); - $form = static::$kernel->getContainer()->get('form.factory') + $form = self::$kernel->getContainer()->get('form.factory') ->createBuilder(\Chill\CustomFieldsBundle\Form\Type\CustomFieldType::class, [], [ 'group' => $cfGroup, ]) diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php index a685bc426..260fd0f92 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests; use Chill\CustomFieldsBundle\CustomFields\CustomFieldText; @@ -17,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class CustomFieldsTextTest extends WebTestCase +final class CustomFieldsTextTest extends WebTestCase { use CustomFieldTestHelper; @@ -28,8 +37,8 @@ class CustomFieldsTextTest extends WebTestCase public function setUp() { - static::bootKernel(); - $this->customFieldProvider = static::$kernel->getContainer() + self::bootKernel(); + $this->customFieldProvider = self::$kernel->getContainer() ->get('chill.custom_field.provider'); } @@ -49,7 +58,7 @@ class CustomFieldsTextTest extends WebTestCase public function testFormTextNew() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/fr/admin/customfield/new?type=text'); diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php index 5bcb621d8..2bfeafa54 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFields\Tests\Form\Extension; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -18,7 +27,7 @@ use Symfony\Component\Form\Extension\Core\Type\IntegerType; * @internal * @coversNothing */ -class PostTextIntegerExtensionTest extends KernelTestCase +final class PostTextIntegerExtensionTest extends KernelTestCase { /** * @var \Symfony\Component\Form\FormBuilderInterface diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php index c5c7ea9c3..6560bfeb6 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFields\Tests\Form\Extension; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -18,7 +27,7 @@ use Symfony\Component\Form\Extension\Core\Type\NumberType; * @internal * @coversNothing */ -class PostTextNumberExtensionTest extends KernelTestCase +final class PostTextNumberExtensionTest extends KernelTestCase { /** * @var \Symfony\Component\Form\FormBuilderInterface diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php index 748a79851..42135deda 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFieldsBundle\Tests; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -18,11 +27,11 @@ use Symfony\Component\HttpFoundation\Response; * @internal * @coversNothing */ -class RoutingLoaderTest extends WebTestCase +final class RoutingLoaderTest extends WebTestCase { public function testRoutesAreLoaded() { - $client = static::createClient(); + $client = self::createClient(); $client->request('GET', '/fr/admin/customfield/'); diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php index 7b11b8c62..2fd20495d 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFields\Tests\Service; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -19,7 +28,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class CustomFieldsHelperTest extends KernelTestCase +final class CustomFieldsHelperTest extends KernelTestCase { /** * @var CustomFieldsHelper diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php index 90a024414..a705b4d2e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFields\Tests\Templating\Twig; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -20,7 +29,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class CustomFieldRenderingTwigTest extends KernelTestCase +final class CustomFieldRenderingTwigTest extends KernelTestCase { /** * @var CustomFieldProvider diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php index 5636439b5..ab5e0c1d8 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\CustomFields\Tests\Templating\Twig; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -22,7 +31,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class CustomFieldsGroupRenderingTwigTest extends KernelTestCase +final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase { /** * @var CustomFieldProvider diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/bootstrap.php b/src/Bundle/ChillCustomFieldsBundle/Tests/bootstrap.php index 0eb126c4f..de8d848cc 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/bootstrap.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/bootstrap.php @@ -7,6 +7,14 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) { throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?'); } diff --git a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20141128195430.php b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20141128195430.php index 945f57deb..bde1b352e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20141128195430.php +++ b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20141128195430.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\CustomFields; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20150224164531.php b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20150224164531.php index 15c597a77..72248f2d6 100644 --- a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20150224164531.php +++ b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20150224164531.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\CustomFields; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210155904.php b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210155904.php index 4e49b5f61..19d891d5f 100644 --- a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210155904.php +++ b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210155904.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\CustomFields; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20151210155904 extends AbstractMigration public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE CustomField DROP required'); } @@ -28,7 +37,7 @@ class Version20151210155904 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE customfield ADD required BOOLEAN DEFAULT FALSE'); } diff --git a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210205610.php b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210205610.php index 52ddda8bc..87d5cd0f7 100644 --- a/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210205610.php +++ b/src/Bundle/ChillCustomFieldsBundle/migrations/Version20151210205610.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\CustomFields; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20151210205610 extends AbstractMigration public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE custom_field_long_choice_options DROP CONSTRAINT cf_long_choice_self_referencing'); $this->addSql('DROP SEQUENCE custom_field_long_choice_options_id_seq CASCADE'); @@ -29,7 +38,7 @@ class Version20151210205610 extends AbstractMigration public function up(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE SEQUENCE custom_field_long_choice_options_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE TABLE custom_field_long_choice_options (id INT NOT NULL, ' diff --git a/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php b/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php index 9e3570708..d1b147567 100644 --- a/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php +++ b/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillDocGeneratorBundle/Context/DocGeneratorContextInterface.php b/src/Bundle/ChillDocGeneratorBundle/Context/DocGeneratorContextInterface.php index 0167abb96..990a058c4 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Context/DocGeneratorContextInterface.php +++ b/src/Bundle/ChillDocGeneratorBundle/Context/DocGeneratorContextInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Context; /** diff --git a/src/Bundle/ChillDocGeneratorBundle/Context/HouseholdMemberSelectionContext.php b/src/Bundle/ChillDocGeneratorBundle/Context/HouseholdMemberSelectionContext.php index 1342a3d23..25752fbab 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Context/HouseholdMemberSelectionContext.php +++ b/src/Bundle/ChillDocGeneratorBundle/Context/HouseholdMemberSelectionContext.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Context; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -43,7 +52,7 @@ class HouseholdMemberSelectionContext implements DocGeneratorContextInterface 'firstPersonLastName' => $firstPerson->getLastName(), ]; } - if (get_class($entity) == AccompanyingPeriodWorkEvaluation::class) { + if (get_class($entity) === AccompanyingPeriodWorkEvaluation::class) { $values = []; foreach ($entity->getAccompanyingPeriodWork()->getPersons() as $person) { @@ -72,7 +81,7 @@ class HouseholdMemberSelectionContext implements DocGeneratorContextInterface throw new Exception('No implemented yet', 1); $choices = []; - if (get_class($entity) == AccompanyingPeriodWorkEvaluation::class) { + if (get_class($entity) === AccompanyingPeriodWorkEvaluation::class) { foreach ($entity->getAccompanyingPeriodWork()->getPersons() as $person) { $choices[$person->getId()] = $person->getName(); } @@ -101,7 +110,7 @@ class HouseholdMemberSelectionContext implements DocGeneratorContextInterface public function supports(string $entityClass): bool { return - (AccompanyingPeriod::class == $entityClass) - || (SocialAction::class == $entityClass); + (AccompanyingPeriod::class === $entityClass) + || (SocialAction::class === $entityClass); } } diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php index c7ac94744..af96aef9c 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorController.php index 5baf6e225..a748ca8b4 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Controller; use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlOpenstackGenerator; diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php index a130bcf15..f3ba81dbf 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Controller; use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface; @@ -54,7 +63,7 @@ class DocGeneratorTemplateController extends AbstractController $entity = $this->getDoctrine()->getRepository($entityClassName)->find($entityId); - if ($template->getContext() == HouseholdMemberSelectionContext::class) { + if ($template->getContext() === HouseholdMemberSelectionContext::class) { $context = new HouseholdMemberSelectionContext(); $datas = $context->getData($entity); } else { @@ -94,7 +103,7 @@ class DocGeneratorTemplateController extends AbstractController 'body' => $fileContent, ]); - if ($putResponse->getStatusCode() == 201) { + if ($putResponse->getStatusCode() === 201) { $em = $this->getDoctrine()->getManager(); $storedObject = new StoredObject(); $storedObject diff --git a/src/Bundle/ChillDocGeneratorBundle/DataFixtures/ORM/LoadDocGeneratorTemplate.php b/src/Bundle/ChillDocGeneratorBundle/DataFixtures/ORM/LoadDocGeneratorTemplate.php index 32ba194b3..530371480 100644 --- a/src/Bundle/ChillDocGeneratorBundle/DataFixtures/ORM/LoadDocGeneratorTemplate.php +++ b/src/Bundle/ChillDocGeneratorBundle/DataFixtures/ORM/LoadDocGeneratorTemplate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\DataFixtures\ORM; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; diff --git a/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php b/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php index 70640b73d..b661862d4 100644 --- a/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php +++ b/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/Configuration.php index 4d8e46464..a4d04b800 100644 --- a/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillDocGeneratorBundle/Entity/DocGeneratorTemplate.php b/src/Bundle/ChillDocGeneratorBundle/Entity/DocGeneratorTemplate.php index f38ca139a..945e26490 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Entity/DocGeneratorTemplate.php +++ b/src/Bundle/ChillDocGeneratorBundle/Entity/DocGeneratorTemplate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php b/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php index 4735dbe3c..36cef89c7 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php +++ b/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Form; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php index c30155955..206945c16 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php +++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Serializer\Encoder; use Symfony\Component\Serializer\Exception\UnexpectedValueException; diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php index a55ee4b06..84e000a0e 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php +++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Serializer\Helper; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php index 5672d4d22..ded3ed7ce 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php +++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Serializer\Normalizer; use Chill\DocGeneratorBundle\Serializer\Helper\NormalizeNullValueHelper; diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php index 9ccf2a002..1a1daff5a 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\Tests\Serializer\Encoder; use Chill\DocGeneratorBundle\Serializer\Encoder\DocGenEncoder; @@ -17,7 +26,7 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; * @internal * @coversNothing */ -class DocGenEncoderTest extends TestCase +final class DocGenEncoderTest extends TestCase { private DocGenEncoder $encoder; diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php index b54e67c89..978193ee1 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocGeneratorBundle\tests\Serializer\Normalizer; use Chill\MainBundle\Entity\Center; @@ -19,7 +28,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; * @internal * @coversNothing */ -class DocGenObjectNormalizerTest extends KernelTestCase +final class DocGenObjectNormalizerTest extends KernelTestCase { private NormalizerInterface $normalizer; diff --git a/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php b/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php index 339fb15ee..e5ad1cb2c 100644 --- a/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php +++ b/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php b/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php index c1e38dc85..5992241fa 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php b/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php index 84a1f8edc..80d70329e 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Controller; use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument; diff --git a/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php b/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php index 1a5fe3ad8..9fba21828 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Controller; use Chill\DocStoreBundle\Entity\PersonDocument; diff --git a/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentACL.php b/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentACL.php index a48221f29..c874d3706 100644 --- a/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentACL.php +++ b/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentACL.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\DataFixtures\ORM; use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter; diff --git a/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentCategory.php b/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentCategory.php index 6b0d30e37..e914c18cf 100644 --- a/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentCategory.php +++ b/src/Bundle/ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\DataFixtures\ORM; use Chill\DocStoreBundle\Entity\DocumentCategory; diff --git a/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php b/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php index 51cd60636..c7490524d 100644 --- a/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php +++ b/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\DependencyInjection; use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter; diff --git a/src/Bundle/ChillDocStoreBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillDocStoreBundle/DependencyInjection/Configuration.php index 936b41be5..a5802988b 100644 --- a/src/Bundle/ChillDocStoreBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillDocStoreBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php index 2f86744b8..32223d357 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Entity; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php index ca60b9468..7159027df 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Entity; use Chill\MainBundle\Entity\HasScopeInterface; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php b/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php index ffd08d80a..a3120e8b7 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php index ab026a43b..df11c5733 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Entity; use Chill\MainBundle\Entity\HasCenterInterface; diff --git a/src/Bundle/ChillDocStoreBundle/EntityRepository/DocumentCategoryRepository.php b/src/Bundle/ChillDocStoreBundle/EntityRepository/DocumentCategoryRepository.php index 18370b470..38d241b8c 100644 --- a/src/Bundle/ChillDocStoreBundle/EntityRepository/DocumentCategoryRepository.php +++ b/src/Bundle/ChillDocStoreBundle/EntityRepository/DocumentCategoryRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\EntityRepository; use Doctrine\ORM\EntityRepository; diff --git a/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php index 6f03e241a..3c7caaa3c 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Form; use Chill\DocStoreBundle\Entity\Document; diff --git a/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php b/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php index aa481160e..ec28ff638 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Form; use Chill\DocStoreBundle\Entity\DocumentCategory; diff --git a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php index d41003898..2c181c6a7 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Form; use Chill\DocStoreBundle\Entity\Document; diff --git a/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php b/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php index 03d83c181..d44feb040 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Form; use ChampsLibres\AsyncUploaderBundle\Form\Type\AsyncUploaderType; diff --git a/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php b/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php index d266cc1b1..9fd8520fb 100644 --- a/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php +++ b/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Menu; use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter; diff --git a/src/Bundle/ChillDocStoreBundle/Object/ObjectToAsyncFileTransformer.php b/src/Bundle/ChillDocStoreBundle/Object/ObjectToAsyncFileTransformer.php index bdc2ec6f6..ecf7d87b7 100644 --- a/src/Bundle/ChillDocStoreBundle/Object/ObjectToAsyncFileTransformer.php +++ b/src/Bundle/ChillDocStoreBundle/Object/ObjectToAsyncFileTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Object; use ChampsLibres\AsyncUploaderBundle\Form\AsyncFileTransformer\AsyncFileTransformerInterface; diff --git a/src/Bundle/ChillDocStoreBundle/Object/PersistenceChecker.php b/src/Bundle/ChillDocStoreBundle/Object/PersistenceChecker.php index f5fa006b2..d4aa90b4d 100644 --- a/src/Bundle/ChillDocStoreBundle/Object/PersistenceChecker.php +++ b/src/Bundle/ChillDocStoreBundle/Object/PersistenceChecker.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Object; use ChampsLibres\AsyncUploaderBundle\Persistence\PersistenceCheckerInterface; diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php index c1f945990..ea26d45f3 100644 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php +++ b/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\DocStoreBundle\Security\Authorization; use Chill\DocStoreBundle\Entity\PersonDocument; diff --git a/src/Bundle/ChillEventBundle/ChillEventBundle.php b/src/Bundle/ChillEventBundle/ChillEventBundle.php index 37dcdbeac..29ea78858 100644 --- a/src/Bundle/ChillEventBundle/ChillEventBundle.php +++ b/src/Bundle/ChillEventBundle/ChillEventBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillEventBundle/Controller/AdminController.php b/src/Bundle/ChillEventBundle/Controller/AdminController.php index 5ed9e16c7..2c2700c1c 100644 --- a/src/Bundle/ChillEventBundle/Controller/AdminController.php +++ b/src/Bundle/ChillEventBundle/Controller/AdminController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php index db2eb999e..feda01c23 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Controller; use Chill\EventBundle\Entity\Event; diff --git a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php index f9af30d8f..892333cf1 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Controller; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php index 65406e969..8188ab69a 100644 --- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php +++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Controller; use ArrayIterator; diff --git a/src/Bundle/ChillEventBundle/Controller/RoleController.php b/src/Bundle/ChillEventBundle/Controller/RoleController.php index 3df68ff1f..3c5d11db8 100644 --- a/src/Bundle/ChillEventBundle/Controller/RoleController.php +++ b/src/Bundle/ChillEventBundle/Controller/RoleController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Controller; use Chill\EventBundle\Entity\Role; diff --git a/src/Bundle/ChillEventBundle/Controller/StatusController.php b/src/Bundle/ChillEventBundle/Controller/StatusController.php index 63ff27dbb..dc68e63ac 100644 --- a/src/Bundle/ChillEventBundle/Controller/StatusController.php +++ b/src/Bundle/ChillEventBundle/Controller/StatusController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Controller; use Chill\EventBundle\Entity\Status; diff --git a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadEventTypes.php b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadEventTypes.php index 5caacd188..a93d8e5a4 100644 --- a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadEventTypes.php +++ b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadEventTypes.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\DataFixtures\ORM; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php index 749de649c..59a97f90d 100644 --- a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php +++ b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\DataFixtures\ORM; use Chill\EventBundle\Entity\Event; diff --git a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadRolesACL.php b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadRolesACL.php index 66f41cc45..7b9a7d5d4 100644 --- a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadRolesACL.php +++ b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadRolesACL.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadPermissionsGroup; diff --git a/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php b/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php index f46485f47..ef241f2bd 100644 --- a/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php +++ b/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\DependencyInjection; use Chill\EventBundle\Security\Authorization\EventVoter; diff --git a/src/Bundle/ChillEventBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillEventBundle/DependencyInjection/Configuration.php index 2d90f006b..fbb363135 100644 --- a/src/Bundle/ChillEventBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillEventBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php index fcf285fd4..699d3fd6b 100644 --- a/src/Bundle/ChillEventBundle/Entity/Event.php +++ b/src/Bundle/ChillEventBundle/Entity/Event.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Entity; use ArrayIterator; diff --git a/src/Bundle/ChillEventBundle/Entity/EventType.php b/src/Bundle/ChillEventBundle/Entity/EventType.php index d028c6c55..4d0641408 100644 --- a/src/Bundle/ChillEventBundle/Entity/EventType.php +++ b/src/Bundle/ChillEventBundle/Entity/EventType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php index a0f1f367f..365cbb2f8 100644 --- a/src/Bundle/ChillEventBundle/Entity/Participation.php +++ b/src/Bundle/ChillEventBundle/Entity/Participation.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Entity; use ArrayAccess; @@ -194,7 +203,7 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac { return in_array($offset, [ 'person', 'role', 'status', 'event', - ]); + ], true); } /** diff --git a/src/Bundle/ChillEventBundle/Entity/Role.php b/src/Bundle/ChillEventBundle/Entity/Role.php index 3c7b50135..738423976 100644 --- a/src/Bundle/ChillEventBundle/Entity/Role.php +++ b/src/Bundle/ChillEventBundle/Entity/Role.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillEventBundle/Entity/Status.php b/src/Bundle/ChillEventBundle/Entity/Status.php index a4914b552..a5e93b288 100644 --- a/src/Bundle/ChillEventBundle/Entity/Status.php +++ b/src/Bundle/ChillEventBundle/Entity/Status.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php b/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php index c2aaf6de9..eecc7435d 100644 --- a/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php +++ b/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form\ChoiceLoader; use Chill\EventBundle\Entity\Event; @@ -82,7 +91,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface $event = $this->eventRepository->find($value); if ($this->hasCenterFilter() - && !in_array($event->getCenter(), $this->centers)) { + && !in_array($event->getCenter(), $this->centers, true)) { throw new RuntimeException('chosen an event not in correct center'); } diff --git a/src/Bundle/ChillEventBundle/Form/EventType.php b/src/Bundle/ChillEventBundle/Form/EventType.php index 9861c0915..24a898ce0 100644 --- a/src/Bundle/ChillEventBundle/Form/EventType.php +++ b/src/Bundle/ChillEventBundle/Form/EventType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form; use Chill\EventBundle\Form\Type\PickEventTypeType; diff --git a/src/Bundle/ChillEventBundle/Form/EventTypeType.php b/src/Bundle/ChillEventBundle/Form/EventTypeType.php index 8e95057dd..243f5e17b 100644 --- a/src/Bundle/ChillEventBundle/Form/EventTypeType.php +++ b/src/Bundle/ChillEventBundle/Form/EventTypeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillEventBundle/Form/ParticipationType.php b/src/Bundle/ChillEventBundle/Form/ParticipationType.php index 0f44e641c..5067957bf 100644 --- a/src/Bundle/ChillEventBundle/Form/ParticipationType.php +++ b/src/Bundle/ChillEventBundle/Form/ParticipationType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/Form/RoleType.php b/src/Bundle/ChillEventBundle/Form/RoleType.php index 938648240..0826afc92 100644 --- a/src/Bundle/ChillEventBundle/Form/RoleType.php +++ b/src/Bundle/ChillEventBundle/Form/RoleType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/Form/StatusType.php b/src/Bundle/ChillEventBundle/Form/StatusType.php index 1cb97db58..0535b41a9 100644 --- a/src/Bundle/ChillEventBundle/Form/StatusType.php +++ b/src/Bundle/ChillEventBundle/Form/StatusType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form; use Chill\EventBundle\Form\Type\PickEventTypeType; diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php index 5a5ab19af..72382ad88 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form\Type; use Chill\EventBundle\Entity\Event; @@ -171,7 +180,7 @@ class PickEventType extends AbstractType if (!in_array($c->getId(), array_map( static function (Center $c) { return $c->getId(); }, $centers - ))) { + ), true)) { throw new AccessDeniedException('The given center is not reachable'); } $selectedCenters[] = $c; diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php b/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php index 66c57a78a..56b3b96ba 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form\Type; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php b/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php index 7c8dc773a..cd7dcc917 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form\Type; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php b/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php index 026569119..194960078 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Form\Type; use Chill\EventBundle\Entity\EventType; diff --git a/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php index bf5b5f22c..78eab100e 100644 --- a/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Menu; use Chill\EventBundle\Security\Authorization\EventVoter; diff --git a/src/Bundle/ChillEventBundle/Repository/EventRepository.php b/src/Bundle/ChillEventBundle/Repository/EventRepository.php index 282902de0..345d5c3aa 100644 --- a/src/Bundle/ChillEventBundle/Repository/EventRepository.php +++ b/src/Bundle/ChillEventBundle/Repository/EventRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Repository; use Doctrine\ORM\EntityRepository; diff --git a/src/Bundle/ChillEventBundle/Repository/ParticipationRepository.php b/src/Bundle/ChillEventBundle/Repository/ParticipationRepository.php index 75dc4d346..474a9b7f3 100644 --- a/src/Bundle/ChillEventBundle/Repository/ParticipationRepository.php +++ b/src/Bundle/ChillEventBundle/Repository/ParticipationRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Repository; use Doctrine\ORM\EntityRepository; diff --git a/src/Bundle/ChillEventBundle/Resources/test/Fixtures/App/AppKernel.php b/src/Bundle/ChillEventBundle/Resources/test/Fixtures/App/AppKernel.php index 59f7702f7..dca14a83d 100644 --- a/src/Bundle/ChillEventBundle/Resources/test/Fixtures/App/AppKernel.php +++ b/src/Bundle/ChillEventBundle/Resources/test/Fixtures/App/AppKernel.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; diff --git a/src/Bundle/ChillEventBundle/Resources/test/bootstrap.php b/src/Bundle/ChillEventBundle/Resources/test/bootstrap.php index 1260ef94b..9baca0f38 100644 --- a/src/Bundle/ChillEventBundle/Resources/test/bootstrap.php +++ b/src/Bundle/ChillEventBundle/Resources/test/bootstrap.php @@ -7,6 +7,14 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ if (!is_file($autoloadFile = __DIR__ . '/../../vendor/autoload.php')) { throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?'); } diff --git a/src/Bundle/ChillEventBundle/Search/EventSearch.php b/src/Bundle/ChillEventBundle/Search/EventSearch.php index 28a6ed4d3..e6c92c007 100644 --- a/src/Bundle/ChillEventBundle/Search/EventSearch.php +++ b/src/Bundle/ChillEventBundle/Search/EventSearch.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Search; use Chill\EventBundle\Entity\Event; diff --git a/src/Bundle/ChillEventBundle/Security/Authorization/EventVoter.php b/src/Bundle/ChillEventBundle/Security/Authorization/EventVoter.php index afd12a252..0e8058c9f 100644 --- a/src/Bundle/ChillEventBundle/Security/Authorization/EventVoter.php +++ b/src/Bundle/ChillEventBundle/Security/Authorization/EventVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Security\Authorization; use Chill\EventBundle\Entity\Event; @@ -87,8 +96,8 @@ class EventVoter extends AbstractChillVoter implements ProvideRoleHierarchyInter public function supports($attribute, $subject) { - return ($subject instanceof Event && in_array($attribute, self::ROLES)) - || ($subject instanceof Person && in_array($attribute, [self::CREATE, self::SEE])) + return ($subject instanceof Event && in_array($attribute, self::ROLES, true)) + || ($subject instanceof Person && in_array($attribute, [self::CREATE, self::SEE], true)) || (null === $subject && self::SEE === $attribute); } diff --git a/src/Bundle/ChillEventBundle/Security/Authorization/ParticipationVoter.php b/src/Bundle/ChillEventBundle/Security/Authorization/ParticipationVoter.php index 71f177fab..99b50babd 100644 --- a/src/Bundle/ChillEventBundle/Security/Authorization/ParticipationVoter.php +++ b/src/Bundle/ChillEventBundle/Security/Authorization/ParticipationVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Security\Authorization; use Chill\EventBundle\Entity\Participation; @@ -84,8 +93,8 @@ class ParticipationVoter extends AbstractChillVoter implements ProvideRoleHierar public function supports($attribute, $subject) { - return ($subject instanceof Participation && in_array($attribute, self::ROLES)) - || ($subject instanceof Person && in_array($attribute, [self::CREATE, self::SEE])) + return ($subject instanceof Participation && in_array($attribute, self::ROLES, true)) + || ($subject instanceof Person && in_array($attribute, [self::CREATE, self::SEE], true)) || (null === $subject && self::SEE === $attribute); } diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php index 113fffa99..c829eb0e8 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class EventControllerTest extends WebTestCase +final class EventControllerTest extends WebTestCase { public function testSkipped() { diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php index 85347ba8e..efd1f57ea 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class EventTypeControllerTest extends WebTestCase +final class EventTypeControllerTest extends WebTestCase { public function testSkipped() { diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php index 2fcad7fee..00c1dfc47 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -19,7 +28,7 @@ use function in_array; * @internal * @coversNothing */ -class ParticipationControllerTest extends WebTestCase +final class ParticipationControllerTest extends WebTestCase { /** * @var \Symfony\Component\BrowserKit\Client @@ -46,7 +55,7 @@ class ParticipationControllerTest extends WebTestCase { self::bootKernel(); - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', @@ -457,7 +466,7 @@ class ParticipationControllerTest extends WebTestCase $circles = $this->em->getRepository('ChillMainBundle:Scope') ->findAll(); array_filter($circles, static function ($circle) use ($circleName) { - return in_array($circleName, $circle->getName()); + return in_array($circleName, $circle->getName(), true); }); $circle = $circles[0]; @@ -509,7 +518,7 @@ class ParticipationControllerTest extends WebTestCase $person = $persons[array_rand($persons)]; - if (in_array($person->getId(), $this->personsIdsCache)) { + if (in_array($person->getId(), $this->personsIdsCache, true)) { return $this->getRandomPerson($centerName); // we try another time } $this->personsIdsCache[] = $person->getId(); diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php index 23237d060..9da1df086 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class RoleControllerTest extends WebTestCase +final class RoleControllerTest extends WebTestCase { public function testSkipped() { diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php index 2ddcabee2..99a618a9f 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class StatusControllerTest extends WebTestCase +final class StatusControllerTest extends WebTestCase { public function testSkipped() { diff --git a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php index 16b112825..f309fcada 100644 --- a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Tests\Search; use Chill\EventBundle\Entity\Event; @@ -21,7 +30,7 @@ use function in_array; * @internal * @coversNothing */ -class EventSearchTest extends WebTestCase +final class EventSearchTest extends WebTestCase { /** * The center A. @@ -72,7 +81,7 @@ class EventSearchTest extends WebTestCase /** @var \Symfony\Component\HttpKernel\KernelInterface $kernel */ $kernel = self::$kernel; - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', @@ -124,7 +133,7 @@ class EventSearchTest extends WebTestCase */ public function testDisplayAllWrongUser() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center b_social', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', @@ -162,7 +171,7 @@ class EventSearchTest extends WebTestCase // there should not have any other results, but if any other bundle // add some other event, we go on next pages - if ($crawler->selectLink('Voir tous les résultats')->count() == 0) { + if ($crawler->selectLink('Voir tous les résultats')->count() === 0) { return; } @@ -239,7 +248,7 @@ class EventSearchTest extends WebTestCase $this->assertLessThanOrEqual($dateTo, $date); } - if ($crawler->selectLink('Voir tous les résultats')->count() == 0) { + if ($crawler->selectLink('Voir tous les résultats')->count() === 0) { return; } @@ -336,7 +345,7 @@ class EventSearchTest extends WebTestCase /** @var \Chill\MainBundle\Entity\Scope $circle */ foreach ($circles as $circle) { - if (in_array($name, $circle->getName())) { + if (in_array($name, $circle->getName(), true)) { return $circle; } } diff --git a/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php b/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php index 1c83c8ff9..5176b879a 100644 --- a/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php +++ b/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\EventBundle\Timeline; use Chill\EventBundle\Entity\Event; diff --git a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php index a364aa4d4..faf6ac226 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Event; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20160318111334 extends AbstractMigration public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE chill_event_role DROP CONSTRAINT FK_AA714E54C54C8C93'); $this->addSql('ALTER TABLE chill_event_status DROP CONSTRAINT FK_A6CC85D0C54C8C93'); @@ -49,7 +58,7 @@ class Version20160318111334 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE SEQUENCE chill_event_event_type_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE chill_event_role_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); diff --git a/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php b/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php index 90d73e461..5127234dd 100644 --- a/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php +++ b/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillFamilyMembersBundle/Config/ConfigRepository.php b/src/Bundle/ChillFamilyMembersBundle/Config/ConfigRepository.php index 968ec32d2..217010272 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Config/ConfigRepository.php +++ b/src/Bundle/ChillFamilyMembersBundle/Config/ConfigRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Config; use function count; diff --git a/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/ChillAMLIFamilyMembersExtension.php b/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/ChillAMLIFamilyMembersExtension.php index 463359652..b09e40279 100644 --- a/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/ChillAMLIFamilyMembersExtension.php +++ b/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/ChillAMLIFamilyMembersExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\DependencyInjection; use Chill\AMLI\FamilyMembersBundle\Security\Voter\FamilyMemberVoter; diff --git a/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/Configuration.php index 69a346912..31024b677 100644 --- a/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillFamilyMembersBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillFamilyMembersBundle/Entity/AbstractFamilyMember.php b/src/Bundle/ChillFamilyMembersBundle/Entity/AbstractFamilyMember.php index 50da10bcf..69f78f400 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Entity/AbstractFamilyMember.php +++ b/src/Bundle/ChillFamilyMembersBundle/Entity/AbstractFamilyMember.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Entity; use Chill\MainBundle\Entity\HasCenterInterface; diff --git a/src/Bundle/ChillFamilyMembersBundle/Entity/FamilyMember.php b/src/Bundle/ChillFamilyMembersBundle/Entity/FamilyMember.php index 854b4aa58..d4360eaae 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Entity/FamilyMember.php +++ b/src/Bundle/ChillFamilyMembersBundle/Entity/FamilyMember.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMemberType.php b/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMemberType.php index 4351adf8c..fb62fcaf9 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMemberType.php +++ b/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMemberType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Form; use Chill\AMLI\FamilyMembersBundle\Config\ConfigRepository; diff --git a/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMembersType.php b/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMembersType.php index df99d5ba9..b38197525 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMembersType.php +++ b/src/Bundle/ChillFamilyMembersBundle/Form/FamilyMembersType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Form; use Chill\MainBundle\Form\Type\ChillCollectionType; diff --git a/src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php index ed1f5d927..cf3a55787 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Menu; use Chill\AMLI\FamilyMembersBundle\Security\Voter\FamilyMemberVoter; diff --git a/src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php b/src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php index d37906da5..cdebd41ef 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php +++ b/src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Security\Voter; use Chill\AMLI\FamilyMembersBundle\Entity\FamilyMember; @@ -62,8 +71,8 @@ class FamilyMemberVoter extends AbstractChillVoter implements ProvideRoleHierarc protected function supports($attribute, $subject) { - return (in_array($attribute, self::ROLES) && $subject instanceof FamilyMember) - || ($subject instanceof Person && in_array($attribute, [self::SHOW, self::CREATE])); + return (in_array($attribute, self::ROLES, true) && $subject instanceof FamilyMember) + || ($subject instanceof Person && in_array($attribute, [self::SHOW, self::CREATE], true)); } protected function voteOnAttribute($attribute, $subject, \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token) diff --git a/src/Bundle/ChillFamilyMembersBundle/Templating/Twig.php b/src/Bundle/ChillFamilyMembersBundle/Templating/Twig.php index f10c2ab66..a2cf2bf20 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Templating/Twig.php +++ b/src/Bundle/ChillFamilyMembersBundle/Templating/Twig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Templating; use Chill\AMLI\FamilyMembersBundle\Config\ConfigRepository; diff --git a/src/Bundle/ChillFamilyMembersBundle/Tests/Controller/FamilyMemberControllerTest.php b/src/Bundle/ChillFamilyMembersBundle/Tests/Controller/FamilyMemberControllerTest.php index 6baa62bc1..b23166a03 100644 --- a/src/Bundle/ChillFamilyMembersBundle/Tests/Controller/FamilyMemberControllerTest.php +++ b/src/Bundle/ChillFamilyMembersBundle/Tests/Controller/FamilyMemberControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\AMLI\FamilyMembersBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,25 +24,25 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class FamilyMemberControllerTest extends WebTestCase +final class FamilyMemberControllerTest extends WebTestCase { public function testEdit() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/edit'); } public function testIndex() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/index'); } public function testNew() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/new'); } diff --git a/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php b/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php index e3ee53897..ac7ebd2be 100644 --- a/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php +++ b/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\CRUD\CompilerPass; use Symfony\Component\DependencyInjection\Alias; diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index fc6580f61..bab799de2 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\CRUD\Controller; use Chill\MainBundle\CRUD\Form\CRUDDeleteEntityForm; diff --git a/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php b/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php index 277bcca51..a184e14b3 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php +++ b/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\CRUD\Form; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php b/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php index 0ac1da9ff..2a352d5f0 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php +++ b/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\CRUD\Resolver; use Doctrine\ORM\EntityManagerInterface; diff --git a/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php b/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php index 398b28685..33cce8a2f 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php +++ b/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php @@ -126,7 +126,7 @@ class CRUDRoutesLoader extends Loader // path are rewritten // if name === 'default', we rewrite it to nothing :-) - $localName = in_array($name, ['_entity', '_index']) ? '' : '/' . $name; + $localName = in_array($name, ['_entity', '_index'], true) ? '' : '/' . $name; if ('collection' === $action['single_collection'] || '_index' === $name) { $localPath = $action['path'] ?? $localName . '.{_format}'; @@ -149,8 +149,8 @@ class CRUDRoutesLoader extends Loader 'or allow, at least, one method'); } - if ('_entity' === $name && in_array(Request::METHOD_POST, $methods)) { - unset($methods[array_search(Request::METHOD_POST, $methods)]); + if ('_entity' === $name && in_array(Request::METHOD_POST, $methods, true)) { + unset($methods[array_search(Request::METHOD_POST, $methods, true)]); $entityPostRoute = $this->createEntityPostRoute( $name, $crudConfig, diff --git a/src/Bundle/ChillMainBundle/CRUD/Templating/TwigCRUDResolver.php b/src/Bundle/ChillMainBundle/CRUD/Templating/TwigCRUDResolver.php index 40b792bb6..d731fe005 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Templating/TwigCRUDResolver.php +++ b/src/Bundle/ChillMainBundle/CRUD/Templating/TwigCRUDResolver.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\CRUD\Templating; use Chill\MainBundle\CRUD\Resolver\Resolver; diff --git a/src/Bundle/ChillMainBundle/Center/GroupingCenterInterface.php b/src/Bundle/ChillMainBundle/Center/GroupingCenterInterface.php index 442ebffa2..1549d9263 100644 --- a/src/Bundle/ChillMainBundle/Center/GroupingCenterInterface.php +++ b/src/Bundle/ChillMainBundle/Center/GroupingCenterInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Center; /** diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php index 244dfa3b0..37bb8fa04 100644 --- a/src/Bundle/ChillMainBundle/ChillMainBundle.php +++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle; use Chill\MainBundle\CRUD\CompilerPass\CRUDControllerCompilerPass; diff --git a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php index cf00171dc..0ef1ee562 100644 --- a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php +++ b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Command; use Chill\MainBundle\Entity\User; @@ -139,8 +148,8 @@ class ChillUserSendRenewPasswordCodeCommand extends Command $headers = $reader->getHeader(); - if (false === in_array('username', $headers) - && false === in_array('email', $headers)) { + if (false === in_array('username', $headers, true) + && false === in_array('email', $headers, true)) { throw new InvalidArgumentException('The csv file does not have an ' . 'username or email header'); } diff --git a/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php index 075a1a942..eea4f12d7 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Command; use Doctrine\ORM\EntityManager; @@ -103,10 +112,10 @@ class LoadAndUpdateLanguagesCommand extends Command ( !$input->getOption(self::INCLUDE_REGIONAL_VERSION) && strpos($code, '_') - && !in_array($code, $this->regionalVersionToInclude) + && !in_array($code, $this->regionalVersionToInclude, true) ) || ( !$input->getOption(self::INCLUDE_ANCIENT) - && in_array($code, $this->ancientToExclude) + && in_array($code, $this->ancientToExclude, true) ) ); diff --git a/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php index 8846ecb91..6965dbe43 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Command; use Doctrine\ORM\EntityManager; diff --git a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php index 5d7b39acc..a5f3c8611 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php @@ -150,21 +150,21 @@ class LoadPostalCodesCommand extends Command ->setName($row[1]) ->setCountry($country); - if (null != $row[3]) { + if (null !== $row[3]) { $postalCode->setRefPostalCodeId($row[3]); } - if (null != $row[4] & null != $row[5]) { + if (null !== $row[4] & null !== $row[5]) { $postalCode->setCenter(Point::fromLonLat((float) $row[5], (float) $row[4])); } - if (null != $row[6]) { + if (null !== $row[6]) { $postalCode->setPostalCodeSource($row[6]); } $errors = $this->validator->validate($postalCode); - if ($errors->count() == 0) { + if ($errors->count() === 0) { $em->persist($postalCode); } else { $msg = ''; @@ -198,7 +198,7 @@ class LoadPostalCodesCommand extends Command $resource = fopen($filename, 'rb'); - if (false == $resource) { + if (false === $resource) { throw new RuntimeException("The file '{$filename}' could not be opened."); } diff --git a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php index 78ab6ada0..e34ecc7ee 100644 --- a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php +++ b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Command; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Controller/AddressApiController.php b/src/Bundle/ChillMainBundle/Controller/AddressApiController.php index 9a5f9cc62..3a72b83d3 100644 --- a/src/Bundle/ChillMainBundle/Controller/AddressApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/AddressApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php b/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php index 6f6836730..c5bd14d95 100644 --- a/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php +++ b/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillMainBundle/Controller/AdminController.php b/src/Bundle/ChillMainBundle/Controller/AdminController.php index be6cc4e21..5975070ba 100644 --- a/src/Bundle/ChillMainBundle/Controller/AdminController.php +++ b/src/Bundle/ChillMainBundle/Controller/AdminController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillMainBundle/Controller/CenterController.php b/src/Bundle/ChillMainBundle/Controller/CenterController.php index d07cd1dab..08f446e40 100644 --- a/src/Bundle/ChillMainBundle/Controller/CenterController.php +++ b/src/Bundle/ChillMainBundle/Controller/CenterController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Controller/DefaultController.php b/src/Bundle/ChillMainBundle/Controller/DefaultController.php index 0670f2365..d852954af 100644 --- a/src/Bundle/ChillMainBundle/Controller/DefaultController.php +++ b/src/Bundle/ChillMainBundle/Controller/DefaultController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index 97f9eda79..741e5b669 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Controller/LocationApiController.php b/src/Bundle/ChillMainBundle/Controller/LocationApiController.php index 16fc414d9..0b8852fa3 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillMainBundle/Controller/LocationController.php b/src/Bundle/ChillMainBundle/Controller/LocationController.php index ca740bcb5..cf544059a 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php b/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php index 2ee0bc41b..664e14a45 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php b/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php index b7c98a6e3..a37733969 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillMainBundle/Controller/LoginController.php b/src/Bundle/ChillMainBundle/Controller/LoginController.php index 09b14fb44..c5b9250b0 100644 --- a/src/Bundle/ChillMainBundle/Controller/LoginController.php +++ b/src/Bundle/ChillMainBundle/Controller/LoginController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillMainBundle/Controller/MenuController.php b/src/Bundle/ChillMainBundle/Controller/MenuController.php index 0f87217eb..3a6ab4631 100644 --- a/src/Bundle/ChillMainBundle/Controller/MenuController.php +++ b/src/Bundle/ChillMainBundle/Controller/MenuController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillMainBundle/Controller/NotificationController.php b/src/Bundle/ChillMainBundle/Controller/NotificationController.php index 58be0a33a..7afb017ee 100644 --- a/src/Bundle/ChillMainBundle/Controller/NotificationController.php +++ b/src/Bundle/ChillMainBundle/Controller/NotificationController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Notification\NotificationRenderer; diff --git a/src/Bundle/ChillMainBundle/Controller/PasswordController.php b/src/Bundle/ChillMainBundle/Controller/PasswordController.php index 32ab13f25..6edea0f0b 100644 --- a/src/Bundle/ChillMainBundle/Controller/PasswordController.php +++ b/src/Bundle/ChillMainBundle/Controller/PasswordController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php b/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php index 3476c4bbe..27437bffb 100644 --- a/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php index bd855dafb..65832567e 100644 --- a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php +++ b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Entity\PermissionsGroup; diff --git a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php index fc11a30d6..b52e0d10f 100644 --- a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php +++ b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillMainBundle/Controller/PostalCodeController.php b/src/Bundle/ChillMainBundle/Controller/PostalCodeController.php index 04ac9332e..66d22c8b5 100644 --- a/src/Bundle/ChillMainBundle/Controller/PostalCodeController.php +++ b/src/Bundle/ChillMainBundle/Controller/PostalCodeController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Entity\PostalCode; diff --git a/src/Bundle/ChillMainBundle/Controller/ScopeController.php b/src/Bundle/ChillMainBundle/Controller/ScopeController.php index 8fae5d730..b940da292 100644 --- a/src/Bundle/ChillMainBundle/Controller/ScopeController.php +++ b/src/Bundle/ChillMainBundle/Controller/ScopeController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Entity\Scope; diff --git a/src/Bundle/ChillMainBundle/Controller/SearchController.php b/src/Bundle/ChillMainBundle/Controller/SearchController.php index fd4c0bc12..6115e01b4 100644 --- a/src/Bundle/ChillMainBundle/Controller/SearchController.php +++ b/src/Bundle/ChillMainBundle/Controller/SearchController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Pagination\PaginatorFactory; diff --git a/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php b/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php index 731e2b3a6..390769101 100644 --- a/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php +++ b/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Pagination\PaginatorFactory; diff --git a/src/Bundle/ChillMainBundle/Controller/UIController.php b/src/Bundle/ChillMainBundle/Controller/UIController.php index 9424cfbad..fbccda126 100644 --- a/src/Bundle/ChillMainBundle/Controller/UIController.php +++ b/src/Bundle/ChillMainBundle/Controller/UIController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\Templating\UI\CountNotificationUser; diff --git a/src/Bundle/ChillMainBundle/Controller/UserApiController.php b/src/Bundle/ChillMainBundle/Controller/UserApiController.php index 46ba35155..673bfddbb 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAbstractNotificationsTrait.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAbstractNotificationsTrait.php index a5ff75ec4..d0bb71f3a 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAbstractNotificationsTrait.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAbstractNotificationsTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\Notification; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php index 9495ec8bf..ee0454037 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Doctrine\Model\Point; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCenters.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCenters.php index adcfe484e..22072b2c0 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCenters.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCenters.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCivility.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCivility.php index 84a2ba181..e66f8591b 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCivility.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCivility.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\Civility; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php index e162b1d97..0836ef8a5 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Command\LoadCountriesCommand; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadGroupCenters.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadGroupCenters.php index 4b1580324..edafa24ce 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadGroupCenters.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadGroupCenters.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\GroupCenter; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php index 403ebd6de..3314b5759 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\Language; @@ -47,8 +56,8 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, foreach (Intl::getLanguageBundle()->getLanguageNames() as $code => $language) { if ( - !in_array($code, $this->regionalVersionToInclude) - && !in_array($code, $this->ancientToExclude) + !in_array($code, $this->regionalVersionToInclude, true) + && !in_array($code, $this->ancientToExclude, true) ) { $lang = (new Language()) ->setId($code) diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php index 72d1c05e5..72d5c4326 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\LocationType; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPermissionsGroup.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPermissionsGroup.php index cffdf98d7..ece81441a 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPermissionsGroup.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPermissionsGroup.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\PermissionsGroup; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php index e32c40cdb..dd8276ae7 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Doctrine\Model\Point; @@ -350,15 +359,15 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface ->setCode($code[0]) ->setName(ucwords(strtolower($code[1]))); - if (null != $code[3]) { + if (null !== $code[3]) { $c->setRefPostalCodeId($code[3]); } - if (null != $code[4] & null != $code[5]) { + if (null !== $code[4] & null !== $code[5]) { $c->setCenter(Point::fromLonLat((float) $code[5], (float) $code[4])); } - if (null != $code[6]) { + if (null !== $code[6]) { $c->setPostalCodeSource($code[6]); } diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadRoleScopes.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadRoleScopes.php index adacea5ef..df70a5303 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadRoleScopes.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadRoleScopes.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\RoleScope; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadScopes.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadScopes.php index 33a7b2d6b..c442f5dd9 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadScopes.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadScopes.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Doctrine\Common\DataFixtures\AbstractFixture; diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php index 1dc27dea0..811d22b8f 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DataFixtures\ORM; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 41c731ec6..8f7d0bd9f 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use Chill\MainBundle\Controller\AddressApiController; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php index f91cfe126..3ca31b376 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use LogicException; @@ -61,7 +70,7 @@ class ExportsCompilerPass implements CompilerPassInterface "service '{$id}' definition"); } - if (array_search($attributes['alias'], $knownAliases)) { + if (array_search($attributes['alias'], $knownAliases, true)) { throw new LogicException('There is already a chill.export_aggregator service with alias ' . $attributes['alias'] . '. Choose another alias.'); } @@ -92,7 +101,7 @@ class ExportsCompilerPass implements CompilerPassInterface "service '{$id}' definition"); } - if (array_search($attributes['prefix'], $knownAliases)) { + if (array_search($attributes['prefix'], $knownAliases, true)) { throw new LogicException('There is already a chill.export_elements_provider service with prefix ' . $attributes['prefix'] . '. Choose another prefix.'); } @@ -123,7 +132,7 @@ class ExportsCompilerPass implements CompilerPassInterface "service '{$id}' definition"); } - if (array_search($attributes['alias'], $knownAliases)) { + if (array_search($attributes['alias'], $knownAliases, true)) { throw new LogicException('There is already a chill.export service with alias ' . $attributes['alias'] . '. Choose another alias.'); } @@ -154,7 +163,7 @@ class ExportsCompilerPass implements CompilerPassInterface "service '{$id}' definition"); } - if (array_search($attributes['alias'], $knownAliases)) { + if (array_search($attributes['alias'], $knownAliases, true)) { throw new LogicException('There is already a chill.export_filter service with alias ' . $attributes['alias'] . '. Choose another alias.'); } @@ -185,7 +194,7 @@ class ExportsCompilerPass implements CompilerPassInterface "service '{$id}' definition"); } - if (array_search($attributes['alias'], $knownAliases)) { + if (array_search($attributes['alias'], $knownAliases, true)) { throw new LogicException('There is already a chill.export_formatter service with alias ' . $attributes['alias'] . '. Choose another alias.'); } diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php index 7a361f0e0..c61927bd9 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use LogicException; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php index 68e2d3a16..da41a6f71 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use Chill\MainBundle\Routing\MenuComposer; @@ -36,7 +45,7 @@ class MenuCompilerPass implements CompilerPassInterface } usort($services, static function ($a, $b) { - if ($a['priority'] == $b['priority']) { + if ($a['priority'] === $b['priority']) { return 0; } diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php index 3092c3ee6..7cecaa673 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use Chill\MainBundle\Templating\UI\CountNotificationUser; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php index 8bb23886a..47c85c23f 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use LogicException; @@ -45,7 +54,7 @@ class SearchableServicesCompilerPass implements CompilerPassInterface "service '{$id}' definition"); } - if (array_search($attributes['alias'], $knownAliases)) { + if (array_search($attributes['alias'], $knownAliases, true)) { throw new LogicException('There is already a chill.search service with alias ' . $attributes['alias'] . '. Choose another alias.'); } diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php index 246a81a1a..359d30ac1 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use LogicException; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php index 2fd9416c4..793e00eff 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\CompilerPass; use Chill\MainBundle\DependencyInjection\Widget\AbstractWidgetsCompilerPass; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php index 5b3e4723b..49f2c1504 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use LogicException; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php index 85d0150ba..93cd7e8b1 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/MissingBundleException.php b/src/Bundle/ChillMainBundle/DependencyInjection/MissingBundleException.php index 636cc69c3..42a309543 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/MissingBundleException.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/MissingBundleException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use Exception; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/RoleProvidersCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/RoleProvidersCompilerPass.php index 5e3538234..6f13e8513 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/RoleProvidersCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/RoleProvidersCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection; use LogicException; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php index cbad0f954..dcf3d1272 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\Widget; use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface; @@ -286,7 +295,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface get_class($factory)); } - if (count($factory->getAllowedPlaces()) == 0) { + if (count($factory->getAllowedPlaces()) === 0) { throw new LengthException("The method 'getAllowedPlaces' should " . 'return a non-empty array, but returned 0 elements on ' . get_class($factory) . '::getAllowedPlaces()'); @@ -350,7 +359,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface } // check if the order exists - if (array_search($ordering, $this->cacheOrdering[$place])) { + if (array_search($ordering, $this->cacheOrdering[$place], true)) { // if the order exists, increment of 1 and try again return $this->cacheAndGetOrdering($place, $ordering + 1); } @@ -372,7 +381,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface { if ($this->widgetServices[$widgetAlias] instanceof WidgetFactoryInterface) { if (in_array($place, $this->widgetServices[$widgetAlias] - ->getAllowedPlaces())) { + ->getAllowedPlaces(), true)) { return true; } } else { diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php index 7bf0d2777..08a3c566b 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\Widget; use Chill\MainBundle\DependencyInjection\Widget\AbstractWidgetsCompilerPass as WidgetsCompilerPass; @@ -195,7 +204,7 @@ trait AddWidgetConfigurationTrait protected function filterWidgetByPlace($place) { foreach ($this->widgetFactories as $factory) { - if (in_array($place, $factory->getAllowedPlaces())) { + if (in_array($place, $factory->getAllowedPlaces(), true)) { yield $factory; } } diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php index e6153bc4e..c39e85e38 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\Widget\Factory; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/WidgetFactoryInterface.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/WidgetFactoryInterface.php index 99092e461..79fbaf61e 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/WidgetFactoryInterface.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/WidgetFactoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\Widget\Factory; use Symfony\Component\Config\Definition\Builder\NodeBuilder; diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/HasWidgetFactoriesExtensionInterface.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/HasWidgetFactoriesExtensionInterface.php index 702ba15da..103e99661 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/HasWidgetFactoriesExtensionInterface.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/HasWidgetFactoriesExtensionInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\DependencyInjection\Widget; use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php index 0a60974b1..f1ec328dc 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php index a2d2b1f82..1cbd2ce09 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php index 31b1504db..1f3873cae 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php index 1f4d12afa..2c2f05310 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php index 779d1281d..d0166bc7a 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php index 9a28b6132..ec8cd3619 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php index 0ef7d8b2f..40f07b212 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php index 6606c2298..0f25fb275 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\Lexer; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php index 80e3e58e8..b9b190add 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php b/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php index 4c91f9679..a3607598e 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Event; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Migrations/VersionComparator.php b/src/Bundle/ChillMainBundle/Doctrine/Migrations/VersionComparator.php index f1e528213..98b442538 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Migrations/VersionComparator.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Migrations/VersionComparator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Migrations; use Doctrine\Migrations\Version\Comparator; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php index 423e23e04..cce39f457 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Model; use Exception; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Model/PointException.php b/src/Bundle/ChillMainBundle/Doctrine/Model/PointException.php index 98a8b0e9d..f8762a2a3 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Model/PointException.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/PointException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Model; use Exception; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Model/TrackCreationInterface.php b/src/Bundle/ChillMainBundle/Doctrine/Model/TrackCreationInterface.php index ba570eec4..141047243 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Model/TrackCreationInterface.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/TrackCreationInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Model; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Model/TrackUpdateInterface.php b/src/Bundle/ChillMainBundle/Doctrine/Model/TrackUpdateInterface.php index e4021de66..d31cd1939 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Model/TrackUpdateInterface.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/TrackUpdateInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Model; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php b/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php index 964d17c31..82b14444b 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Doctrine\Type; use DateInterval; diff --git a/src/Bundle/ChillMainBundle/Entity/Address.php b/src/Bundle/ChillMainBundle/Entity/Address.php index 9fabe8674..2519194d2 100644 --- a/src/Bundle/ChillMainBundle/Entity/Address.php +++ b/src/Bundle/ChillMainBundle/Entity/Address.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Chill\MainBundle\Doctrine\Model\Point; diff --git a/src/Bundle/ChillMainBundle/Entity/AddressReference.php b/src/Bundle/ChillMainBundle/Entity/AddressReference.php index 02d600272..bdc40c5f7 100644 --- a/src/Bundle/ChillMainBundle/Entity/AddressReference.php +++ b/src/Bundle/ChillMainBundle/Entity/AddressReference.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Chill\MainBundle\Doctrine\Model\Point; diff --git a/src/Bundle/ChillMainBundle/Entity/Center.php b/src/Bundle/ChillMainBundle/Entity/Center.php index b76f2fed2..c41e70bee 100644 --- a/src/Bundle/ChillMainBundle/Entity/Center.php +++ b/src/Bundle/ChillMainBundle/Entity/Center.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillMainBundle/Entity/Civility.php b/src/Bundle/ChillMainBundle/Entity/Civility.php index 2ab66ebb8..48220d00a 100644 --- a/src/Bundle/ChillMainBundle/Entity/Civility.php +++ b/src/Bundle/ChillMainBundle/Entity/Civility.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillMainBundle/Entity/Country.php b/src/Bundle/ChillMainBundle/Entity/Country.php index a199c5a7b..a6763c1c4 100644 --- a/src/Bundle/ChillMainBundle/Entity/Country.php +++ b/src/Bundle/ChillMainBundle/Entity/Country.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php b/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php index 4a4977632..1176f79ae 100644 --- a/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php +++ b/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity\Embeddable; use DateTime; diff --git a/src/Bundle/ChillMainBundle/Entity/GroupCenter.php b/src/Bundle/ChillMainBundle/Entity/GroupCenter.php index dd0f700e9..f7635a292 100644 --- a/src/Bundle/ChillMainBundle/Entity/GroupCenter.php +++ b/src/Bundle/ChillMainBundle/Entity/GroupCenter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillMainBundle/Entity/HasCenterInterface.php b/src/Bundle/ChillMainBundle/Entity/HasCenterInterface.php index a917662ca..d9a427364 100644 --- a/src/Bundle/ChillMainBundle/Entity/HasCenterInterface.php +++ b/src/Bundle/ChillMainBundle/Entity/HasCenterInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; /** diff --git a/src/Bundle/ChillMainBundle/Entity/HasCentersInterface.php b/src/Bundle/ChillMainBundle/Entity/HasCentersInterface.php index f3bb80201..e50f486d2 100644 --- a/src/Bundle/ChillMainBundle/Entity/HasCentersInterface.php +++ b/src/Bundle/ChillMainBundle/Entity/HasCentersInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; interface HasCentersInterface diff --git a/src/Bundle/ChillMainBundle/Entity/HasScopeInterface.php b/src/Bundle/ChillMainBundle/Entity/HasScopeInterface.php index cf93b7326..8ba0637d9 100644 --- a/src/Bundle/ChillMainBundle/Entity/HasScopeInterface.php +++ b/src/Bundle/ChillMainBundle/Entity/HasScopeInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; /** diff --git a/src/Bundle/ChillMainBundle/Entity/HasScopesInterface.php b/src/Bundle/ChillMainBundle/Entity/HasScopesInterface.php index b88618ee7..f0641ed39 100644 --- a/src/Bundle/ChillMainBundle/Entity/HasScopesInterface.php +++ b/src/Bundle/ChillMainBundle/Entity/HasScopesInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; interface HasScopesInterface diff --git a/src/Bundle/ChillMainBundle/Entity/Language.php b/src/Bundle/ChillMainBundle/Entity/Language.php index 0a14a4380..9baf8f1a0 100644 --- a/src/Bundle/ChillMainBundle/Entity/Language.php +++ b/src/Bundle/ChillMainBundle/Entity/Language.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillMainBundle/Entity/Location.php b/src/Bundle/ChillMainBundle/Entity/Location.php index 036673ec9..527959185 100644 --- a/src/Bundle/ChillMainBundle/Entity/Location.php +++ b/src/Bundle/ChillMainBundle/Entity/Location.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; diff --git a/src/Bundle/ChillMainBundle/Entity/LocationType.php b/src/Bundle/ChillMainBundle/Entity/LocationType.php index b0d91a4f1..f98a71e2f 100644 --- a/src/Bundle/ChillMainBundle/Entity/LocationType.php +++ b/src/Bundle/ChillMainBundle/Entity/LocationType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Chill\MainBundle\Repository\LocationTypeRepository; diff --git a/src/Bundle/ChillMainBundle/Entity/Notification.php b/src/Bundle/ChillMainBundle/Entity/Notification.php index bdf2529ca..79b75eeef 100644 --- a/src/Bundle/ChillMainBundle/Entity/Notification.php +++ b/src/Bundle/ChillMainBundle/Entity/Notification.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use DateTimeImmutable; diff --git a/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php b/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php index 66a18e8e4..d78ba2b5b 100644 --- a/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php +++ b/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillMainBundle/Entity/PostalCode.php b/src/Bundle/ChillMainBundle/Entity/PostalCode.php index 11a5d10c9..aefd0a895 100644 --- a/src/Bundle/ChillMainBundle/Entity/PostalCode.php +++ b/src/Bundle/ChillMainBundle/Entity/PostalCode.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Chill\MainBundle\Doctrine\Model\Point; diff --git a/src/Bundle/ChillMainBundle/Entity/Scope.php b/src/Bundle/ChillMainBundle/Entity/Scope.php index adac7ce40..6bacb9c19 100644 --- a/src/Bundle/ChillMainBundle/Entity/Scope.php +++ b/src/Bundle/ChillMainBundle/Entity/Scope.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 1891ac525..150b65c3b 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; @@ -337,7 +346,7 @@ class User implements AdvancedUserInterface $groupCentersIds = []; foreach ($this->getGroupCenters() as $groupCenter) { - if (in_array($groupCenter->getId(), $groupCentersIds)) { + if (in_array($groupCenter->getId(), $groupCentersIds, true)) { $context->buildViolation('The user has already those permissions') ->addViolation(); } else { diff --git a/src/Bundle/ChillMainBundle/Entity/UserJob.php b/src/Bundle/ChillMainBundle/Entity/UserJob.php index dfc48d16b..61513e7f8 100644 --- a/src/Bundle/ChillMainBundle/Entity/UserJob.php +++ b/src/Bundle/ChillMainBundle/Entity/UserJob.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillMainBundle/Export/AggregatorInterface.php b/src/Bundle/ChillMainBundle/Export/AggregatorInterface.php index 19de762d5..fb45fafc9 100644 --- a/src/Bundle/ChillMainBundle/Export/AggregatorInterface.php +++ b/src/Bundle/ChillMainBundle/Export/AggregatorInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Closure; diff --git a/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php b/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php index 4a8efc586..7f7b0ce80 100644 --- a/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Symfony\Component\Security\Core\Role\Role; diff --git a/src/Bundle/ChillMainBundle/Export/ExportElementInterface.php b/src/Bundle/ChillMainBundle/Export/ExportElementInterface.php index b1fad50b4..f5b3892af 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportElementInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportElementInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Bundle/ChillMainBundle/Export/ExportElementValidatedInterface.php b/src/Bundle/ChillMainBundle/Export/ExportElementValidatedInterface.php index c888b05c3..4977f88d5 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportElementValidatedInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportElementValidatedInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Bundle/ChillMainBundle/Export/ExportElementsProviderInterface.php b/src/Bundle/ChillMainBundle/Export/ExportElementsProviderInterface.php index b33237a4f..0024fb9e3 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportElementsProviderInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportElementsProviderInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; /** diff --git a/src/Bundle/ChillMainBundle/Export/ExportInterface.php b/src/Bundle/ChillMainBundle/Export/ExportInterface.php index bfe6ee0bc..6f08f865b 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Closure; diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index aa721621b..f827d99e8 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Chill\MainBundle\Form\Type\Export\ExportType; @@ -120,7 +129,7 @@ class ExportManager public function &getFiltersApplyingOn(ExportInterface $export, ?array $centers = null) { foreach ($this->filters as $alias => $filter) { - if (in_array($filter->applyOn(), $export->supportsModifiers()) + if (in_array($filter->applyOn(), $export->supportsModifiers(), true) && $this->isGrantedForElement($filter, $export, $centers)) { yield $alias => $filter; } @@ -141,7 +150,7 @@ class ExportManager } foreach ($this->aggregators as $alias => $aggregator) { - if (in_array($aggregator->applyOn(), $export->supportsModifiers()) + if (in_array($aggregator->applyOn(), $export->supportsModifiers(), true) && $this->isGrantedForElement($aggregator, $export, $centers)) { yield $alias => $aggregator; } @@ -350,7 +359,7 @@ class ExportManager $existingTypes = []; foreach ($this->exports as $export) { - if (!in_array($export->getType(), $existingTypes)) { + if (!in_array($export->getType(), $existingTypes, true)) { $existingTypes[] = $export->getType(); } } @@ -478,7 +487,7 @@ class ExportManager public function getFormattersByTypes(array $types) { foreach ($this->formatters as $alias => $formatter) { - if (in_array($formatter->getType(), $types)) { + if (in_array($formatter->getType(), $types, true)) { yield $alias => $formatter; } } @@ -679,7 +688,7 @@ class ExportManager $usedTypes = []; foreach ($this->retrieveUsedAggregators($data) as $alias => $aggregator) { - if (!in_array($aggregator->applyOn(), $usedTypes)) { + if (!in_array($aggregator->applyOn(), $usedTypes, true)) { $usedTypes[] = $aggregator->applyOn(); } } @@ -719,10 +728,10 @@ class ExportManager $usedTypes = []; foreach ($data as $alias => $filterData) { - if (true == $filterData['enabled']) { + if (true === $filterData['enabled']) { $filter = $this->getFilter($alias); - if (!in_array($filter->applyOn(), $usedTypes)) { + if (!in_array($filter->applyOn(), $usedTypes, true)) { $usedTypes[] = $filter->applyOn(); } } diff --git a/src/Bundle/ChillMainBundle/Export/FilterInterface.php b/src/Bundle/ChillMainBundle/Export/FilterInterface.php index ac7c0c7dc..7d3070d7d 100644 --- a/src/Bundle/ChillMainBundle/Export/FilterInterface.php +++ b/src/Bundle/ChillMainBundle/Export/FilterInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; /** diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php index bd6573056..009a729f3 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export\Formatter; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php index 65ea70e55..221958357 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export\Formatter; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php index 0fefdbb34..c91a82378 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export\Formatter; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php index 7b4ffb3f6..22c949570 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export\Formatter; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Export/FormatterInterface.php b/src/Bundle/ChillMainBundle/Export/FormatterInterface.php index f18822008..78808986f 100644 --- a/src/Bundle/ChillMainBundle/Export/FormatterInterface.php +++ b/src/Bundle/ChillMainBundle/Export/FormatterInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Bundle/ChillMainBundle/Export/GroupedExportInterface.php b/src/Bundle/ChillMainBundle/Export/GroupedExportInterface.php index f0ee4ea62..5d11c8d00 100644 --- a/src/Bundle/ChillMainBundle/Export/GroupedExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/GroupedExportInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; /** diff --git a/src/Bundle/ChillMainBundle/Export/ListInterface.php b/src/Bundle/ChillMainBundle/Export/ListInterface.php index 197cdf25e..7493e06b9 100644 --- a/src/Bundle/ChillMainBundle/Export/ListInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ListInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; /** diff --git a/src/Bundle/ChillMainBundle/Export/ModifierInterface.php b/src/Bundle/ChillMainBundle/Export/ModifierInterface.php index ce5161556..bfc5eb480 100644 --- a/src/Bundle/ChillMainBundle/Export/ModifierInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ModifierInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Export; use Doctrine\ORM\QueryBuilder; diff --git a/src/Bundle/ChillMainBundle/Form/AdvancedSearchType.php b/src/Bundle/ChillMainBundle/Form/AdvancedSearchType.php index 17b033ec1..03761d4f3 100644 --- a/src/Bundle/ChillMainBundle/Form/AdvancedSearchType.php +++ b/src/Bundle/ChillMainBundle/Form/AdvancedSearchType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Search\SearchProvider; diff --git a/src/Bundle/ChillMainBundle/Form/CenterType.php b/src/Bundle/ChillMainBundle/Form/CenterType.php index 2f493078f..0ed22dc17 100644 --- a/src/Bundle/ChillMainBundle/Form/CenterType.php +++ b/src/Bundle/ChillMainBundle/Form/CenterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php b/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php index 204f1f7e6..235824d3e 100644 --- a/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php +++ b/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\ChoiceLoader; use Chill\MainBundle\Entity\PostalCode; diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php index 252d7d43f..c3c4d3027 100644 --- a/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php +++ b/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\DataMapper; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php index 7039fe9a6..ca4d74b21 100644 --- a/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php +++ b/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\DataMapper; use Chill\MainBundle\Entity\Scope; diff --git a/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php b/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php index 2c8c5d348..c2812d200 100644 --- a/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php +++ b/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Event; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Bundle/ChillMainBundle/Form/LocationFormType.php b/src/Bundle/ChillMainBundle/Form/LocationFormType.php index 0ec0f0202..e93ccc5d8 100644 --- a/src/Bundle/ChillMainBundle/Form/LocationFormType.php +++ b/src/Bundle/ChillMainBundle/Form/LocationFormType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Entity\LocationType as EntityLocationType; diff --git a/src/Bundle/ChillMainBundle/Form/LocationTypeType.php b/src/Bundle/ChillMainBundle/Form/LocationTypeType.php index 41372b48e..c41454e65 100644 --- a/src/Bundle/ChillMainBundle/Form/LocationTypeType.php +++ b/src/Bundle/ChillMainBundle/Form/LocationTypeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Entity\LocationType; diff --git a/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php b/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php index 20a183055..f7cae97ee 100644 --- a/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php +++ b/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Form\Utils\PermissionsGroupFlagProvider; diff --git a/src/Bundle/ChillMainBundle/Form/ScopeType.php b/src/Bundle/ChillMainBundle/Form/ScopeType.php index 9733f918f..6c9a0937d 100644 --- a/src/Bundle/ChillMainBundle/Form/ScopeType.php +++ b/src/Bundle/ChillMainBundle/Form/ScopeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/AddressType.php b/src/Bundle/ChillMainBundle/Form/Type/AddressType.php index 80bde17fd..b50cf14fc 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/AddressType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/AddressType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php b/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php index d4f82d437..1624e24f7 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php +++ b/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php index a50a66340..48c9a1b98 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php index d1699b9d3..38c60cfa9 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php index 7679b5f72..0b2673e51 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php index 9cca05aa5..723c782b0 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php index e05b6bc96..4886cd099 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php index ebcd219f2..96883a4e9 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php index e87256389..0e8360417 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Scope; @@ -74,7 +83,7 @@ class ComposedRoleScopeType extends AbstractType 'choices' => array_combine(array_values($values), array_keys($values)), 'placeholder' => 'Choose amongst roles', 'choice_attr' => static function ($role) use ($rolesWithoutScopes) { - if (in_array($role, $rolesWithoutScopes)) { + if (in_array($role, $rolesWithoutScopes, true)) { return ['data-has-scope' => '0']; } diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php index 32b4890a1..f6948d57c 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\DataTransformer; use Chill\MainBundle\Repository\AddressRepository; diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php index 0dfe5eb34..359e25f15 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\DataTransformer; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php index ca5bfafef..652ccabcf 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\DataTransformer; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php index 844754a98..3b7adf6cb 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\DataTransformer; use Doctrine\ORM\EntityManagerInterface; diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php index 32957afc4..ec313a52c 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\DataTransformer; use Chill\MainBundle\Entity\Scope; @@ -25,7 +34,7 @@ class ScopeTransformer implements DataTransformerInterface public function reverseTransform($id) { - if (null == $id) { + if (null === $id) { return null; } diff --git a/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php b/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php index 0c81c9084..ebe3c5268 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Form\Type\DataTransformer\DateIntervalTransformer; @@ -89,7 +98,7 @@ class DateIntervalType extends AbstractType $diff = array_diff(array_values($values), ['D', 'W', 'M', 'Y']); - if (count($diff) == 0) { + if (count($diff) === 0) { return true; } diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php index b0ff4d51c..91db53344 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Export; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php index b84e85892..0f5d3eeb0 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Export; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php index 1dbfccf59..9079309e7 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Export; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php index 9c0a91fec..b22458d01 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Export; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index 08fdc479a..8d54749c4 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Export; use Chill\MainBundle\Center\GroupingCenterInterface; @@ -136,7 +145,7 @@ class PickCenterType extends AbstractType foreach ($gc->getGroups() as $group) { foreach ($gc->getCentersForGroup($group) as $center) { - if (in_array($center, $reachablesCenters)) { + if (in_array($center, $reachablesCenters, true)) { $result[$group] = $group; } } diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php index 9f6374109..5c547e09b 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Export; use Chill\MainBundle\Export\ExportManager; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php index 184dbe483..89a7b442a 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type\Listing; use Chill\MainBundle\Templating\Listing\FilterOrderHelper; diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php b/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php index 686fc83da..95fb59c3f 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php index c82f50f0f..b1eb05415 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php b/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php index 499410c1a..483cd955b 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\PostalCode; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php index 4344dd52b..12892504a 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php index bd02fbd3f..e733e498e 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php index 59f6ab060..e8e352866 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Form\Type\DataTransformer\ObjectToIdTransformer; @@ -64,7 +73,7 @@ class Select2CountryType extends AbstractType foreach ($preferredCountries as $pc) { foreach ($countries as $c) { - if ($c->getCountryCode() == $pc) { + if ($c->getCountryCode() === $pc) { $preferredChoices[$c->getId()] = $this->translatableStringHelper->localize($c->getName()); } } diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php index 9392b2a8c..235a66e03 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Symfony\Bridge\Doctrine\Form\Type\EntityType; diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php index be8df20fe..e9ee006a6 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Form\Type\DataTransformer\MultipleObjectsToIdTransformer; diff --git a/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php b/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php index 711c2acf0..a90aed08b 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; /* @@ -39,7 +48,8 @@ class TranslatableStringFormType extends AbstractType TextType::class, ['required' => (in_array( $lang, - $this->frameworkTranslatorFallback + $this->frameworkTranslatorFallback, + true ))] ); } diff --git a/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php b/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php index e4d5422c1..4846002e8 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Scope; diff --git a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php index a6bc6ef8a..b7cdd4b32 100644 --- a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Entity\Location; diff --git a/src/Bundle/ChillMainBundle/Form/UserJobType.php b/src/Bundle/ChillMainBundle/Form/UserJobType.php index 3938ef731..c8fbbccd5 100644 --- a/src/Bundle/ChillMainBundle/Form/UserJobType.php +++ b/src/Bundle/ChillMainBundle/Form/UserJobType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillMainBundle/Form/UserPasswordType.php b/src/Bundle/ChillMainBundle/Form/UserPasswordType.php index 3a88d5d6b..c64c851ba 100644 --- a/src/Bundle/ChillMainBundle/Form/UserPasswordType.php +++ b/src/Bundle/ChillMainBundle/Form/UserPasswordType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Psr\Log\LoggerInterface; diff --git a/src/Bundle/ChillMainBundle/Form/UserType.php b/src/Bundle/ChillMainBundle/Form/UserType.php index 72692ab49..b9048f601 100644 --- a/src/Bundle/ChillMainBundle/Form/UserType.php +++ b/src/Bundle/ChillMainBundle/Form/UserType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Form/Utils/PermissionsGroupFlagProvider.php b/src/Bundle/ChillMainBundle/Form/Utils/PermissionsGroupFlagProvider.php index 0f7bb23b9..32279adb4 100644 --- a/src/Bundle/ChillMainBundle/Form/Utils/PermissionsGroupFlagProvider.php +++ b/src/Bundle/ChillMainBundle/Form/Utils/PermissionsGroupFlagProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Utils; interface PermissionsGroupFlagProvider diff --git a/src/Bundle/ChillMainBundle/Notification/Mailer.php b/src/Bundle/ChillMainBundle/Notification/Mailer.php index 82f5ce19d..c978c5476 100644 --- a/src/Bundle/ChillMainBundle/Notification/Mailer.php +++ b/src/Bundle/ChillMainBundle/Notification/Mailer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Notification; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php b/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php index 1a8c68ca2..71440c62d 100644 --- a/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php +++ b/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Notification; use Chill\ActivityBundle\Notification\ActivityNotificationRenderer; diff --git a/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php b/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php index b94a75645..8a89877c4 100644 --- a/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php +++ b/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; use Twig\Environment; diff --git a/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php b/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php index 6ea40fc67..f66c61d09 100644 --- a/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php +++ b/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; use Twig\Environment; diff --git a/src/Bundle/ChillMainBundle/Pagination/Page.php b/src/Bundle/ChillMainBundle/Pagination/Page.php index 5bac58327..508fec359 100644 --- a/src/Bundle/ChillMainBundle/Pagination/Page.php +++ b/src/Bundle/ChillMainBundle/Pagination/Page.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; diff --git a/src/Bundle/ChillMainBundle/Pagination/PageInterface.php b/src/Bundle/ChillMainBundle/Pagination/PageInterface.php index ea6b841a7..33fc68977 100644 --- a/src/Bundle/ChillMainBundle/Pagination/PageInterface.php +++ b/src/Bundle/ChillMainBundle/Pagination/PageInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; /** diff --git a/src/Bundle/ChillMainBundle/Pagination/Paginator.php b/src/Bundle/ChillMainBundle/Pagination/Paginator.php index d0342a7d5..4820d439d 100644 --- a/src/Bundle/ChillMainBundle/Pagination/Paginator.php +++ b/src/Bundle/ChillMainBundle/Pagination/Paginator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; use RuntimeException; @@ -113,7 +122,7 @@ class Paginator implements PaginatorInterface ++$nb; } - return 0 == $nb ? 1 : (int) $nb; + return 0 === $nb ? 1 : (int) $nb; } /** diff --git a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php index f453ba7e8..1ea9e4e19 100644 --- a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php +++ b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/src/Bundle/ChillMainBundle/Pagination/PaginatorInterface.php b/src/Bundle/ChillMainBundle/Pagination/PaginatorInterface.php index 010831a62..2171ae071 100644 --- a/src/Bundle/ChillMainBundle/Pagination/PaginatorInterface.php +++ b/src/Bundle/ChillMainBundle/Pagination/PaginatorInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Pagination; use Countable; diff --git a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php index f3faa2bec..491d3b316 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Phonenumber; use GuzzleHttp\Client; @@ -108,7 +117,7 @@ class PhonenumberHelper return false; } - return in_array($validation, ['landline', 'voip', 'mobile']); + return in_array($validation, ['landline', 'voip', 'mobile'], true); } /** @@ -129,7 +138,7 @@ class PhonenumberHelper return true; } - return in_array($validation, ['landline', 'voip']); + return in_array($validation, ['landline', 'voip'], true); } /** diff --git a/src/Bundle/ChillMainBundle/Phonenumber/Templating.php b/src/Bundle/ChillMainBundle/Phonenumber/Templating.php index b21ca50db..34cb181eb 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/Templating.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/Templating.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Phonenumber; use Twig\Extension\AbstractExtension; diff --git a/src/Bundle/ChillMainBundle/Redis/ChillRedis.php b/src/Bundle/ChillMainBundle/Redis/ChillRedis.php index ce8a829ad..2a61e887e 100644 --- a/src/Bundle/ChillMainBundle/Redis/ChillRedis.php +++ b/src/Bundle/ChillMainBundle/Redis/ChillRedis.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Redis; use Redis; diff --git a/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php b/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php index 7ed0bece5..34e7ab57f 100644 --- a/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php +++ b/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Redis; use RuntimeException; diff --git a/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php b/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php index 9e3f8928a..ae2e7de34 100644 --- a/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Civility; diff --git a/src/Bundle/ChillMainBundle/Repository/LocationRepository.php b/src/Bundle/ChillMainBundle/Repository/LocationRepository.php index 44484c91c..dd0d50090 100644 --- a/src/Bundle/ChillMainBundle/Repository/LocationRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/LocationRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Location; diff --git a/src/Bundle/ChillMainBundle/Repository/LocationTypeRepository.php b/src/Bundle/ChillMainBundle/Repository/LocationTypeRepository.php index be47fe74c..9e495bd1e 100644 --- a/src/Bundle/ChillMainBundle/Repository/LocationTypeRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/LocationTypeRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\LocationType; diff --git a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php index e9aeed681..55875ceb9 100644 --- a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Notification; diff --git a/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php b/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php index 9eb8c859d..17127c498 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepositoryInterface.php index d55797fd5..4a0baf106 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php b/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php index 0e012ad2c..f80faa13d 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\UserJob; diff --git a/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php b/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php index 1e2499c40..d374dd070 100644 --- a/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php +++ b/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; diff --git a/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php b/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php index a2dfe7f92..6f199176e 100644 --- a/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php +++ b/src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + use Composer\Autoload\ClassLoader; use Doctrine\Common\Annotations\AnnotationRegistry; diff --git a/src/Bundle/ChillMainBundle/Routing/LocalMenuBuilderInterface.php b/src/Bundle/ChillMainBundle/Routing/LocalMenuBuilderInterface.php index c26b13586..cabc36e65 100644 --- a/src/Bundle/ChillMainBundle/Routing/LocalMenuBuilderInterface.php +++ b/src/Bundle/ChillMainBundle/Routing/LocalMenuBuilderInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing; use Knp\Menu\MenuItem; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php index b76fbe4f2..2a4f1653a 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing\MenuBuilder; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php index a304275d3..22da369c4 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing\MenuBuilder; use Knp\Menu\MenuItem; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php index 116aa0498..391d62079 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing\MenuBuilder; use Knp\Menu\MenuItem; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php index b1d5abcfd..5ff103100 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing\MenuBuilder; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php index bdff818ef..769d452ad 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing\MenuBuilder; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php index 536d5b555..6489f86ed 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Routing; use Symfony\Component\DependencyInjection\ContainerAwareInterface; diff --git a/src/Bundle/ChillMainBundle/Search/AbstractSearch.php b/src/Bundle/ChillMainBundle/Search/AbstractSearch.php index 5b7d6296d..e1265185d 100644 --- a/src/Bundle/ChillMainBundle/Search/AbstractSearch.php +++ b/src/Bundle/ChillMainBundle/Search/AbstractSearch.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use DateTime; diff --git a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php index 672532763..204cd481b 100644 --- a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php +++ b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search\Entity; use Chill\MainBundle\Repository\UserRepository; @@ -60,6 +69,6 @@ class SearchUserApiProvider implements SearchApiInterface public function supportsTypes(string $pattern, array $types, array $parameters): bool { - return in_array('user', $types); + return in_array('user', $types, true); } } diff --git a/src/Bundle/ChillMainBundle/Search/HasAdvancedSearchFormInterface.php b/src/Bundle/ChillMainBundle/Search/HasAdvancedSearchFormInterface.php index a06d28b48..6b0cc0828 100644 --- a/src/Bundle/ChillMainBundle/Search/HasAdvancedSearchFormInterface.php +++ b/src/Bundle/ChillMainBundle/Search/HasAdvancedSearchFormInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Bundle/ChillMainBundle/Search/Model/Result.php b/src/Bundle/ChillMainBundle/Search/Model/Result.php index ca6960fc5..e4057322d 100644 --- a/src/Bundle/ChillMainBundle/Search/Model/Result.php +++ b/src/Bundle/ChillMainBundle/Search/Model/Result.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search\Model; class Result diff --git a/src/Bundle/ChillMainBundle/Search/ParsingException.php b/src/Bundle/ChillMainBundle/Search/ParsingException.php index 29533d85f..db8ba0404 100644 --- a/src/Bundle/ChillMainBundle/Search/ParsingException.php +++ b/src/Bundle/ChillMainBundle/Search/ParsingException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use Exception; diff --git a/src/Bundle/ChillMainBundle/Search/SearchApiInterface.php b/src/Bundle/ChillMainBundle/Search/SearchApiInterface.php index 0c0e42ac3..8ba6bd31d 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApiInterface.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApiInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; interface SearchApiInterface diff --git a/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php b/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php index b7e139c1c..15df80ea9 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use RuntimeException; diff --git a/src/Bundle/ChillMainBundle/Search/SearchApiQuery.php b/src/Bundle/ChillMainBundle/Search/SearchApiQuery.php index e30d4d587..1c7098ec0 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApiQuery.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApiQuery.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use function array_push; diff --git a/src/Bundle/ChillMainBundle/Search/SearchInterface.php b/src/Bundle/ChillMainBundle/Search/SearchInterface.php index 6df5cbae7..74537d151 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchInterface.php +++ b/src/Bundle/ChillMainBundle/Search/SearchInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; /** diff --git a/src/Bundle/ChillMainBundle/Search/SearchProvider.php b/src/Bundle/ChillMainBundle/Search/SearchProvider.php index c4c62e93e..aae86488c 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchProvider.php +++ b/src/Bundle/ChillMainBundle/Search/SearchProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use function array_key_exists; @@ -89,7 +98,7 @@ class SearchProvider { //sort the array uasort($this->searchServices, static function (SearchInterface $a, SearchInterface $b) { - if ($a->getOrder() == $b->getOrder()) { + if ($a->getOrder() === $b->getOrder()) { return 0; } @@ -122,7 +131,7 @@ class SearchProvider { //sort the array uasort($this->hasAdvancedFormSearchServices, static function (SearchInterface $a, SearchInterface $b) { - if ($a->getOrder() == $b->getOrder()) { + if ($a->getOrder() === $b->getOrder()) { return 0; } diff --git a/src/Bundle/ChillMainBundle/Search/UnknowSearchDomainException.php b/src/Bundle/ChillMainBundle/Search/UnknowSearchDomainException.php index a54ca8e1c..8abb2dde2 100644 --- a/src/Bundle/ChillMainBundle/Search/UnknowSearchDomainException.php +++ b/src/Bundle/ChillMainBundle/Search/UnknowSearchDomainException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use Exception; diff --git a/src/Bundle/ChillMainBundle/Search/UnknowSearchNameException.php b/src/Bundle/ChillMainBundle/Search/UnknowSearchNameException.php index 8b7864a77..eeabc2ef0 100644 --- a/src/Bundle/ChillMainBundle/Search/UnknowSearchNameException.php +++ b/src/Bundle/ChillMainBundle/Search/UnknowSearchNameException.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search; use Exception; diff --git a/src/Bundle/ChillMainBundle/Search/Utils/ExtractDateFromPattern.php b/src/Bundle/ChillMainBundle/Search/Utils/ExtractDateFromPattern.php index 79a61a062..6d92f0d44 100644 --- a/src/Bundle/ChillMainBundle/Search/Utils/ExtractDateFromPattern.php +++ b/src/Bundle/ChillMainBundle/Search/Utils/ExtractDateFromPattern.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search\Utils; use DateTimeImmutable; diff --git a/src/Bundle/ChillMainBundle/Search/Utils/ExtractPhonenumberFromPattern.php b/src/Bundle/ChillMainBundle/Search/Utils/ExtractPhonenumberFromPattern.php index b5b4dbabd..00ec3bab9 100644 --- a/src/Bundle/ChillMainBundle/Search/Utils/ExtractPhonenumberFromPattern.php +++ b/src/Bundle/ChillMainBundle/Search/Utils/ExtractPhonenumberFromPattern.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search\Utils; use LogicException; diff --git a/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php b/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php index 6caf12a54..14760a7cc 100644 --- a/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php +++ b/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Search\Utils; class SearchExtractionResult diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php index ac1b65f1f..2cca61e9f 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php @@ -35,8 +35,8 @@ abstract class AbstractChillVoter extends Voter implements ChillVoterInterface // @TODO: getSupportedAttributes() should be created in here and made abstract or in ChillVoterInterface. // @TODO: getSupportedClasses() should be created in here and made abstract or in ChillVoterInterface. - return in_array($attribute, $this->getSupportedAttributes($attribute)) - && in_array(get_class($subject), $this->getSupportedClasses()); + return in_array($attribute, $this->getSupportedAttributes($attribute), true) + && in_array(get_class($subject), $this->getSupportedClasses(), true); } protected function voteOnAttribute($attribute, $subject, TokenInterface $token) diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php index 44f6d90c9..de7bff9ab 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php @@ -133,7 +133,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface break; } - if ($scope->getId() == $roleScope->getScope()->getId()) { + if ($scope->getId() === $roleScope->getScope()->getId()) { $centers[] = $groupCenter->getCenter(); break; diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php index 9304dab77..928fd365a 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Authorization; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php index 2cfdc18ae..29957aee6 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Authorization; /** diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/VoterGeneratorInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/VoterGeneratorInterface.php index 1dec1d053..0fc33db97 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/VoterGeneratorInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/VoterGeneratorInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Authorization; interface VoterGeneratorInterface diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/VoterHelperFactoryInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/VoterHelperFactoryInterface.php index ea0b20286..08f519769 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/VoterHelperFactoryInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/VoterHelperFactoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Authorization; interface VoterHelperFactoryInterface diff --git a/src/Bundle/ChillMainBundle/Security/ParentRoleHelper.php b/src/Bundle/ChillMainBundle/Security/ParentRoleHelper.php index d2c84c9f6..231255b55 100644 --- a/src/Bundle/ChillMainBundle/Security/ParentRoleHelper.php +++ b/src/Bundle/ChillMainBundle/Security/ParentRoleHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; @@ -55,7 +64,7 @@ class ParentRoleHelper foreach ($roles as $r) { $childRoles = $this->roleHierarchy->getReachableRoleNames([$r]); - if (in_array($role, $childRoles)) { + if (in_array($role, $childRoles, true)) { $parentRoles[] = $r; } } @@ -76,6 +85,6 @@ class ParentRoleHelper $reachableRoles = $this->roleHierarchy ->getReachableRoleNames([$parentRole]); - return in_array($childRole, $reachableRoles); + return in_array($childRole, $reachableRoles, true); } } diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php index 7f5f44777..dfe3ff7e7 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\PasswordRecover; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php index eec173582..cc2e7ab53 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\PasswordRecover; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php index 7e6b50ad0..ef63cf79e 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\PasswordRecover; use Chill\MainBundle\Redis\ChillRedis; diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverVoter.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverVoter.php index 4223ff1ca..d3001afb5 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverVoter.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\PasswordRecover; use Chill\MainBundle\Entity\User; @@ -44,7 +53,7 @@ class PasswordRecoverVoter extends Voter protected function supports($attribute, $subject): bool { - if (!in_array($attribute, $this->supported)) { + if (!in_array($attribute, $this->supported, true)) { return false; } diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php index 4baa682c7..6d7589d91 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\PasswordRecover; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/TokenManager.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/TokenManager.php index 9a60c1da0..4fa526c10 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/TokenManager.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/TokenManager.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\PasswordRecover; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverInterface.php b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverInterface.php index a6bdbe001..a4c2c1ced 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Resolver; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/DefaultCenterResolver.php b/src/Bundle/ChillMainBundle/Security/Resolver/DefaultCenterResolver.php index 40c15bde7..2622feb78 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/DefaultCenterResolver.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/DefaultCenterResolver.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Resolver; use Chill\MainBundle\Entity\HasCenterInterface; diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/DefaultScopeResolver.php b/src/Bundle/ChillMainBundle/Security/Resolver/DefaultScopeResolver.php index e4b9021f4..4c8e3e1d6 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/DefaultScopeResolver.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/DefaultScopeResolver.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Resolver; use Chill\MainBundle\Entity\HasScopeInterface; diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php b/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php index 6bd4cddc2..5a58e54c2 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Resolver; use Twig\TwigFilter; diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php index 96321de6a..aacab4b18 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Resolver; use Chill\MainBundle\Entity\Scope; diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverInterface.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverInterface.php index 1e4319ad9..b59c27a33 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security\Resolver; use Chill\MainBundle\Entity\Scope; diff --git a/src/Bundle/ChillMainBundle/Security/RoleProvider.php b/src/Bundle/ChillMainBundle/Security/RoleProvider.php index cceabd9f7..a21fb2ec5 100644 --- a/src/Bundle/ChillMainBundle/Security/RoleProvider.php +++ b/src/Bundle/ChillMainBundle/Security/RoleProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Security; use function array_fill_keys; diff --git a/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php b/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php index 420520b66..ab86648b1 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php +++ b/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Model; use Chill\MainBundle\Pagination\PaginatorInterface; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php index 285123290..6d7aa42bc 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php index d1aff5c4a..98e069b76 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use Chill\MainBundle\Serializer\Model\Collection; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php index de68e8c50..1a6fd79c1 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use DateTime; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php index 77043855a..b15470771 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use LogicException; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php index f00388348..607a47b10 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use Doctrine\ORM\EntityManagerInterface; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php index fff38be5d..5ab5b8929 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use Chill\MainBundle\Doctrine\Model\Point; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php index aeb61ded6..22a9cfb13 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Serializer\Normalizer; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php b/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php index ba4fd4687..e007bd109 100644 --- a/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php +++ b/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating; use Twig\Extension\AbstractExtension; diff --git a/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php b/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php index c0da5c6eb..d4da847c5 100644 --- a/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php +++ b/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating; use Parsedown; diff --git a/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php b/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php index 9b9e5815a..5c6eae005 100644 --- a/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating; use DateTimeInterface; diff --git a/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php b/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php index fa65369c4..178b3e8e3 100644 --- a/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating; use Symfony\Bridge\Twig\Extension\RoutingExtension; diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/AbstractChillEntityRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/AbstractChillEntityRender.php index 1ddd272c9..3cd8a89a2 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/AbstractChillEntityRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/AbstractChillEntityRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; abstract class AbstractChillEntityRender implements ChillEntityRenderInterface diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php index 2e3a80219..22831bef6 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRender.php index fc543ab3f..b13ce4323 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; /** diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php index 2d7e3bec9..d74c0b929 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; use Twig\Extension\AbstractExtension; diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderInterface.php b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderInterface.php index d570ddd22..c533b0351 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderInterface.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; /** diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php index 5e5f24eb3..d4f8f5ed3 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable; diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/CompilerPass.php b/src/Bundle/ChillMainBundle/Templating/Entity/CompilerPass.php index 9f2af4139..c5219e011 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/CompilerPass.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/CompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php index a91b9bb69..38042746d 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Entity; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php b/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php index f5ba84198..d3e475076 100644 --- a/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php +++ b/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Events; use ArrayAccess; diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php index 4006e60e4..ede87e966 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Listing; use Chill\MainBundle\Form\Type\Listing\FilterOrderType; diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php index 9ce2c41cd..8ad35a503 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Listing; use Symfony\Component\Form\FormFactoryInterface; diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php index 72fed8ae6..5b4d4583b 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Listing; use Symfony\Component\Form\FormFactoryInterface; diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactoryInterface.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactoryInterface.php index bd90b2bd8..33258434f 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactoryInterface.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Listing; interface FilterOrderHelperFactoryInterface diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php b/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php index 8ff545b1a..d70b2f415 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Listing; use Twig\Environment; diff --git a/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php b/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php index db80c0b35..3e855af6c 100644 --- a/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php +++ b/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating; use Symfony\Component\DependencyInjection\ContainerAwareTrait; diff --git a/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php b/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php index 2440aaea2..65b980ea0 100644 --- a/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php +++ b/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\UI; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Templating/UI/NotificationCounterInterface.php b/src/Bundle/ChillMainBundle/Templating/UI/NotificationCounterInterface.php index 1ab8e86d4..211bea120 100644 --- a/src/Bundle/ChillMainBundle/Templating/UI/NotificationCounterInterface.php +++ b/src/Bundle/ChillMainBundle/Templating/UI/NotificationCounterInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\UI; use Symfony\Component\Security\Core\User\UserInterface; diff --git a/src/Bundle/ChillMainBundle/Templating/Widget/WidgetInterface.php b/src/Bundle/ChillMainBundle/Templating/Widget/WidgetInterface.php index b378a2de1..56b623ec4 100644 --- a/src/Bundle/ChillMainBundle/Templating/Widget/WidgetInterface.php +++ b/src/Bundle/ChillMainBundle/Templating/Widget/WidgetInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Widget; use Twig\Environment; diff --git a/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php b/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php index c1f275f63..1b948d57b 100644 --- a/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php +++ b/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Templating\Widget; use Chill\MainBundle\Templating\Events\DelegatedBlockRenderingEvent; diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php index d064283f8..ddac05620 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test\Export; use Doctrine\ORM\AbstractQuery; diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php index 3239bc7cb..d78628ea5 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test\Export; use Chill\MainBundle\Test\PrepareClientTrait; diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php index b6ce61a94..91665cd37 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test\Export; use Doctrine\ORM\QueryBuilder; diff --git a/src/Bundle/ChillMainBundle/Test/PrepareCenterTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareCenterTrait.php index 8c8bb96c5..8da03fa26 100644 --- a/src/Bundle/ChillMainBundle/Test/PrepareCenterTrait.php +++ b/src/Bundle/ChillMainBundle/Test/PrepareCenterTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test; /** diff --git a/src/Bundle/ChillMainBundle/Test/PrepareCircleTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareCircleTrait.php index eb9d0d7ac..5d780b51f 100644 --- a/src/Bundle/ChillMainBundle/Test/PrepareCircleTrait.php +++ b/src/Bundle/ChillMainBundle/Test/PrepareCircleTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test; /** diff --git a/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php index 799b9e617..34723ec73 100644 --- a/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php +++ b/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test; use LogicException; diff --git a/src/Bundle/ChillMainBundle/Test/PrepareScopeTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareScopeTrait.php index 7ab4f7323..65edd5301 100644 --- a/src/Bundle/ChillMainBundle/Test/PrepareScopeTrait.php +++ b/src/Bundle/ChillMainBundle/Test/PrepareScopeTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test; /** diff --git a/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php index 27af36491..c42a74a00 100644 --- a/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php +++ b/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test; use Chill\MainBundle\Entity\GroupCenter; diff --git a/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php b/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php index cf32299d6..68c4b3f69 100644 --- a/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php +++ b/src/Bundle/ChillMainBundle/Test/ProphecyTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test; /** diff --git a/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php index 1dc2fedcf..cf6b0042a 100644 --- a/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Security\Authorization; use Chill\MainBundle\Security\ParentRoleHelper; @@ -17,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class ParentRoleHelperTest extends KernelTestCase +final class ParentRoleHelperTest extends KernelTestCase { private ParentRoleHelper $parentRoleHelper; diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php index 81f46838e..1e270e302 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Controller; use Chill\MainBundle\Entity\Address; @@ -18,7 +27,7 @@ use Symfony\Bundle\FrameworkBundle\KernelBrowser; * @internal * @coversNothing */ -class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase +final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php index dd8074e4d..0cdb3fe75 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,12 +24,12 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class CenterControllerTest extends WebTestCase +final class CenterControllerTest extends WebTestCase { public function testCompleteScenario() { // Create a new client to browse the application - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php index 3f85c7d2e..3b05747a1 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -17,11 +26,11 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ExportControllerTest extends WebTestCase +final class ExportControllerTest extends WebTestCase { public function testIndex() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php index 38a9de6a0..2d6e2cedb 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -16,11 +25,11 @@ use Symfony\Component\HttpFoundation\Response; * @internal * @coversNothing */ -class LoginControllerTest extends WebTestCase +final class LoginControllerTest extends WebTestCase { public function testLogin() { - $client = static::createClient(); + $client = self::createClient(); //load login page and submit form $crawler = $client->request('GET', '/login'); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php index f267421bf..4efe242cb 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -17,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PermissionApiControllerTest extends WebTestCase +final class PermissionApiControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php index aa64a8c91..68d391815 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PermissionsGroupControllerTest extends WebTestCase +final class PermissionsGroupControllerTest extends WebTestCase { public function testEmpty() { diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php index 0c848d9ac..a8072e9b7 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,12 +24,12 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ScopeControllerTest extends WebTestCase +final class ScopeControllerTest extends WebTestCase { public function testCompleteScenario() { // Create a new client to browse the application - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php index 17ef616b0..1c594ca3e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Bundle\ChillMainBundle\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -17,7 +26,7 @@ use Symfony\Component\HttpFoundation\Request; * @internal * @coversNothing */ -class SearchApiControllerTest extends WebTestCase +final class SearchApiControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php index cda4c18e2..23ce969d3 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -17,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class SearchControllerTest extends WebTestCase +final class SearchControllerTest extends WebTestCase { public function testDomainUnknow() { @@ -90,7 +99,7 @@ class SearchControllerTest extends WebTestCase private function getAuthenticatedClient() { - return static::createClient([], [ + return self::createClient([], [ 'PHP_AUTH_USER' => 'center b_social', 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php index 333ab2e19..ef3591d80 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -19,7 +28,7 @@ use function json_decode; * @internal * @coversNothing */ -class UserApiControllerTest extends WebTestCase +final class UserApiControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php index 04adb3458..5d28e0b95 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Controller; use Chill\MainBundle\Entity\User; @@ -18,7 +27,7 @@ use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; * @internal * @coversNothing */ -class UserControllerTest extends WebTestCase +final class UserControllerTest extends WebTestCase { private $client; @@ -28,7 +37,7 @@ class UserControllerTest extends WebTestCase { self::bootKernel(); - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password', 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php index 995727151..a66f6cf22 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Doctrine\Model; use Chill\MainBundle\Doctrine\Model\Point; @@ -18,7 +27,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class PointTest extends KernelTestCase +final class PointTest extends KernelTestCase { public function testFromArrayGeoJson() { diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index b50b7262a..b1216bc9d 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Export; use Chill\MainBundle\Export\AggregatorInterface; @@ -29,7 +38,7 @@ use function count; * @internal * @coversNothing */ -class ExportManagerTest extends KernelTestCase +final class ExportManagerTest extends KernelTestCase { use \Chill\MainBundle\Test\PrepareCenterTrait; use \Chill\MainBundle\Test\PrepareScopeTrait; diff --git a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php index a6e0c98c8..693196291 100644 --- a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\GroupCenter; @@ -19,7 +28,7 @@ use Symfony\Component\Form\Test\TypeTestCase; * @internal * @coversNothing */ -class PickCenterTypeTest extends TypeTestCase +final class PickCenterTypeTest extends TypeTestCase { /** * Test that a user which can reach multiple center diff --git a/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php b/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php index 70568c8ac..f93b43a82 100644 --- a/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Pagination; use Chill\MainBundle\Pagination\Page; @@ -19,7 +28,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; * @internal * @coversNothing */ -class PageTest extends KernelTestCase +final class PageTest extends KernelTestCase { protected $paginator; diff --git a/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php b/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php index 75c34d643..f46ef17ed 100644 --- a/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Pagination; use Chill\MainBundle\Pagination\Paginator; @@ -20,7 +29,7 @@ use function count; * @internal * @coversNothing */ -class PaginatorTest extends KernelTestCase +final class PaginatorTest extends KernelTestCase { protected $paginator; diff --git a/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php b/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php index ba400dfdf..7377e17ba 100644 --- a/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Routing\Loader; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -17,14 +26,14 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class RouteLoaderTest extends KernelTestCase +final class RouteLoaderTest extends KernelTestCase { private $router; public function setUp() { - static::bootKernel(); - $this->router = static::$kernel->getContainer()->get('router'); + self::bootKernel(); + $this->router = self::$kernel->getContainer()->get('router'); } /** diff --git a/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php b/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php index a39dc0738..53952b9d4 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Search; /** @@ -15,7 +24,7 @@ namespace Chill\MainBundle\Tests\Search; * @internal * @coversNothing */ -class AbstractSearchTest extends \PHPUnit\Framework\TestCase +final class AbstractSearchTest extends \PHPUnit\Framework\TestCase { /** * @var \Chill\MainBundle\Search\AbstractSearch diff --git a/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php b/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php index 5adcb0965..a71fb36ec 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Search; use Chill\MainBundle\Search\SearchApiQuery; @@ -17,7 +26,7 @@ use function is_string; * @internal * @coversNothing */ -class SearchApiQueryTest extends TestCase +final class SearchApiQueryTest extends TestCase { public function testBuildParams() { diff --git a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php index b2b64c904..d246975f7 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Test\Search; use Chill\MainBundle\Search\SearchInterface; @@ -17,7 +26,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class SearchProviderTest extends TestCase +final class SearchProviderTest extends TestCase { /** * @var SearchProvider diff --git a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php index 2c8e895bb..21b6a36a3 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Search\Utils; use Chill\MainBundle\Search\Utils\ExtractDateFromPattern; @@ -18,7 +27,7 @@ use function array_map; * @internal * @coversNothing */ -class ExtractDateFromPatternTest extends TestCase +final class ExtractDateFromPatternTest extends TestCase { public function provideSubjects() { diff --git a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php index fedd43f5b..5194007db 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Search\Utils; use Chill\MainBundle\Search\Utils\ExtractPhonenumberFromPattern; @@ -16,7 +25,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class ExtractPhonenumberFromPatternTest extends KernelTestCase +final class ExtractPhonenumberFromPatternTest extends KernelTestCase { public function provideData() { diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php index 65c3829b6..479b4e898 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Security\Authorization; use Chill\MainBundle\Entity\Center; @@ -29,7 +38,7 @@ use function in_array; * @internal * @coversNothing */ -class AuthorizationHelperTest extends KernelTestCase +final class AuthorizationHelperTest extends KernelTestCase { use PrepareCenterTrait; use PrepareScopeTrait; @@ -38,7 +47,7 @@ class AuthorizationHelperTest extends KernelTestCase public function setUp() { - static::bootKernel(); + self::bootKernel(); } public function dataProvider_getReachableCenters() @@ -77,7 +86,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_1'), null - )), + ), true), 'center A should be available for userA, with role 1 ', ], [ @@ -86,7 +95,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_2'), null - )), + ), true), 'center A should be available for userA, with role 2 ', ], [ @@ -95,7 +104,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_2'), null - )), + ), true), 'center A should be available for userA, with role 2 ', ], [ @@ -104,7 +113,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_1'), null - )), + ), true), 'center B should NOT be available for userA, with role 1 ', ], // with scope @@ -114,7 +123,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_1'), $scopeB - )), + ), true), 'center A should be available for userA, with role 1, scopeC ', ], [ @@ -123,7 +132,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_2'), $scopeC - )), + ), true), 'center A should NOT be available for userA, with role 2, scopeA ', ], [ @@ -132,7 +141,7 @@ class AuthorizationHelperTest extends KernelTestCase $userA, new Role('CHILL_ROLE_2'), $scopeA - )), + ), true), 'center B should be available for userA, with role 2, scopeA ', ], ]; @@ -195,7 +204,7 @@ class AuthorizationHelperTest extends KernelTestCase public function testFindUsersReaching() { - $centerA = static::$kernel->getContainer() + $centerA = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository(Center::class) ->findOneByName('Center A'); @@ -254,7 +263,7 @@ class AuthorizationHelperTest extends KernelTestCase $this->assertEquals( $expectedResult, - in_array($testedScope, $reachableScopes), + in_array($testedScope, $reachableScopes, true), $message ); } @@ -577,7 +586,7 @@ class AuthorizationHelperTest extends KernelTestCase */ private function getAuthorizationHelper() { - return static::$container + return self::$container ->get('chill.main.security.authorization.helper'); } } diff --git a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php index 7c6ecd565..58cc68113 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\PasswordRecover; use Chill\MainBundle\Entity\User; @@ -19,7 +28,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class TokenManagerTest extends KernelTestCase +final class TokenManagerTest extends KernelTestCase { protected $tokenManager; diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php index 2e020ab9a..80b01a170 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php @@ -20,7 +20,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class CenterResolverDispatcherTest extends KernelTestCase +final class CenterResolverDispatcherTest extends KernelTestCase { private CenterResolverDispatcherInterface $dispatcher; diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php index d7063815a..54fb76e3c 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Security\Resolver; use Chill\MainBundle\Entity\HasScopeInterface; @@ -19,7 +28,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class DefaultScopeResolverTest extends TestCase +final class DefaultScopeResolverTest extends TestCase { private DefaultScopeResolver $scopeResolver; diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php index d1b721975..8e503d4b9 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Security\Resolver; use Chill\MainBundle\Entity\HasScopeInterface; @@ -20,7 +29,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class ScopeResolverDispatcherTest extends TestCase +final class ScopeResolverDispatcherTest extends TestCase { private ScopeResolverDispatcher $scopeResolverDispatcher; diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php index 4fa58b782..c008e5c5d 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Serializer\Normalizer; use Chill\MainBundle\Serializer\Normalizer\DateNormalizer; @@ -24,7 +33,7 @@ use Symfony\Component\HttpFoundation\RequestStack; * @internal * @coversNothing */ -class DateNormalizerTest extends KernelTestCase +final class DateNormalizerTest extends KernelTestCase { private Prophet $prophet; diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php index 57b4d44b7..47de032b2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Serializer\Normalizer; use Chill\MainBundle\Entity\User; @@ -19,7 +28,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; * @internal * @coversNothing */ -class DoctrineExistingEntityNormalizerTest extends KernelTestCase +final class DoctrineExistingEntityNormalizerTest extends KernelTestCase { protected DoctrineExistingEntityNormalizer $normalizer; diff --git a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php index d639224c6..01ed5d8a7 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Services; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -18,7 +27,7 @@ use Symfony\Component\Routing\RouteCollection; * @internal * @coversNothing */ -class MenuComposerTest extends KernelTestCase +final class MenuComposerTest extends KernelTestCase { /** * @var \Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader; @@ -33,7 +42,7 @@ class MenuComposerTest extends KernelTestCase public function setUp() { self::bootKernel(['environment' => 'test']); - $this->menuComposer = static::$container + $this->menuComposer = self::$container ->get('chill.main.menu_composer'); } diff --git a/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php b/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php index 2ba1d03ec..0c5b44ae8 100644 --- a/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Tests\Templating; use Chill\MainBundle\Templating\ChillMarkdownRenderExtension; @@ -20,7 +29,7 @@ use PHPUnit\Framework\TestCase; * is safe. * @coversNothing */ -class ChillMarkdownRenderExtensionTest extends TestCase +final class ChillMarkdownRenderExtensionTest extends TestCase { private const SIMPLE_HTML = <<<'HTML'