From 47c5855a21db58243fecacf02ddefc6b07101d44 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 30 Nov 2021 13:33:18 +0100 Subject: [PATCH] cs: Switch to a stricter way of coding - this might break in a lot of places. --- .php_cs.dist.php | 8 +-- .../_static/code/exports/BirthdateFilter.php | 9 +++ .../_static/code/exports/CountPerson.php | 9 +++ .../source/development/pagination/example.php | 9 +++ .../controller-secured-for-person.php | 9 +++ .../widgets/ChillMainConfiguration.php | 9 +++ .../widgets/ChillMainExtension.php | 9 +++ ...ChillPersonAddAPersonListWidgetFactory.php | 9 +++ .../widgets/ChillPersonAddAPersonWidget.php | 9 +++ .../widgets/ChillPersonExtension.php | 9 +++ .../ChillActivityBundle.php | 9 +++ .../ActivityReasonCategoryController.php | 9 +++ .../Controller/ActivityReasonController.php | 9 +++ .../AdminActivityPresenceController.php | 9 +++ .../AdminActivityTypeCategoryController.php | 9 +++ .../AdminActivityTypeController.php | 9 +++ .../Controller/AdminController.php | 9 +++ .../DataFixtures/ORM/LoadActivity.php | 9 +++ .../ORM/LoadActivityNotifications.php | 9 +++ .../DataFixtures/ORM/LoadActivityReason.php | 9 +++ .../ORM/LoadActivityReasonCategory.php | 9 +++ .../DataFixtures/ORM/LoadActivityType.php | 9 +++ .../ORM/LoadActivityTypeCategory.php | 9 +++ .../DataFixtures/ORM/LoadActivitytACL.php | 11 +++- .../ChillActivityExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../ChillActivityBundle/Entity/Activity.php | 9 +++ .../Entity/ActivityPresence.php | 9 +++ .../Entity/ActivityReason.php | 9 +++ .../Entity/ActivityReasonCategory.php | 9 +++ .../Entity/ActivityType.php | 9 +++ .../Aggregator/ActivityUserAggregator.php | 9 +++ .../Export/Export/ListActivity.php | 2 +- .../Form/ActivityPresenceType.php | 9 +++ .../Form/ActivityReasonCategoryType.php | 9 +++ .../Form/ActivityReasonType.php | 9 +++ .../ChillActivityBundle/Form/ActivityType.php | 11 +++- .../Form/ActivityTypeCategoryType.php | 9 +++ .../Form/ActivityTypeType.php | 9 +++ .../Form/Type/ActivityFieldPresence.php | 9 +++ .../Form/Type/TranslatableActivityReason.php | 9 +++ .../TranslatableActivityReasonCategory.php | 9 +++ .../Menu/AccompanyingCourseMenuBuilder.php | 9 +++ .../Menu/AdminMenuBuilder.php | 2 +- .../Menu/PersonMenuBuilder.php | 9 +++ .../ActivityNotificationRenderer.php | 11 +++- .../Repository/ActivityACLAwareRepository.php | 2 +- .../ActivityACLAwareRepositoryInterface.php | 9 +++ .../test/Fixtures/App/app/AppKernel.php | 9 +++ .../test/Fixtures/App/app/autoload.php | 9 +++ .../cache/dev/appDevDebugProjectContainer.php | 9 +++ .../test/Fixtures/App/web/app_dev.php | 11 +++- .../Authorization/ActivityStatsVoter.php | 11 +++- .../Entity/ActivityReasonRender.php | 9 +++ .../Test/PrepareActivityTrait.php | 9 +++ .../Controller/ActivityControllerTest.php | 39 ++++++++----- .../ActivityReasonCategoryControllerTest.php | 11 +++- .../ActivityReasonControllerTest.php | 11 +++- .../Controller/ActivityTypeControllerTest.php | 11 +++- .../ActivityReasonAggregatorTest.php | 21 +++++-- .../Aggregator/ActivityTypeAggregatorTest.php | 21 +++++-- .../Aggregator/ActivityUserAggregatorTest.php | 21 +++++-- .../Tests/Export/Export/CountActivityTest.php | 13 ++++- .../Tests/Export/Export/ListActivityTest.php | 13 ++++- .../Export/StatActivityDurationSumTest.php | 13 ++++- .../Filter/ActivityReasonFilterTest.php | 27 ++++++--- ...sonHavingActivityBetweenDateFilterTest.php | 27 ++++++--- .../Tests/Form/ActivityTypeTest.php | 11 +++- .../Type/TranslatableActivityReasonTest.php | 11 +++- .../Type/TranslatableActivityTypeTest.php | 11 +++- .../Authorization/ActivityVoterTest.php | 15 ++++- .../Tests/Timeline/TimelineProviderTest.php | 11 +++- .../Timeline/TimelineActivityProvider.php | 4 +- .../Constraints/ActivityValidity.php | 9 +++ .../Constraints/ActivityValidityValidator.php | 9 +++ .../migrations/Version20150701091248.php | 13 ++++- .../migrations/Version20150702093317.php | 13 ++++- .../migrations/Version20150704091347.php | 13 ++++- .../migrations/Version20160222103457.php | 13 ++++- .../migrations/Version20161114085659.php | 9 +++ .../AsideActivityCategoryController.php | 9 +++ .../DataFixtures/ORM/LoadAsideActivity.php | 9 +++ .../ORM/LoadAsideActivityCategory.php | 9 +++ .../src/DependencyInjection/Configuration.php | 9 +++ .../src/Form/AsideActivityFormType.php | 11 +++- .../src/Menu/AdminMenuBuilder.php | 11 +++- .../src/Menu/SectionMenuBuilder.php | 9 +++ .../src/Menu/UserMenuBuilder.php | 9 +++ .../src/Templating/Entity/CategoryRender.php | 9 +++ .../AsideActivityControllerTest.php | 11 +++- .../Calculator/CalculatorInterface.php | 9 +++ .../Calculator/CalculatorManager.php | 9 +++ .../Calculator/CalculatorResult.php | 9 +++ .../ChillAMLIBudgetBundle.php | 9 +++ .../Config/ConfigRepository.php | 9 +++ .../Controller/AbstractElementController.php | 9 +++ .../Controller/ChargeController.php | 9 +++ .../Controller/ElementController.php | 9 +++ .../Controller/ResourceController.php | 9 +++ .../ChillAMLIBudgetExtension.php | 9 +++ .../Compiler/CalculatorCompilerPass.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../Entity/AbstractElement.php | 11 +++- .../ChillBudgetBundle/Entity/Charge.php | 9 +++ .../ChillBudgetBundle/Entity/Resource.php | 9 +++ .../Menu/UserMenuBuilder.php | 9 +++ .../Repository/ChargeRepository.php | 9 +++ .../Repository/ResourceRepository.php | 9 +++ .../Authorization/BudgetElementVoter.php | 13 ++++- .../ChillBudgetBundle/Templating/Twig.php | 9 +++ .../Controller/ElementControllerTest.php | 15 ++++- .../ChillCalendarBundle.php | 9 +++ .../Controller/CalendarAPIController.php | 9 +++ .../Controller/CalendarRangeAPIController.php | 9 +++ .../DataFixtures/ORM/LoadCancelReason.php | 9 +++ .../DataFixtures/ORM/LoadInvite.php | 9 +++ .../ChillCalendarExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../ChillCalendarBundle/Entity/Calendar.php | 11 +++- .../Entity/CalendarRange.php | 9 +++ .../Entity/CancelReason.php | 9 +++ .../ChillCalendarBundle/Entity/Invite.php | 9 +++ .../Event/ListenToActivityCreate.php | 9 +++ .../ChillCalendarBundle/Form/CalendarType.php | 9 +++ .../Menu/AccompanyingCourseMenuBuilder.php | 9 +++ .../Menu/UserMenuBuilder.php | 9 +++ .../Repository/CalendarRangeRepository.php | 9 +++ .../Repository/CalendarRepository.php | 9 +++ .../Repository/CancelReasonRepository.php | 9 +++ .../Repository/InviteRepository.php | 9 +++ .../Controller/CalendarControllerTest.php | 19 +++++-- .../ChillCustomFieldsBundle.php | 9 +++ .../Command/CreateFieldsOnGroupCommand.php | 11 +++- .../Controller/AdminController.php | 9 +++ .../Controller/CustomFieldController.php | 9 +++ .../CustomFieldsGroupController.php | 13 ++++- .../CustomFields/AbstractCustomField.php | 9 +++ .../CustomFields/CustomFieldChoice.php | 19 +++++-- .../CustomFields/CustomFieldDate.php | 9 +++ .../CustomFields/CustomFieldInterface.php | 9 +++ .../CustomFields/CustomFieldNumber.php | 9 +++ .../CustomFields/CustomFieldText.php | 11 +++- .../CustomFields/CustomFieldTitle.php | 9 +++ .../DataFixtures/ORM/LoadOption.php | 9 +++ .../ChillCustomFieldsExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../CustomFieldCompilerPass.php | 9 +++ .../Entity/CustomField.php | 9 +++ .../Entity/CustomFieldLongChoice/Option.php | 9 +++ .../Entity/CustomFieldsDefaultGroup.php | 9 +++ .../Entity/CustomFieldsGroup.php | 9 +++ .../OptionRepository.php | 9 +++ .../Form/CustomFieldType.php | 9 +++ .../Form/CustomFieldsGroupType.php | 9 +++ .../CustomFieldDataTransformer.php | 9 +++ .../CustomFieldsGroupToIdTransformer.php | 9 +++ .../Form/Extension/PostTextExtension.php | 9 +++ .../Extension/PostTextIntegerExtension.php | 9 +++ .../Extension/PostTextNumberExtension.php | 9 +++ .../Form/Type/ChoiceWithOtherType.php | 9 +++ .../Form/Type/ChoicesListType.php | 9 +++ .../Form/Type/ChoicesType.php | 9 +++ .../Form/Type/CustomFieldType.php | 9 +++ .../Form/Type/CustomFieldsTitleType.php | 9 +++ .../Form/Type/LinkedCustomFieldsType.php | 9 +++ .../test/Fixtures/App/app/AppKernel.php | 9 +++ .../test/Fixtures/App/app/autoload.php | 9 +++ .../test/Fixtures/App/web/app_dev.php | 11 +++- .../Service/CustomFieldProvider.php | 9 +++ .../Service/CustomFieldsHelper.php | 9 +++ .../Service/CustomFieldsHelperException.php | 9 +++ .../Twig/CustomFieldRenderingTwig.php | 9 +++ .../Twig/CustomFieldsGroupRenderingTwig.php | 9 +++ .../ConfigCustomizablesEntitiesTest.php | 15 ++++- .../CustomFieldControllerTest_TODO.php | 11 +++- .../CustomFieldsGroupControllerTest.php | 13 ++++- .../Tests/CustomFieldTestHelper.php | 9 +++ .../CustomFields/CustomFieldsChoiceTest.php | 15 ++++- .../CustomFields/CustomFieldsNumberTest.php | 15 ++++- .../CustomFields/CustomFieldsTextTest.php | 17 ++++-- .../PostTextIntegerExtensionTest.php | 11 +++- .../Extension/PostTextNumberExtensionTest.php | 11 +++- .../Tests/Routing/RoutingLoaderTest.php | 13 ++++- .../Tests/Service/CustomFieldsHelperTest.php | 11 +++- .../Twig/CustomFieldRenderingTwigTest.php | 11 +++- .../CustomFieldsGroupRenderingTwigTest.php | 11 +++- .../Tests/bootstrap.php | 8 +++ .../migrations/Version20141128195430.php | 9 +++ .../migrations/Version20150224164531.php | 9 +++ .../migrations/Version20151210155904.php | 13 ++++- .../migrations/Version20151210205610.php | 13 ++++- .../ChillDocGeneratorBundle.php | 9 +++ .../Context/DocGeneratorContextInterface.php | 9 +++ .../HouseholdMemberSelectionContext.php | 17 ++++-- .../AdminDocGeneratorTemplateController.php | 9 +++ .../Controller/DocGeneratorController.php | 9 +++ .../DocGeneratorTemplateController.php | 13 ++++- .../ORM/LoadDocGeneratorTemplate.php | 9 +++ .../ChillDocGeneratorExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../Entity/DocGeneratorTemplate.php | 9 +++ .../Form/DocGeneratorTemplateType.php | 9 +++ .../Serializer/Encoder/DocGenEncoder.php | 9 +++ .../Helper/NormalizeNullValueHelper.php | 9 +++ .../Normalizer/DocGenObjectNormalizer.php | 9 +++ .../Serializer/Encoder/DocGenEncoderTest.php | 11 +++- .../Normalizer/DocGenObjectNormalizerTest.php | 11 +++- .../ChillDocStoreBundle.php | 9 +++ .../Controller/AdminController.php | 9 +++ .../DocumentAccompanyingCourseController.php | 9 +++ .../Controller/DocumentPersonController.php | 9 +++ .../DataFixtures/ORM/LoadDocumentACL.php | 9 +++ .../DataFixtures/ORM/LoadDocumentCategory.php | 9 +++ .../ChillDocStoreExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../Entity/AccompanyingCourseDocument.php | 9 +++ .../ChillDocStoreBundle/Entity/Document.php | 9 +++ .../Entity/DocumentCategory.php | 9 +++ .../Entity/PersonDocument.php | 9 +++ .../DocumentCategoryRepository.php | 9 +++ .../Form/AccompanyingCourseDocumentType.php | 9 +++ .../Form/DocumentCategoryType.php | 9 +++ .../Form/PersonDocumentType.php | 9 +++ .../Form/StoredObjectType.php | 9 +++ .../ChillDocStoreBundle/Menu/MenuBuilder.php | 9 +++ .../Object/ObjectToAsyncFileTransformer.php | 9 +++ .../Object/PersistenceChecker.php | 9 +++ .../Authorization/PersonDocumentVoter.php | 9 +++ .../ChillEventBundle/ChillEventBundle.php | 9 +++ .../Controller/AdminController.php | 9 +++ .../Controller/EventController.php | 9 +++ .../Controller/EventTypeController.php | 9 +++ .../Controller/ParticipationController.php | 9 +++ .../Controller/RoleController.php | 9 +++ .../Controller/StatusController.php | 9 +++ .../DataFixtures/ORM/LoadEventTypes.php | 9 +++ .../DataFixtures/ORM/LoadParticipation.php | 9 +++ .../DataFixtures/ORM/LoadRolesACL.php | 9 +++ .../ChillEventExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ src/Bundle/ChillEventBundle/Entity/Event.php | 9 +++ .../ChillEventBundle/Entity/EventType.php | 9 +++ .../ChillEventBundle/Entity/Participation.php | 11 +++- src/Bundle/ChillEventBundle/Entity/Role.php | 9 +++ src/Bundle/ChillEventBundle/Entity/Status.php | 9 +++ .../Form/ChoiceLoader/EventChoiceLoader.php | 11 +++- .../ChillEventBundle/Form/EventType.php | 9 +++ .../ChillEventBundle/Form/EventTypeType.php | 9 +++ .../Form/ParticipationType.php | 9 +++ src/Bundle/ChillEventBundle/Form/RoleType.php | 9 +++ .../ChillEventBundle/Form/StatusType.php | 9 +++ .../Form/Type/PickEventType.php | 11 +++- .../Form/Type/PickEventTypeType.php | 9 +++ .../Form/Type/PickRoleType.php | 9 +++ .../Form/Type/PickStatusType.php | 9 +++ .../Menu/PersonMenuBuilder.php | 9 +++ .../Repository/EventRepository.php | 9 +++ .../Repository/ParticipationRepository.php | 9 +++ .../Resources/test/Fixtures/App/AppKernel.php | 9 +++ .../Resources/test/bootstrap.php | 8 +++ .../ChillEventBundle/Search/EventSearch.php | 9 +++ .../Security/Authorization/EventVoter.php | 13 ++++- .../Authorization/ParticipationVoter.php | 13 ++++- .../Tests/Controller/EventControllerTest.php | 11 +++- .../Controller/EventTypeControllerTest.php | 11 +++- .../ParticipationControllerTest.php | 17 ++++-- .../Tests/Controller/RoleControllerTest.php | 11 +++- .../Tests/Controller/StatusControllerTest.php | 11 +++- .../Tests/Search/EventSearchTest.php | 21 +++++-- .../Timeline/TimelineEventProvider.php | 9 +++ .../migrations/Version20160318111334.php | 13 ++++- .../ChillAMLIFamilyMembersBundle.php | 9 +++ .../Config/ConfigRepository.php | 9 +++ .../ChillAMLIFamilyMembersExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../Entity/AbstractFamilyMember.php | 9 +++ .../Entity/FamilyMember.php | 9 +++ .../Form/FamilyMemberType.php | 9 +++ .../Form/FamilyMembersType.php | 9 +++ .../Menu/UserMenuBuilder.php | 9 +++ .../Security/Voter/FamilyMemberVoter.php | 13 ++++- .../Templating/Twig.php | 9 +++ .../Controller/FamilyMemberControllerTest.php | 17 ++++-- .../CRUDControllerCompilerPass.php | 9 +++ .../CRUD/Controller/CRUDController.php | 9 +++ .../CRUD/Form/CRUDDeleteEntityForm.php | 9 +++ .../CRUD/Resolver/Resolver.php | 9 +++ .../CRUD/Routing/CRUDRoutesLoader.php | 6 +- .../CRUD/Templating/TwigCRUDResolver.php | 9 +++ .../Center/GroupingCenterInterface.php | 9 +++ .../ChillMainBundle/ChillMainBundle.php | 9 +++ .../ChillUserSendRenewPasswordCodeCommand.php | 13 ++++- .../Command/LoadAndUpdateLanguagesCommand.php | 13 ++++- .../Command/LoadCountriesCommand.php | 9 +++ .../Command/LoadPostalCodesCommand.php | 10 ++-- .../Command/SetPasswordCommand.php | 9 +++ .../Controller/AddressApiController.php | 9 +++ .../AddressReferenceAPIController.php | 9 +++ .../Controller/AdminController.php | 9 +++ .../Controller/CenterController.php | 9 +++ .../Controller/DefaultController.php | 9 +++ .../Controller/ExportController.php | 9 +++ .../Controller/LocationApiController.php | 9 +++ .../Controller/LocationController.php | 9 +++ .../Controller/LocationTypeApiController.php | 9 +++ .../Controller/LocationTypeController.php | 9 +++ .../Controller/LoginController.php | 9 +++ .../Controller/MenuController.php | 9 +++ .../Controller/NotificationController.php | 9 +++ .../Controller/PasswordController.php | 9 +++ .../Controller/PermissionApiController.php | 9 +++ .../Controller/PermissionsGroupController.php | 9 +++ .../Controller/PostalCodeAPIController.php | 9 +++ .../Controller/PostalCodeController.php | 9 +++ .../Controller/ScopeController.php | 9 +++ .../Controller/SearchController.php | 9 +++ .../Controller/TimelineCenterController.php | 9 +++ .../Controller/UIController.php | 9 +++ .../Controller/UserApiController.php | 9 +++ .../ORM/LoadAbstractNotificationsTrait.php | 9 +++ .../ORM/LoadAddressReferences.php | 9 +++ .../DataFixtures/ORM/LoadCenters.php | 9 +++ .../DataFixtures/ORM/LoadCivility.php | 9 +++ .../DataFixtures/ORM/LoadCountries.php | 9 +++ .../DataFixtures/ORM/LoadGroupCenters.php | 9 +++ .../DataFixtures/ORM/LoadLanguages.php | 13 ++++- .../DataFixtures/ORM/LoadLocationType.php | 9 +++ .../DataFixtures/ORM/LoadPermissionsGroup.php | 9 +++ .../DataFixtures/ORM/LoadPostalCodes.php | 15 ++++- .../DataFixtures/ORM/LoadRoleScopes.php | 9 +++ .../DataFixtures/ORM/LoadScopes.php | 9 +++ .../DataFixtures/ORM/LoadUsers.php | 9 +++ .../ChillMainExtension.php | 9 +++ .../CompilerPass/ExportsCompilerPass.php | 19 +++++-- .../GroupingCenterCompilerPass.php | 9 +++ .../CompilerPass/MenuCompilerPass.php | 11 +++- .../NotificationCounterCompilerPass.php | 9 +++ .../SearchableServicesCompilerPass.php | 11 +++- .../CompilerPass/TimelineCompilerClass.php | 9 +++ .../CompilerPass/WidgetsCompilerPass.php | 9 +++ .../ConfigConsistencyCompilerPass.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../MissingBundleException.php | 9 +++ .../RoleProvidersCompilerPass.php | 9 +++ .../Widget/AbstractWidgetsCompilerPass.php | 15 ++++- .../Widget/AddWidgetConfigurationTrait.php | 11 +++- .../Widget/Factory/AbstractWidgetFactory.php | 9 +++ .../Widget/Factory/WidgetFactoryInterface.php | 9 +++ .../HasWidgetFactoriesExtensionInterface.php | 9 +++ .../Doctrine/DQL/GetJsonFieldByKey.php | 9 +++ .../Doctrine/DQL/JsonAggregate.php | 9 +++ .../Doctrine/DQL/JsonbArrayLength.php | 9 +++ .../Doctrine/DQL/JsonbExistsInArray.php | 9 +++ .../ChillMainBundle/Doctrine/DQL/Replace.php | 9 +++ .../Doctrine/DQL/STContains.php | 9 +++ .../Doctrine/DQL/Similarity.php | 9 +++ .../Doctrine/DQL/StrictWordSimilarityOPS.php | 9 +++ .../ChillMainBundle/Doctrine/DQL/Unaccent.php | 9 +++ .../Event/TrackCreateUpdateSubscriber.php | 9 +++ .../Doctrine/Migrations/VersionComparator.php | 9 +++ .../ChillMainBundle/Doctrine/Model/Point.php | 9 +++ .../Doctrine/Model/PointException.php | 9 +++ .../Doctrine/Model/TrackCreationInterface.php | 9 +++ .../Doctrine/Model/TrackUpdateInterface.php | 9 +++ .../Doctrine/Type/NativeDateIntervalType.php | 9 +++ src/Bundle/ChillMainBundle/Entity/Address.php | 9 +++ .../Entity/AddressReference.php | 9 +++ src/Bundle/ChillMainBundle/Entity/Center.php | 9 +++ .../ChillMainBundle/Entity/Civility.php | 9 +++ src/Bundle/ChillMainBundle/Entity/Country.php | 9 +++ .../Entity/Embeddable/CommentEmbeddable.php | 9 +++ .../ChillMainBundle/Entity/GroupCenter.php | 9 +++ .../Entity/HasCenterInterface.php | 9 +++ .../Entity/HasCentersInterface.php | 9 +++ .../Entity/HasScopeInterface.php | 9 +++ .../Entity/HasScopesInterface.php | 9 +++ .../ChillMainBundle/Entity/Language.php | 9 +++ .../ChillMainBundle/Entity/Location.php | 9 +++ .../ChillMainBundle/Entity/LocationType.php | 9 +++ .../ChillMainBundle/Entity/Notification.php | 9 +++ .../Entity/PermissionsGroup.php | 9 +++ .../ChillMainBundle/Entity/PostalCode.php | 9 +++ src/Bundle/ChillMainBundle/Entity/Scope.php | 9 +++ src/Bundle/ChillMainBundle/Entity/User.php | 11 +++- src/Bundle/ChillMainBundle/Entity/UserJob.php | 9 +++ .../Export/AggregatorInterface.php | 9 +++ .../Export/DirectExportInterface.php | 9 +++ .../Export/ExportElementInterface.php | 9 +++ .../ExportElementValidatedInterface.php | 9 +++ .../ExportElementsProviderInterface.php | 9 +++ .../Export/ExportInterface.php | 9 +++ .../ChillMainBundle/Export/ExportManager.php | 23 +++++--- .../Export/FilterInterface.php | 9 +++ .../Export/Formatter/CSVListFormatter.php | 9 +++ .../Formatter/CSVPivotedListFormatter.php | 9 +++ .../Export/Formatter/SpreadSheetFormatter.php | 9 +++ .../Formatter/SpreadsheetListFormatter.php | 9 +++ .../Export/FormatterInterface.php | 9 +++ .../Export/GroupedExportInterface.php | 9 +++ .../ChillMainBundle/Export/ListInterface.php | 9 +++ .../Export/ModifierInterface.php | 9 +++ .../Form/AdvancedSearchType.php | 9 +++ .../ChillMainBundle/Form/CenterType.php | 9 +++ .../ChoiceLoader/PostalCodeChoiceLoader.php | 9 +++ .../Form/DataMapper/AddressDataMapper.php | 9 +++ .../Form/DataMapper/ScopePickerDataMapper.php | 9 +++ .../Form/Event/CustomizeFormEvent.php | 9 +++ .../ChillMainBundle/Form/LocationFormType.php | 9 +++ .../ChillMainBundle/Form/LocationTypeType.php | 9 +++ .../Form/PermissionsGroupType.php | 9 +++ src/Bundle/ChillMainBundle/Form/ScopeType.php | 9 +++ .../ChillMainBundle/Form/Type/AddressType.php | 9 +++ .../Form/Type/AppendScopeChoiceTypeTrait.php | 9 +++ .../Form/Type/ChillCollectionType.php | 9 +++ .../Form/Type/ChillDateTimeType.php | 9 +++ .../Form/Type/ChillDateType.php | 9 +++ .../Form/Type/ChillTextareaType.php | 9 +++ .../ChillMainBundle/Form/Type/CommentType.php | 9 +++ .../Form/Type/ComposedGroupCenterType.php | 9 +++ .../Form/Type/ComposedRoleScopeType.php | 11 +++- .../AddressToIdDataTransformer.php | 9 +++ .../DataTransformer/CenterTransformer.php | 9 +++ .../MultipleObjectsToIdTransformer.php | 9 +++ .../DataTransformer/ObjectToIdTransformer.php | 9 +++ .../Type/DataTransformer/ScopeTransformer.php | 11 +++- .../Form/Type/DateIntervalType.php | 11 +++- .../Form/Type/Export/AggregatorType.php | 9 +++ .../Form/Type/Export/ExportType.php | 9 +++ .../Form/Type/Export/FilterType.php | 9 +++ .../Form/Type/Export/FormatterType.php | 9 +++ .../Form/Type/Export/PickCenterType.php | 11 +++- .../Form/Type/Export/PickFormatterType.php | 9 +++ .../Form/Type/Listing/FilterOrderType.php | 9 +++ .../Form/Type/PickAddressType.php | 9 +++ .../Form/Type/PickCenterType.php | 9 +++ .../Form/Type/PostalCodeType.php | 9 +++ .../Form/Type/ScopePickerType.php | 9 +++ .../Form/Type/Select2ChoiceType.php | 9 +++ .../Form/Type/Select2CountryType.php | 11 +++- .../Form/Type/Select2EntityType.php | 9 +++ .../Form/Type/Select2LanguageType.php | 9 +++ .../Form/Type/TranslatableStringFormType.php | 12 +++- .../Form/Type/UserPickerType.php | 9 +++ .../Form/UserCurrentLocationType.php | 9 +++ .../ChillMainBundle/Form/UserJobType.php | 9 +++ .../ChillMainBundle/Form/UserPasswordType.php | 9 +++ src/Bundle/ChillMainBundle/Form/UserType.php | 9 +++ .../Utils/PermissionsGroupFlagProvider.php | 9 +++ .../ChillMainBundle/Notification/Mailer.php | 9 +++ .../Notification/NotificationRenderer.php | 9 +++ .../Pagination/ChillItemsPerPageTwig.php | 9 +++ .../Pagination/ChillPaginationTwig.php | 9 +++ .../ChillMainBundle/Pagination/Page.php | 9 +++ .../Pagination/PageInterface.php | 9 +++ .../ChillMainBundle/Pagination/Paginator.php | 11 +++- .../Pagination/PaginatorFactory.php | 9 +++ .../Pagination/PaginatorInterface.php | 9 +++ .../Phonenumber/PhonenumberHelper.php | 13 ++++- .../Phonenumber/Templating.php | 9 +++ .../ChillMainBundle/Redis/ChillRedis.php | 9 +++ .../Redis/RedisConnectionFactory.php | 9 +++ .../Repository/CivilityRepository.php | 9 +++ .../Repository/LocationRepository.php | 9 +++ .../Repository/LocationTypeRepository.php | 9 +++ .../Repository/NotificationRepository.php | 9 +++ .../Repository/UserACLAwareRepository.php | 9 +++ .../UserACLAwareRepositoryInterface.php | 9 +++ .../Repository/UserJobRepository.php | 9 +++ .../test/Fixtures/App/app/AppKernel.php | 9 +++ .../test/Fixtures/App/app/autoload.php | 9 +++ .../Routing/LocalMenuBuilderInterface.php | 9 +++ .../MenuBuilder/AdminSectionMenuBuilder.php | 9 +++ .../MenuBuilder/LocationMenuBuilder.php | 9 +++ .../MenuBuilder/PermissionMenuBuilder.php | 9 +++ .../MenuBuilder/SectionMenuBuilder.php | 9 +++ .../Routing/MenuBuilder/UserMenuBuilder.php | 9 +++ .../ChillMainBundle/Routing/MenuTwig.php | 9 +++ .../ChillMainBundle/Search/AbstractSearch.php | 9 +++ .../Search/Entity/SearchUserApiProvider.php | 11 +++- .../Search/HasAdvancedSearchFormInterface.php | 9 +++ .../ChillMainBundle/Search/Model/Result.php | 9 +++ .../Search/ParsingException.php | 9 +++ .../Search/SearchApiInterface.php | 9 +++ .../Search/SearchApiNoQueryException.php | 9 +++ .../ChillMainBundle/Search/SearchApiQuery.php | 9 +++ .../Search/SearchInterface.php | 9 +++ .../ChillMainBundle/Search/SearchProvider.php | 13 ++++- .../Search/UnknowSearchDomainException.php | 9 +++ .../Search/UnknowSearchNameException.php | 9 +++ .../Search/Utils/ExtractDateFromPattern.php | 9 +++ .../Utils/ExtractPhonenumberFromPattern.php | 9 +++ .../Search/Utils/SearchExtractionResult.php | 9 +++ .../Authorization/AbstractChillVoter.php | 4 +- .../Authorization/AuthorizationHelper.php | 2 +- .../AuthorizationHelperInterface.php | 9 +++ .../Authorization/ChillVoterInterface.php | 9 +++ .../Authorization/VoterGeneratorInterface.php | 9 +++ .../VoterHelperFactoryInterface.php | 9 +++ .../Security/ParentRoleHelper.php | 13 ++++- .../PasswordRecover/PasswordRecoverEvent.php | 9 +++ .../PasswordRecoverEventSubscriber.php | 9 +++ .../PasswordRecover/PasswordRecoverLocker.php | 9 +++ .../PasswordRecover/PasswordRecoverVoter.php | 11 +++- .../PasswordRecover/RecoverPasswordHelper.php | 9 +++ .../Security/PasswordRecover/TokenManager.php | 9 +++ .../Resolver/CenterResolverInterface.php | 9 +++ .../Resolver/DefaultCenterResolver.php | 9 +++ .../Resolver/DefaultScopeResolver.php | 9 +++ .../Resolver/ResolverTwigExtension.php | 9 +++ .../Resolver/ScopeResolverDispatcher.php | 9 +++ .../Resolver/ScopeResolverInterface.php | 9 +++ .../ChillMainBundle/Security/RoleProvider.php | 9 +++ .../Serializer/Model/Collection.php | 9 +++ .../Normalizer/CenterNormalizer.php | 9 +++ .../Normalizer/CollectionNormalizer.php | 9 +++ .../Serializer/Normalizer/DateNormalizer.php | 9 +++ .../DiscriminatedObjectDenormalizer.php | 9 +++ .../DoctrineExistingEntityNormalizer.php | 9 +++ .../Serializer/Normalizer/PointNormalizer.php | 9 +++ .../Serializer/Normalizer/UserNormalizer.php | 9 +++ .../Templating/CSVCellTwig.php | 9 +++ .../ChillMarkdownRenderExtension.php | 9 +++ .../Templating/ChillTwigHelper.php | 9 +++ .../Templating/ChillTwigRoutingHelper.php | 9 +++ .../Entity/AbstractChillEntityRender.php | 9 +++ .../Templating/Entity/AddressRender.php | 9 +++ .../Templating/Entity/ChillEntityRender.php | 9 +++ .../Entity/ChillEntityRenderExtension.php | 9 +++ .../Entity/ChillEntityRenderInterface.php | 9 +++ .../Templating/Entity/CommentRender.php | 9 +++ .../Templating/Entity/CompilerPass.php | 9 +++ .../Templating/Entity/UserRender.php | 9 +++ .../Events/DelegatedBlockRenderingEvent.php | 9 +++ .../Templating/Listing/FilterOrderHelper.php | 9 +++ .../Listing/FilterOrderHelperBuilder.php | 9 +++ .../Listing/FilterOrderHelperFactory.php | 9 +++ .../FilterOrderHelperFactoryInterface.php | 9 +++ .../Templating/Listing/Templating.php | 9 +++ .../Templating/TranslatableStringTwig.php | 9 +++ .../Templating/UI/CountNotificationUser.php | 9 +++ .../UI/NotificationCounterInterface.php | 9 +++ .../Templating/Widget/WidgetInterface.php | 9 +++ .../Templating/Widget/WidgetRenderingTwig.php | 9 +++ .../Test/Export/AbstractAggregatorTest.php | 9 +++ .../Test/Export/AbstractExportTest.php | 9 +++ .../Test/Export/AbstractFilterTest.php | 9 +++ .../Test/PrepareCenterTrait.php | 9 +++ .../Test/PrepareCircleTrait.php | 9 +++ .../Test/PrepareClientTrait.php | 9 +++ .../Test/PrepareScopeTrait.php | 9 +++ .../ChillMainBundle/Test/PrepareUserTrait.php | 9 +++ .../ChillMainBundle/Test/ProphecyTrait.php | 9 +++ .../Authorization/ParentRoleHelperTest.php | 11 +++- .../Controller/AddressControllerTest.php | 11 +++- .../Tests/Controller/CenterControllerTest.php | 13 ++++- .../Tests/Controller/ExportControllerTest.php | 13 ++++- .../Tests/Controller/LoginControllerTest.php | 13 ++++- .../PermissionApiControllerTest.php | 11 +++- .../PermissionsGroupControllerTest.php | 11 +++- .../Tests/Controller/ScopeControllerTest.php | 13 ++++- .../Controller/SearchApiControllerTest.php | 11 +++- .../Tests/Controller/SearchControllerTest.php | 13 ++++- .../Controller/UserApiControllerTest.php | 11 +++- .../Tests/Controller/UserControllerTest.php | 13 ++++- .../Tests/Doctrine/Model/PointTest.php | 11 +++- .../Tests/Export/ExportManagerTest.php | 11 +++- .../Tests/Form/Type/PickCenterTypeTest.php | 11 +++- .../Tests/Pagination/PageTest.php | 11 +++- .../Tests/Pagination/PaginatorTest.php | 11 +++- .../Tests/Routing/Loader/RouteLoaderTest.php | 15 ++++- .../Tests/Search/AbstractSearchTest.php | 11 +++- .../Tests/Search/SearchApiQueryTest.php | 11 +++- .../Tests/Search/SearchProviderTest.php | 11 +++- .../Utils/ExtractDateFromPatternTest.php | 11 +++- .../ExtractPhonenumberFromPatternTest.php | 11 +++- .../Authorization/AuthorizationHelperTest.php | 33 +++++++---- .../PasswordRecover/TokenManagerTest.php | 11 +++- .../Resolver/CenterResolverDispatcherTest.php | 2 +- .../Resolver/DefaultScopeResolverTest.php | 11 +++- .../Resolver/ScopeResolverDispatcherTest.php | 11 +++- .../Normalizer/DateNormalizerTest.php | 11 +++- .../DoctrineExistingEntityNormalizerTest.php | 11 +++- .../Tests/Services/MenuComposerTest.php | 13 ++++- .../ChillMarkdownRenderExtensionTest.php | 11 +++- .../Templating/Entity/AddressRenderTest.php | 11 +++- .../ChillMainBundle/Tests/TestHelper.php | 9 +++ .../Tests/Util/CountriesInfoTest.php | 11 +++- .../Tests/Util/DateRangeCoveringTest.php | 11 +++- .../ChillMainBundle/Tests/bootstrap.php | 8 +++ .../Timeline/TimelineBuilder.php | 9 +++ .../Timeline/TimelineProviderInterface.php | 9 +++ .../Timeline/TimelineSingleQuery.php | 9 +++ .../ChillMainBundle/Util/CountriesInfo.php | 9 +++ .../Util/DateRangeCovering.php | 9 +++ .../Constraint/PhonenumberConstraint.php | 9 +++ .../RoleScopeScopePresenceConstraint.php | 9 +++ .../UserUniqueEmailAndUsernameConstraint.php | 9 +++ .../Validator/RoleScopeScopePresence.php | 13 ++++- .../Validator/UserUniqueEmailAndUsername.php | 9 +++ .../Validation/Validator/ValidPhonenumber.php | 9 +++ .../Entity/UserCircleConsistency.php | 9 +++ .../Entity/UserCircleConsistencyValidator.php | 9 +++ .../Export/ExportElementConstraint.php | 9 +++ .../ExportElementConstraintValidator.php | 9 +++ .../migrations/Version20141128194409.php | 9 +++ .../migrations/Version20150821105642.php | 13 ++++- .../migrations/Version20150821122935.php | 9 +++ .../migrations/Version20160310122322.php | 13 ++++- ...dLinkedWithSocialIssuesEntityInterface.php | 9 +++ ...odSocialIssueConsistencyEntityListener.php | 9 +++ .../Suggestion/ReferralsSuggestion.php | 9 +++ .../ReferralsSuggestionInterface.php | 9 +++ .../ChillPersonBundle/Actions/ActionEvent.php | 9 +++ .../Actions/Remove/PersonMove.php | 11 +++- .../Controller/EntityPersonCRUDController.php | 9 +++ .../ChillPersonBundle/ChillPersonBundle.php | 9 +++ .../Command/ChillPersonMoveCommand.php | 9 +++ .../Command/ImportPeopleFromCSVCommand.php | 25 +++++--- .../Config/ConfigPersonAltNamesHelper.php | 9 +++ .../AccompanyingCourseApiController.php | 9 +++ .../AccompanyingCourseController.php | 9 +++ .../AccompanyingCourseWorkApiController.php | 9 +++ .../AccompanyingCourseWorkController.php | 9 +++ .../AccompanyingPeriodController.php | 9 +++ .../AdminClosingMotiveController.php | 9 +++ .../Controller/AdminController.php | 9 +++ .../AdminMaritalStatusController.php | 9 +++ .../Controller/HouseholdApiController.php | 9 +++ .../Controller/HouseholdController.php | 11 +++- .../Controller/HouseholdMemberController.php | 9 +++ .../Controller/OpeningApiController.php | 9 +++ .../Controller/PersonAddressController.php | 9 +++ .../Controller/PersonApiController.php | 9 +++ .../Controller/PersonController.php | 11 +++- .../Controller/PersonDuplicateController.php | 9 +++ .../Controller/SocialIssueApiController.php | 9 +++ .../SocialWork/AdminEvaluationController.php | 9 +++ .../SocialWork/AdminGoalController.php | 9 +++ .../SocialWork/AdminResultController.php | 9 +++ .../AdminSocialActionController.php | 9 +++ .../SocialWork/AdminSocialIssueController.php | 9 +++ .../SocialWorkEvaluationApiController.php | 9 +++ .../SocialWorkGoalApiController.php | 9 +++ .../SocialWorkResultApiController.php | 9 +++ .../SocialWorkSocialActionApiController.php | 9 +++ .../Helper/PersonRandomHelper.php | 9 +++ .../Helper/RandomPersonHelperTrait.php | 9 +++ .../LoadAccompanyingPeriodClosingMotive.php | 9 +++ .../LoadAccompanyingPeriodNotifications.php | 9 +++ .../ORM/LoadAccompanyingPeriodOrigin.php | 9 +++ .../ORM/LoadAccompanyingPeriodWork.php | 9 +++ .../DataFixtures/ORM/LoadCustomFields.php | 9 +++ .../ORM/LoadHouseholdPosition.php | 9 +++ .../DataFixtures/ORM/LoadMaritalStatus.php | 9 +++ .../DataFixtures/ORM/LoadPeople.php | 9 +++ .../DataFixtures/ORM/LoadPersonACL.php | 9 +++ .../ChillPersonExtension.php | 9 +++ ...AccompanyingPeriodTimelineCompilerPass.php | 11 +++- .../DependencyInjection/Configuration.php | 9 +++ .../Doctrine/DQL/AddressPart.php | 9 +++ .../DQL/AddressPart/AddressPartAddressId.php | 9 +++ .../AddressPart/AddressPartCountryCode.php | 9 +++ .../DQL/AddressPart/AddressPartCountryId.php | 9 +++ .../AddressPart/AddressPartCountryName.php | 9 +++ .../AddressPart/AddressPartIsNoAddress.php | 9 +++ .../AddressPart/AddressPartPostCodeCode.php | 9 +++ .../DQL/AddressPart/AddressPartPostCodeId.php | 9 +++ .../AddressPart/AddressPartPostCodeLabel.php | 9 +++ .../AddressPart/AddressPartStreetAddress1.php | 9 +++ .../AddressPart/AddressPartStreetAddress2.php | 9 +++ .../DQL/AddressPart/AddressPartValidFrom.php | 9 +++ .../Entity/AccompanyingPeriod.php | 15 ++++- .../AccompanyingPeriodWork.php | 9 +++ .../AccompanyingPeriodWorkEvaluation.php | 9 +++ ...companyingPeriodWorkEvaluationDocument.php | 9 +++ .../AccompanyingPeriodWorkGoal.php | 9 +++ .../AccompanyingPeriod/ClosingMotive.php | 9 +++ .../Entity/AccompanyingPeriod/Comment.php | 9 +++ .../Entity/AccompanyingPeriod/Origin.php | 9 +++ .../Entity/AccompanyingPeriod/Resource.php | 9 +++ .../AccompanyingPeriodParticipation.php | 11 +++- .../ChillPersonBundle/Entity/HasPerson.php | 9 +++ .../Entity/Household/Household.php | 11 +++- .../Entity/Household/HouseholdMember.php | 9 +++ .../Household/PersonHouseholdAddress.php | 9 +++ .../Entity/Household/Position.php | 9 +++ .../Entity/MaritalStatus.php | 9 +++ .../ChillPersonBundle/Entity/Person.php | 6 +- .../Entity/Person/PersonCurrentAddress.php | 9 +++ .../Entity/PersonAltName.php | 9 +++ .../Entity/PersonNotDuplicate.php | 9 +++ .../ChillPersonBundle/Entity/PersonPhone.php | 9 +++ .../Entity/Relationships/Relation.php | 9 +++ .../Entity/Relationships/Relationship.php | 9 +++ .../Entity/SocialWork/Evaluation.php | 9 +++ .../Entity/SocialWork/Goal.php | 9 +++ .../Entity/SocialWork/Result.php | 9 +++ .../Entity/SocialWork/SocialAction.php | 9 +++ .../Entity/SocialWork/SocialIssue.php | 9 +++ ...bstractAccompanyingPeriodExportElement.php | 13 ++++- .../Export/Aggregator/AgeAggregator.php | 9 +++ .../Aggregator/CountryOfBirthAggregator.php | 9 +++ .../Export/Aggregator/GenderAggregator.php | 9 +++ .../Aggregator/NationalityAggregator.php | 9 +++ .../ChillPersonBundle/Export/Declarations.php | 9 +++ .../Export/Export/CountPerson.php | 9 +++ .../Export/Export/ListPerson.php | 6 +- .../Export/Export/ListPersonDuplicate.php | 9 +++ .../AccompanyingPeriodClosingFilter.php | 9 +++ .../Filter/AccompanyingPeriodFilter.php | 9 +++ .../AccompanyingPeriodOpeningFilter.php | 9 +++ .../Export/Filter/BirthdateFilter.php | 9 +++ .../Export/Filter/GenderFilter.php | 11 +++- .../Export/Filter/NationalityFilter.php | 9 +++ .../Form/AccompanyingPeriodType.php | 9 +++ .../Form/ChoiceLoader/PersonChoiceLoader.php | 11 +++- .../Form/ClosingMotiveType.php | 9 +++ .../DataMapper/PersonAltNameDataMapper.php | 9 +++ .../DataTransformer/PersonToIdTransformer.php | 9 +++ .../Form/HouseholdMemberType.php | 9 +++ .../ChillPersonBundle/Form/HouseholdType.php | 9 +++ .../Form/MaritalStatusType.php | 9 +++ .../Form/PersonConfimDuplicateType.php | 9 +++ .../Form/PersonFindManuallyDuplicateType.php | 9 +++ .../ChillPersonBundle/Form/PersonType.php | 9 +++ .../Form/SocialWork/EvaluationType.php | 9 +++ .../Form/SocialWork/GoalType.php | 9 +++ .../Form/SocialWork/ResultType.php | 9 +++ .../Form/SocialWork/SocialActionType.php | 9 +++ .../Form/Type/ClosingMotivePickerType.php | 9 +++ .../Form/Type/GenderType.php | 9 +++ .../Form/Type/PersonAltNameType.php | 9 +++ .../Form/Type/PersonPhoneType.php | 9 +++ .../Form/Type/PickPersonType.php | 11 +++- .../Form/Type/Select2MaritalStatusType.php | 9 +++ .../Household/MembersEditor.php | 11 +++- .../Household/MembersEditorFactory.php | 9 +++ .../Menu/AccompanyingCourseMenuBuilder.php | 9 +++ .../Menu/AdminMenuBuilder.php | 9 +++ .../Menu/HouseholdMenuBuilder.php | 9 +++ .../Menu/PersonMenuBuilder.php | 9 +++ .../Menu/SectionMenuBuilder.php | 9 +++ ...AccompanyingPeriodNotificationRenderer.php | 11 +++- .../AccompanyingPeriodPrivacyEvent.php | 9 +++ .../Privacy/PrivacyEvent.php | 9 +++ .../Privacy/PrivacyEventSubscriber.php | 9 +++ .../AccompanyingPeriodWorkGoalRepository.php | 9 +++ .../ClosingMotiveRepository.php | 9 +++ .../AccompanyingPeriod/CommentRepository.php | 9 +++ .../AccompanyingPeriod/OriginRepository.php | 9 +++ .../AccompanyingPeriod/ResourceRepository.php | 9 +++ ...nyingPeriodACLAwareRepositoryInterface.php | 9 +++ ...ompanyingPeriodParticipationRepository.php | 9 +++ .../AccompanyingPeriodRepository.php | 9 +++ .../Household/HouseholdACLAwareRepository.php | 9 +++ .../HouseholdACLAwareRepositoryInterface.php | 9 +++ .../Household/HouseholdRepository.php | 9 +++ .../PersonHouseholdAddressRepository.php | 9 +++ .../Household/PositionRepository.php | 9 +++ .../Repository/MaritalStatusRepository.php | 9 +++ .../Repository/PersonACLAwareRepository.php | 9 +++ .../PersonACLAwareRepositoryInterface.php | 9 +++ .../Repository/PersonAltNameRepository.php | 9 +++ .../PersonNotDuplicateRepository.php | 9 +++ .../Repository/PersonRepository.php | 13 ++++- .../Relationships/RelationRepository.php | 9 +++ .../Relationships/RelationshipRepository.php | 9 +++ .../SocialWork/EvaluationRepository.php | 9 +++ .../Repository/SocialWork/GoalRepository.php | 9 +++ .../SocialWork/ResultRepository.php | 9 +++ .../SocialWork/SocialActionRepository.php | 9 +++ .../test/Fixtures/App/app/AppKernel.php | 9 +++ .../test/Fixtures/App/app/autoload.php | 9 +++ .../test/Fixtures/App/web/app_dev.php | 11 +++- .../Search/SearchPersonApiProvider.php | 11 +++- .../Search/SimilarPersonMatcher.php | 9 +++ .../Security/Authorization/HouseholdVoter.php | 9 +++ .../Security/Authorization/PersonVoter.php | 9 +++ .../AccompanyingPeriodOriginNormalizer.php | 11 +++- ...ompanyingPeriodParticipationNormalizer.php | 9 +++ .../AccompanyingPeriodResourceNormalizer.php | 9 +++ .../AccompanyingPeriodWorkDenormalizer.php | 11 +++- .../Normalizer/MembersEditorNormalizer.php | 2 +- .../Normalizer/PersonDocGenNormalizer.php | 9 +++ .../Normalizer/PersonJsonNormalizer.php | 9 +++ .../Normalizer/SocialActionNormalizer.php | 9 +++ .../Normalizer/SocialIssueNormalizer.php | 9 +++ .../Templating/Entity/ClosingMotiveRender.php | 9 +++ .../Templating/Entity/PersonRender.php | 9 +++ .../Templating/Entity/SocialActionRender.php | 9 +++ .../Templating/Entity/SocialIssueRender.php | 9 +++ .../Test/PreparePersonTrait.php | 9 +++ .../AccompanyingPeriodConfidentialTest.php | 21 +++++-- ...cialIssueConsistencyEntityListenerTest.php | 11 +++- .../AccompanyingCourseApiControllerTest.php | 27 ++++++--- .../AccompanyingCourseControllerTest.php | 11 +++- .../AccompanyingPeriodControllerTest.php | 35 +++++++----- .../Controller/HouseholdApiControllerTest.php | 11 +++- .../Controller/HouseholdControllerTest.php | 11 +++- .../HouseholdMemberControllerTest.php | 13 ++++- .../PersonAddressControllerTest.php | 21 +++++-- .../Controller/PersonApiControllerTest.php | 11 +++- .../Controller/PersonControllerCreateTest.php | 19 +++++-- .../Controller/PersonControllerUpdateTest.php | 23 +++++--- ...onControllerUpdateWithHiddenFieldsTest.php | 21 +++++-- .../Controller/PersonControllerViewTest.php | 19 +++++-- ...rsonControllerViewWithHiddenFieldsTest.php | 17 ++++-- .../PersonDuplicateControllerViewTest.php | 17 ++++-- .../RelationshipApiControllerTest.php | 8 +-- .../SocialIssueApiControllerTest.php | 11 +++- .../AccompanyingPeriod/ResourceTest.php | 11 +++- .../Tests/Entity/AccompanyingPeriodTest.php | 11 +++- .../Entity/Household/HouseholdMemberTest.php | 11 +++- .../Tests/Entity/PersonTest.php | 11 +++- .../Entity/SocialWork/SocialIssueTest.php | 11 +++- .../EventListener/PersonCreateEventTest.php | 11 +++- .../Export/Aggregator/AgeAggregatorTest.php | 21 +++++-- .../Aggregator/GenderAggregatorTest.php | 21 +++++-- .../Aggregator/NationalityAggregatorTest.php | 21 +++++-- .../Tests/Export/Export/CountPersonTest.php | 15 ++++- .../Tests/Export/Export/ListPersonTest.php | 17 ++++-- .../Filter/AccompanyingPeriodFilterTest.php | 21 +++++-- .../Export/Filter/BirthdayFilterTest.php | 21 +++++-- .../Tests/Export/Filter/GenderFilterTest.php | 21 +++++-- .../Tests/Form/Type/PickPersonTypeTest.php | 11 +++- .../Tests/Household/MembersEditorTest.php | 11 +++- .../Tests/Search/PersonSearchTest.php | 13 ++++- .../Authorization/PersonVoterTest.php | 15 ++++- .../Normalizer/HouseholdNormalizerTest.php | 11 +++- .../Normalizer/PersonDocGenNormalizerTest.php | 11 +++- .../Normalizer/PersonJsonNormalizerTest.php | 11 +++- .../TimelineAccompanyingPeriodTest.php | 11 +++- .../LocationValidityValidatorTest.php | 11 +++- ...eholdMembershipSequentialValidatorTest.php | 11 +++- .../Household/MaxHolderValidatorTest.php | 11 +++- .../Person/BirthdateValidatorTest.php | 11 +++- .../Person/PersonHasCenterValidatorTest.php | 2 +- .../Validator/Person/PersonValidationTest.php | 11 +++- .../Workflows/AccompanyingPeriodLifecycle.php | 11 +++- .../ChillPersonBundle/Tests/bootstrap.php | 8 +++ .../AbstractTimelineAccompanyingPeriod.php | 11 +++- .../TimelineAccompanyingPeriodClosing.php | 9 +++ .../TimelineAccompanyingPeriodOpening.php | 9 +++ .../AccompanyingPeriod/LocationValidity.php | 9 +++ .../LocationValidityValidator.php | 9 +++ .../HouseholdMembershipSequential.php | 9 +++ ...HouseholdMembershipSequentialValidator.php | 9 +++ .../Constraints/Household/MaxHolder.php | 9 +++ .../Household/MaxHolderValidator.php | 9 +++ .../Constraints/Person/Birthdate.php | 9 +++ .../Constraints/Person/BirthdateValidator.php | 9 +++ .../Constraints/Person/PersonHasCenter.php | 9 +++ .../Widget/AddAPersonWidget.php | 9 +++ .../PersonFilteringInterface.php | 9 +++ .../Widget/PersonListWidgetFactory.php | 9 +++ .../migrations/Version20141129010948.php | 9 +++ .../migrations/Version20150212173934.php | 9 +++ .../migrations/Version20150607231010.php | 13 ++++- .../migrations/Version20150811152608.php | 13 ++++- .../migrations/Version20150812110708.php | 13 ++++- .../migrations/Version20150820113409.php | 13 ++++- .../migrations/Version20160310161006.php | 13 ++++- .../migrations/Version20160422000000.php | 11 +++- .../migrations/Version20160818113633.php | 9 +++ .../migrations/Version20160818151130.php | 9 +++ .../migrations/Version20170117131924.php | 9 +++ .../ChillReportBundle/ChillReportBundle.php | 9 +++ .../Controller/ReportController.php | 9 +++ .../DataFixtures/ORM/LoadCustomField.php | 9 +++ .../ORM/LoadCustomFieldsGroup.php | 9 +++ .../DataFixtures/ORM/LoadReportACL.php | 11 +++- .../DataFixtures/ORM/LoadReports.php | 11 +++- .../ChillReportExtension.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../ChillReportBundle/Entity/Report.php | 9 +++ .../Export/Export/ReportList.php | 8 +-- .../Export/Export/ReportListProvider.php | 9 +++ .../Export/Filter/ReportDateFilter.php | 9 +++ .../ChillReportBundle/Form/ReportType.php | 9 +++ .../test/Fixtures/App/app/AppKernel.php | 9 +++ .../test/Fixtures/App/app/autoload.php | 9 +++ .../ChillReportBundle/Search/ReportSearch.php | 9 +++ .../Security/Authorization/ReportVoter.php | 11 +++- .../Controller/ReportControllerNextTest.php | 23 +++++--- .../Tests/Controller/ReportControllerTest.php | 57 +++++++++++-------- .../ChillReportExtensionTest.php | 13 ++++- .../Tests/Search/ReportSearchTest.php | 13 ++++- .../Authorization/ReportVoterTest.php | 15 ++++- .../Tests/Timeline/TimelineProviderTest.php | 35 +++++++----- .../ChillReportBundle/Tests/bootstrap.php | 8 +++ .../Timeline/TimelineReportProvider.php | 9 +-- .../migrations/Version20141129012050.php | 9 +++ .../migrations/Version20150622233319.php | 13 ++++- .../ChillTaskBundle/ChillTaskBundle.php | 9 +++ .../Controller/TaskController.php | 9 +++ .../DataFixtures/ORM/LoadTaskACL.php | 11 +++- .../ChillTaskExtension.php | 9 +++ .../TaskWorkflowDefinitionCompilerPass.php | 9 +++ .../DependencyInjection/Configuration.php | 9 +++ .../ChillTaskBundle/Entity/AbstractTask.php | 9 +++ .../ChillTaskBundle/Entity/RecurringTask.php | 9 +++ .../ChillTaskBundle/Entity/SingleTask.php | 9 +++ .../Entity/Task/AbstractTaskPlaceEvent.php | 9 +++ .../Entity/Task/SingleTaskPlaceEvent.php | 9 +++ .../Event/Lifecycle/TaskLifecycleEvent.php | 9 +++ .../ChillTaskBundle/Event/TaskEvent.php | 9 +++ .../ChillTaskBundle/Event/UI/UIEvent.php | 9 +++ .../Form/SingleTaskListType.php | 9 +++ .../ChillTaskBundle/Menu/MenuBuilder.php | 9 +++ .../Menu/SectionMenuBuilder.php | 9 +++ .../ChillTaskBundle/Menu/UserMenuBuilder.php | 9 +++ .../Repository/AbstractTaskRepository.php | 9 +++ .../Repository/RecurringTaskRepository.php | 9 +++ .../SingleTaskAclAwareRepositoryInterface.php | 9 +++ .../Repository/SingleTaskRepository.php | 9 +++ .../Authorization/AuthorizationEvent.php | 9 +++ .../Templating/TaskTwigExtension.php | 9 +++ .../Templating/UI/CountNotificationTask.php | 9 +++ .../Controller/SingleTaskControllerTest.php | 13 ++++- .../Tests/Controller/TaskControllerTest.php | 11 +++- ...TaskTaskLifeCycleEventTimelineProvider.php | 9 +++ .../TaskLifeCycleEventTimelineProvider.php | 11 +++- .../Definition/DefaultTaskDefinition.php | 9 +++ .../Workflow/Event/DefaultTaskGuardEvent.php | 9 +++ .../Workflow/TaskWorkflowDefinition.php | 9 +++ .../Workflow/TaskWorkflowManager.php | 9 +++ .../migrations/Version20180413135614.php | 9 +++ .../migrations/Version20180413201023.php | 9 +++ .../ChillThirdPartyBundle.php | 9 +++ .../Controller/ThirdPartyController.php | 9 +++ .../DataFixtures/ORM/LoadThirdParty.php | 9 +++ .../ORM/LoadThirdPartyCategory.php | 9 +++ .../ORM/LoadThirdPartyProfession.php | 9 +++ .../ChillThirdPartyExtension.php | 9 +++ .../ThirdPartyTypeCompilerPass.php | 11 +++- .../DependencyInjection/Configuration.php | 9 +++ .../Entity/ThirdParty.php | 17 ++++-- .../Entity/ThirdPartyCategory.php | 9 +++ .../Entity/ThirdPartyProfession.php | 9 +++ .../ChoiceLoader/ThirdPartyChoiceLoader.php | 11 +++- .../Form/ThirdPartyType.php | 9 +++ .../Form/Type/PickThirdPartyType.php | 9 +++ .../Type/PickThirdPartyTypeCategoryType.php | 9 +++ .../Menu/MenuBuilder.php | 9 +++ .../ThirdPartyACLAwareRepository.php | 9 +++ .../ThirdPartyACLAwareRepositoryInterface.php | 9 +++ .../ThirdPartyCategoryRepository.php | 9 +++ .../ThirdPartyProfessionRepository.php | 9 +++ .../Repository/ThirdPartyRepository.php | 9 +++ .../Search/ThirdPartyApiSearch.php | 11 +++- .../Search/ThirdPartySearch.php | 9 +++ .../Security/Voter/ThirdPartyVoter.php | 11 +++- .../Templating/Entity/ThirdPartyRender.php | 9 +++ .../Controller/ThirdPartyControllerTest.php | 17 ++++-- .../Tests/Entity/ThirdPartyTest.php | 11 +++- .../ThirdPartyType/ThirdPartyTypeManager.php | 9 +++ .../ThirdPartyTypeProviderInterface.php | 9 +++ 957 files changed, 9025 insertions(+), 568 deletions(-) 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'

test

diff --git a/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php b/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php index 2873c04e3..38435b08c 100644 --- a/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for 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\Entity; use Chill\MainBundle\Entity\Address; @@ -21,7 +30,7 @@ use Symfony\Component\Templating\EngineInterface; * @internal * @coversNothing */ -class AddressRenderTest extends KernelTestCase +final class AddressRenderTest extends KernelTestCase { protected function setUp() { diff --git a/src/Bundle/ChillMainBundle/Tests/TestHelper.php b/src/Bundle/ChillMainBundle/Tests/TestHelper.php index 4c009ae83..94ad4144b 100644 --- a/src/Bundle/ChillMainBundle/Tests/TestHelper.php +++ b/src/Bundle/ChillMainBundle/Tests/TestHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for 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; use Symfony\Component\BrowserKit\Client; diff --git a/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php b/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php index 7a2209114..a6dd51636 100644 --- a/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for 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\Util; use Chill\MainBundle\Util\CountriesInfo; @@ -18,7 +27,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class CountriesInfoTest extends TestCase +final class CountriesInfoTest extends TestCase { public function getGetContinentsCodes() { diff --git a/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php b/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php index 2b4a88676..b485cdd10 100644 --- a/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for 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\Util; use Chill\MainBundle\Util\DateRangeCovering; @@ -19,7 +28,7 @@ use function usort; * @internal * @coversNothing */ -class DateRangeCoveringTest extends TestCase +final class DateRangeCoveringTest extends TestCase { public function testCoveringWithMinCover1() { diff --git a/src/Bundle/ChillMainBundle/Tests/bootstrap.php b/src/Bundle/ChillMainBundle/Tests/bootstrap.php index 0eb126c4f..de8d848cc 100644 --- a/src/Bundle/ChillMainBundle/Tests/bootstrap.php +++ b/src/Bundle/ChillMainBundle/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/ChillMainBundle/Timeline/TimelineBuilder.php b/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php index abba8715b..fd73c5b40 100644 --- a/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php +++ b/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Timeline; use DateTime; diff --git a/src/Bundle/ChillMainBundle/Timeline/TimelineProviderInterface.php b/src/Bundle/ChillMainBundle/Timeline/TimelineProviderInterface.php index dda0a2a32..33f6a8417 100644 --- a/src/Bundle/ChillMainBundle/Timeline/TimelineProviderInterface.php +++ b/src/Bundle/ChillMainBundle/Timeline/TimelineProviderInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Timeline; use LogicException; diff --git a/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php b/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php index 42f8cd192..ac48c87d1 100644 --- a/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php +++ b/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Timeline; use function strtr; diff --git a/src/Bundle/ChillMainBundle/Util/CountriesInfo.php b/src/Bundle/ChillMainBundle/Util/CountriesInfo.php index dcab6afbb..97b296e5c 100644 --- a/src/Bundle/ChillMainBundle/Util/CountriesInfo.php +++ b/src/Bundle/ChillMainBundle/Util/CountriesInfo.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Util; use UnexpectedValueException; diff --git a/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php b/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php index 387a2ba3d..16a9cab65 100644 --- a/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php +++ b/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Util; use DateTimeImmutable; diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php b/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php index 86a53412c..9ed9019a7 100644 --- a/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php +++ b/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validation\Constraint; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php b/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php index 4e576db74..84b12e132 100644 --- a/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php +++ b/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validation\Constraint; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php b/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php index 3944d3ac2..f3b3afc79 100644 --- a/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php +++ b/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validation\Constraint; use Chill\MainBundle\Validation\Validator\UserUniqueEmailAndUsername; diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php b/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php index c32bc2000..b7fc47d99 100644 --- a/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php +++ b/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validation\Validator; use Chill\MainBundle\Entity\RoleScope; @@ -60,7 +69,7 @@ class RoleScopeScopePresence extends ConstraintValidator //if the role scope should have a scope if ( - !in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes()) + !in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true) && $value->getScope() === null ) { $this->context->buildViolation($constraint->messagePresenceRequired) @@ -69,7 +78,7 @@ class RoleScopeScopePresence extends ConstraintValidator $this->logger->debug('the role scope should have a scope, but scope is null. Violation build.'); } elseif // if the scope should be null ( - in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes()) + in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true) && null !== $value->getScope() ) { $this->context->buildViolation($constraint->messageNullRequired) diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php b/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php index 3d38889d9..b4e6ed2ca 100644 --- a/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php +++ b/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validation\Validator; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php b/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php index d5346090e..ae10adb9d 100644 --- a/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php +++ b/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validation\Validator; use Chill\MainBundle\Phonenumber\PhonenumberHelper; diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php index 181f32c81..59aedc3a6 100644 --- a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php +++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validator\Constraints\Entity; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php index d3e9d7245..d0e1d16b0 100644 --- a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php +++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validator\Constraints\Entity; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php index f2be41ddb..cdd6e4762 100644 --- a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php +++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validator\Constraints\Export; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php index af1fb68f6..53adf3d28 100644 --- a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php +++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\MainBundle\Validator\Constraints\Export; use Chill\MainBundle\Export\ExportElementValidatedInterface; diff --git a/src/Bundle/ChillMainBundle/migrations/Version20141128194409.php b/src/Bundle/ChillMainBundle/migrations/Version20141128194409.php index 900712c0d..98c5404b9 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20141128194409.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20141128194409.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Main; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillMainBundle/migrations/Version20150821105642.php b/src/Bundle/ChillMainBundle/migrations/Version20150821105642.php index d04dfa4e0..d43d7e2f9 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20150821105642.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20150821105642.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Main; use Doctrine\DBAL\Schema\Schema; @@ -33,7 +42,7 @@ class Version20150821105642 extends AbstractMigration implements \Symfony\Compon public function down(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('ALTER TABLE group_centers DROP CONSTRAINT FK_A14D8F3D447BBB3B'); $this->addSql('DROP INDEX IDX_A14D8F3D447BBB3B'); @@ -135,7 +144,7 @@ class Version20150821105642 extends AbstractMigration implements \Symfony\Compon 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 group_centers ADD permissionsGroup_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE group_centers ADD CONSTRAINT FK_A14D8F3D447BBB3B FOREIGN KEY (permissionsGroup_id) REFERENCES permission_groups (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); diff --git a/src/Bundle/ChillMainBundle/migrations/Version20150821122935.php b/src/Bundle/ChillMainBundle/migrations/Version20150821122935.php index dce99a7a2..75f44fd9e 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20150821122935.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20150821122935.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Main; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillMainBundle/migrations/Version20160310122322.php b/src/Bundle/ChillMainBundle/migrations/Version20160310122322.php index 100be7151..60e6d4ab6 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20160310122322.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20160310122322.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Main; use Doctrine\DBAL\Schema\Schema; @@ -19,7 +28,7 @@ class Version20160310122322 extends AbstractMigration { public function down(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('ALTER TABLE chill_main_address ' . 'DROP CONSTRAINT FK_165051F6EECBFDF1'); @@ -31,7 +40,7 @@ class Version20160310122322 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 chill_main_address_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE chill_main_postal_code_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodLinkedWithSocialIssuesEntityInterface.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodLinkedWithSocialIssuesEntityInterface.php index c281ff087..11be05d25 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodLinkedWithSocialIssuesEntityInterface.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodLinkedWithSocialIssuesEntityInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\AccompanyingPeriod\SocialIssueConsistency; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php index 007e445d9..12ceab1d2 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\AccompanyingPeriod\SocialIssueConsistency; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestion.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestion.php index 7f484d807..c38a99999 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestion.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestion.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\AccompanyingPeriod\Suggestion; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestionInterface.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestionInterface.php index 84c0f90cc..7ce7010ef 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestionInterface.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Suggestion/ReferralsSuggestionInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\AccompanyingPeriod\Suggestion; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php b/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php index da0071b09..c0940174f 100644 --- a/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php +++ b/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Actions; use Symfony\Component\EventDispatcher\Event; diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php index 8b6b1967a..59e3814f6 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Actions\Remove; use Chill\PersonBundle\Actions\ActionEvent; @@ -82,7 +91,7 @@ class PersonMove foreach ($metadata->getAssociationMappings() as $field => $mapping) { if (Person::class === $mapping['targetEntity']) { - if (in_array($metadata->getName(), $toDelete)) { + if (in_array($metadata->getName(), $toDelete, true)) { $sql = $this->createDeleteSQL($metadata, $from, $field); $event = new ActionEvent( $from->getId(), diff --git a/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php b/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php index d3c9669e0..89a6e7443 100644 --- a/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php +++ b/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\CRUD\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/ChillPersonBundle.php b/src/Bundle/ChillPersonBundle/ChillPersonBundle.php index 6041fa7ed..ca55399c9 100644 --- a/src/Bundle/ChillPersonBundle/ChillPersonBundle.php +++ b/src/Bundle/ChillPersonBundle/ChillPersonBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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; use Chill\PersonBundle\DependencyInjection\CompilerPass\AccompanyingPeriodTimelineCompilerPass; diff --git a/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php b/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php index d45522871..ed0dedf1f 100644 --- a/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php +++ b/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Command; use Chill\PersonBundle\Actions\Remove\PersonMove; diff --git a/src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php b/src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php index d8da05328..346f7263f 100644 --- a/src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php +++ b/src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Command; use Chill\CustomFieldsBundle\Service\CustomFieldProvider; @@ -273,7 +282,7 @@ final class ImportPeopleFromCSVCommand extends Command protected function createPerson(array $row, array $headers): Person { // trying to get the opening date - $openingDateString = trim($row[array_search('opening_date', $headers)]); + $openingDateString = trim($row[array_search('opening_date', $headers, true)]); $openingDate = $this->processDate($openingDateString, $this->input->getOption('opening_date_format')); // @TODO: Fix the constructor parameter, $openingDate does not exists. @@ -358,7 +367,7 @@ final class ImportPeopleFromCSVCommand extends Command } // handle address - if (in_array('postalcode', $headers)) { + if (in_array('postalcode', $headers, true)) { if (!empty($postalCodeValue)) { $address = new Address(); $postalCode = $this->guessPostalCode($postalCodeValue, $localityValue ?? ''); @@ -369,7 +378,7 @@ final class ImportPeopleFromCSVCommand extends Command $address->setPostcode($postalCode); - if (in_array('street1', $headers)) { + if (in_array('street1', $headers, true)) { $address->setStreetAddress1($street1Value); } $address->setValidFrom(new DateTime('today')); @@ -481,7 +490,7 @@ final class ImportPeopleFromCSVCommand extends Command return $this->em->getRepository(Center::class)->find($this->input->getOption('force-center')); } - $columnCenter = array_search('center', $headers); + $columnCenter = array_search('center', $headers, true); $centerName = trim($row[$columnCenter]); try { @@ -775,7 +784,7 @@ final class ImportPeopleFromCSVCommand extends Command $resource = fopen($filename, 'rb'); - if (false == $resource) { + if (false === $resource) { throw new RuntimeException("The file '{$filename}' could not be opened."); } @@ -870,7 +879,7 @@ final class ImportPeopleFromCSVCommand extends Command // we could guess an answer ! $this->logger->info('This question accept multiple answers'); $this->cacheAnswersMapping[$cf->getSlug()][$value] = - false == $view->vars['multiple'] ? $values[0] : [$values[0]]; + false === $view->vars['multiple'] ? $values[0] : [$values[0]]; $this->logger->info(sprintf( "Guessed that value '%s' match with key '%s' " . 'because the CSV and the label are equals.', @@ -1097,8 +1106,8 @@ final class ImportPeopleFromCSVCommand extends Command foreach ($firstRow as $key => $content) { $content = trim($content); - if (in_array($content, $matchedColumnHeaders)) { - $information = array_search($content, $matchedColumnHeaders); + if (in_array($content, $matchedColumnHeaders, true)) { + $information = array_search($content, $matchedColumnHeaders, true); $headers[$key] = $information; $this->logger->notice("Matched {$information} on column {$key} (displayed in the file as '{$content}')"); } else { diff --git a/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php b/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php index 46442c5de..ef879b887 100644 --- a/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php +++ b/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Config; use function count; diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php index c8e0ec558..360ae76c5 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index 7af13ccd4..c0f403b20 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php index 5383305ce..3f8fe0824 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php index bb85036a9..114c6ac48 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\Pagination\PaginatorFactory; diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php index 54639b6cf..1b1f21a79 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/Controller/AdminClosingMotiveController.php b/src/Bundle/ChillPersonBundle/Controller/AdminClosingMotiveController.php index ac3ef7506..2e6df418a 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AdminClosingMotiveController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AdminClosingMotiveController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/AdminController.php b/src/Bundle/ChillPersonBundle/Controller/AdminController.php index 4496fc5a8..93b80c07f 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AdminController.php +++ b/src/Bundle/ChillPersonBundle/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\PersonBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php b/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php index 4f0402402..1dbf1ce8c 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php index 57e19bf75..867f0e8c2 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php index ecee951d3..b86dd243b 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\Entity\Address; @@ -146,7 +155,7 @@ class HouseholdController extends AbstractController $cond = true; for ($i = 0; count($addresses) - 1 > $i; ++$i) { - if ($addresses[$i]->getValidFrom() != $addresses[$i + 1]->getValidTo()) { + if ($addresses[$i]->getValidFrom() !== $addresses[$i + 1]->getValidTo()) { $cond = false; } } diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php index c9821df06..7bb32bda4 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/OpeningApiController.php b/src/Bundle/ChillPersonBundle/Controller/OpeningApiController.php index 78f85b952..19bf7607b 100644 --- a/src/Bundle/ChillPersonBundle/Controller/OpeningApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/OpeningApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php index 8b4add8c3..439f8434d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php index 2385eaf39..20daf483b 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index d66815f61..14cc4942d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; @@ -361,7 +370,7 @@ final class PersonController extends AbstractController $ignoredFields = ['form_status', '_token']; foreach ($request->request->all()[$form->getName()] as $field => $value) { - if (in_array($field, $ignoredFields)) { + if (in_array($field, $ignoredFields, true)) { continue; } $fields[$field] = is_array($value) ? diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php index 7f025323a..a70b7a7c9 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\ActivityBundle\Entity\Activity; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php index 398d352d7..268c87378 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php index 272ef02e4..43226df4c 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller\SocialWork; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php index 14225f812..edd7f5a8f 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller\SocialWork; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php index 2500d87cd..b2f0c0bec 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller\SocialWork; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php index d83fe2c1f..907635df8 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller\SocialWork; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php index b07c95c95..e95447cdf 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller\SocialWork; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php index 019dff4d7..d309e86db 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\Pagination\PaginatorFactory; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php index 575d493ee..03f92249a 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php index 17d7181c5..bea35f9ab 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php index 9791336b6..e6d6276a9 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/Helper/PersonRandomHelper.php b/src/Bundle/ChillPersonBundle/DataFixtures/Helper/PersonRandomHelper.php index d3872a64b..49bb489f1 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/Helper/PersonRandomHelper.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/Helper/PersonRandomHelper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\Helper; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/Helper/RandomPersonHelperTrait.php b/src/Bundle/ChillPersonBundle/DataFixtures/Helper/RandomPersonHelperTrait.php index b0a337374..97426bcdb 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/Helper/RandomPersonHelperTrait.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/Helper/RandomPersonHelperTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\Helper; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodClosingMotive.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodClosingMotive.php index e105e15e7..5774704cb 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodClosingMotive.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodClosingMotive.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodNotifications.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodNotifications.php index 3db1c264f..9b64193d1 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodNotifications.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodNotifications.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadAbstractNotificationsTrait; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodOrigin.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodOrigin.php index 1834a1e73..cd78fbc46 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodOrigin.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodOrigin.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\PersonBundle\Entity\AccompanyingPeriod\Origin; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php index 6f4d2c1b4..9065adedc 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php index 6554dc139..9a5d75c10 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHouseholdPosition.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHouseholdPosition.php index e12c88332..875a307bf 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHouseholdPosition.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHouseholdPosition.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\PersonBundle\Entity\Household\Position; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadMaritalStatus.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadMaritalStatus.php index 65d428436..2a2dd94db 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadMaritalStatus.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadMaritalStatus.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\PersonBundle\Entity\MaritalStatus; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php index edd1c1c35..9df8786c5 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadPostalCodes; diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPersonACL.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPersonACL.php index a0418e02b..4fa29b4d8 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPersonACL.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPersonACL.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadPermissionsGroup; diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index 69bd90f53..37e5105eb 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/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 Chill\MainBundle\DependencyInjection\MissingBundleException; diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php b/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php index a6ce583f2..e6b2a93f6 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\CompilerPass; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; @@ -49,7 +58,7 @@ class AccompanyingPeriodTimelineCompilerPass implements CompilerPassInterface $definition->removeMethodCall('addProvider'); - if (false === in_array($arguments[1], $definitions)) { + if (false === in_array($arguments[1], $definitions, true)) { $definition->addMethodCall($method, $arguments); } } diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillPersonBundle/DependencyInjection/Configuration.php index 5fb496b09..8c353756e 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillPersonBundle/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\PersonBundle\DependencyInjection; use DateInterval; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php index c9b7a6ca2..25a81ebd4 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartAddressId.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartAddressId.php index 698bb65ff..c633d745b 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartAddressId.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartAddressId.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryCode.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryCode.php index 5e558eac3..240721186 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryCode.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryCode.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryId.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryId.php index b0379b934..8c6977898 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryId.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryId.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryName.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryName.php index 7eb1408fa..1fd47dfda 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryName.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartCountryName.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartIsNoAddress.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartIsNoAddress.php index 0676659d3..bdf219eb8 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartIsNoAddress.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartIsNoAddress.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeCode.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeCode.php index eb786df22..0fe9d4ca4 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeCode.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeCode.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeId.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeId.php index 0f9885b8b..9b03c956e 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeId.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeId.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeLabel.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeLabel.php index 3814ab5a3..1bc36c6c9 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeLabel.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartPostCodeLabel.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress1.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress1.php index 30d87f452..995352708 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress1.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress1.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress2.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress2.php index e52ce38ba..03fdff1e4 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress2.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartStreetAddress2.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartValidFrom.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartValidFrom.php index 43b271960..88fd035c7 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartValidFrom.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart/AddressPartValidFrom.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Doctrine\DQL\AddressPart; use Chill\PersonBundle\Doctrine\DQL\AddressPart; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index f85e8d08f..db30e4324 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; @@ -541,7 +550,7 @@ class AccompanyingPeriod implements public function getCenters(): ?iterable { foreach ($this->getPersons() as $person) { - if (!in_array($person->getCenter(), $centers ?? []) + if (!in_array($person->getCenter(), $centers ?? [], true) && null !== $person->getCenter()) { $centers[] = $person->getCenter(); } @@ -587,11 +596,11 @@ class AccompanyingPeriod implements public function getGroupSequence() { - if ($this->getStep() == self::STEP_DRAFT) { + if ($this->getStep() === self::STEP_DRAFT) { return [[self::STEP_DRAFT]]; } - if ($this->getStep() == self::STEP_CONFIRMED) { + if ($this->getStep() === self::STEP_CONFIRMED) { return [[self::STEP_DRAFT, self::STEP_CONFIRMED]]; } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index 03c09e1db..5d2142679 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index 63da53ebd..a65432801 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php index d51534240..91bf74f0a 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php index 0a40be12b..e94467bc0 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\SocialWork\Goal; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php index b78fcccde..1f06a80ec 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use Doctrine\Common\Collections\ArrayCollection; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Comment.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Comment.php index 758893b93..5d8c25ae0 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Comment.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Comment.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Origin.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Origin.php index 402f9d69d..0679933b4 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Origin.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Origin.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\AccompanyingPeriod; use DateTimeImmutable; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php index 8b3d09cbe..d55478a21 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/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\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php index 191752b97..33b9f276b 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; use DateTimeImmutable; @@ -123,7 +132,7 @@ class AccompanyingPeriodParticipation private function checkSameStartEnd() { - if ($this->endDate == $this->startDate) { + if ($this->endDate === $this->startDate) { $this->accompanyingPeriod->removeParticipation($this); } } diff --git a/src/Bundle/ChillPersonBundle/Entity/HasPerson.php b/src/Bundle/ChillPersonBundle/Entity/HasPerson.php index 97b170009..cd7ae153f 100644 --- a/src/Bundle/ChillPersonBundle/Entity/HasPerson.php +++ b/src/Bundle/ChillPersonBundle/Entity/HasPerson.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; /** diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php index f561107ca..1363af5b6 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Household; use Chill\MainBundle\Entity\Address; @@ -419,7 +428,7 @@ class Household $cond = true; for ($i = 0; count($addresses) - 1 > $i; ++$i) { - if ($addresses[$i]->getValidFrom() != $addresses[$i + 1]->getValidTo()) { + if ($addresses[$i]->getValidFrom() !== $addresses[$i + 1]->getValidTo()) { $cond = false; $context->buildViolation('The address are not sequentials. The validFrom date of one address should be equal to the validTo date of the previous address.') ->atPath('addresses') diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php b/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php index 403912328..c125d5295 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Household; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php b/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php index f23f325f9..1346cfbbe 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Household; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Position.php b/src/Bundle/ChillPersonBundle/Entity/Household/Position.php index bd297c09e..2b2c9942b 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/Position.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/Position.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Household; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php b/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php index 02463e5d6..9f54baee5 100644 --- a/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php +++ b/src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index d6f9dd436..f58cee747 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -778,11 +778,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI $dateA = $a->getOpeningDate(); $dateB = $b->getOpeningDate(); - if ($dateA == $dateB) { + if ($dateA === $dateB) { $dateEA = $a->getClosingDate(); $dateEB = $b->getClosingDate(); - if ($dateEA == $dateEB) { + if ($dateEA === $dateEB) { return 0; } @@ -1360,7 +1360,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI foreach ($this->addresses as $ad) { $validDate = $ad->getValidFrom()->format('Y-m-d'); - if (in_array($validDate, $validYMDDates)) { + if (in_array($validDate, $validYMDDates, true)) { return true; } $validYMDDates[] = $validDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCurrentAddress.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCurrentAddress.php index e9b7c8ae2..9e05269d8 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCurrentAddress.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCurrentAddress.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Person; use Chill\MainBundle\Entity\Address; diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php index 15f0d8eb5..bacc6e3df 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php index 0d83dcf6f..fd54b62e1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonPhone.php b/src/Bundle/ChillPersonBundle/Entity/PersonPhone.php index 12487f74a..a869aa597 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonPhone.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonPhone.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity; use DateTime; diff --git a/src/Bundle/ChillPersonBundle/Entity/Relationships/Relation.php b/src/Bundle/ChillPersonBundle/Entity/Relationships/Relation.php index 0761ba9fa..3a4c45f0f 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Relationships/Relation.php +++ b/src/Bundle/ChillPersonBundle/Entity/Relationships/Relation.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Relationships; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php b/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php index 57470acfb..6058fa2e9 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php +++ b/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Relationships; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php index 5c7f5bab1..e5dd99dcb 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\SocialWork; use DateInterval; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Goal.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Goal.php index 5a7265944..9b343f4bf 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Goal.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Goal.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\SocialWork; use DateTimeInterface; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php index 91212e30a..0894dbf1f 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/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\PersonBundle\Entity\SocialWork; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php index 4cde849c9..870ebe0b9 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\SocialWork; use DateInterval; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php index 9e862fad6..779b36b81 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\SocialWork; use DateTimeInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/AbstractAccompanyingPeriodExportElement.php b/src/Bundle/ChillPersonBundle/Export/AbstractAccompanyingPeriodExportElement.php index e12394ad1..81cd9c721 100644 --- a/src/Bundle/ChillPersonBundle/Export/AbstractAccompanyingPeriodExportElement.php +++ b/src/Bundle/ChillPersonBundle/Export/AbstractAccompanyingPeriodExportElement.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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; use Doctrine\ORM\QueryBuilder; @@ -23,7 +32,7 @@ class AbstractAccompanyingPeriodExportElement protected function addJoinAccompanyingPeriod(QueryBuilder $query): void { if (false === $this->havingAccompanyingPeriodInJoin($query)) { - if (false === in_array('person', $query->getAllAliases())) { + if (false === in_array('person', $query->getAllAliases(), true)) { throw new LogicException("the alias 'person' does not exists in " . 'query builder'); } @@ -39,6 +48,6 @@ class AbstractAccompanyingPeriodExportElement { $joins = $query->getDQLPart('join') ?? []; - return in_array('accompanying_period', $query->getAllAliases()); + return in_array('accompanying_period', $query->getAllAliases(), true); } } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php index e72c1f977..e04a4877e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Aggregator; use Chill\MainBundle\Export\AggregatorInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php index e6c3f3749..5cc243467 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Aggregator; use Chill\MainBundle\Export\AggregatorInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php index 9e9e2cc26..0de785e48 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Aggregator; use Chill\MainBundle\Export\AggregatorInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php index 3f9e71ebc..e607356fd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Aggregator; use Chill\MainBundle\Export\AggregatorInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Declarations.php b/src/Bundle/ChillPersonBundle/Export/Declarations.php index 8d2b9e951..c89d2bad7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Declarations.php +++ b/src/Bundle/ChillPersonBundle/Export/Declarations.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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; /** diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php index 4376dde21..e6c8c583d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/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/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php index 0ea154412..6c02f4033 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php @@ -221,7 +221,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface default: // for fields which are associated with person - if (in_array($key, $this->fields)) { + if (in_array($key, $this->fields, true)) { return static function ($value) use ($key) { if ('_header' === $value) { return strtolower($key); @@ -240,7 +240,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface $fields = []; foreach ($data['fields'] as $key) { - if (in_array($key, $this->fields)) { + if (in_array($key, $this->fields, true)) { $fields[] = $key; } } @@ -277,7 +277,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface $qb = $this->entityManager->createQueryBuilder(); foreach ($this->fields as $f) { - if (in_array($f, $data['fields'])) { + if (in_array($f, $data['fields'], true)) { switch ($f) { case 'countryOfBirth': case 'nationality': diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index cbe472433..28b93277a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\DirectExportInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodClosingFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodClosingFilter.php index 68f613896..3110c1632 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodClosingFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodClosingFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\FilterInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodFilter.php index c52f192d7..a8d62a888 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\FilterInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodOpeningFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodOpeningFilter.php index a821cd3d3..9d91e5e2f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodOpeningFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodOpeningFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\FilterInterface; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php index efd78af8c..7bed6cf12 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/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/src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php index 5079f6d37..b1c26f6aa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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; @@ -48,7 +57,7 @@ class GenderFilter implements $where = $qb->getDQLPart('where'); $isIn = $qb->expr()->in('person.gender', ':person_gender'); - if (!in_array('null', $data['accepted_genders'])) { + if (!in_array('null', $data['accepted_genders'], true)) { $clause = $isIn; } else { $clause = $qb->expr()->orX($isIn, $qb->expr()->isNull('person.gender')); diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/NationalityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/NationalityFilter.php index 3ed26b58e..43be606d4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/NationalityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/NationalityFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Entity\Country; diff --git a/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php b/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php index d88277751..d1cbd23af 100644 --- a/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php +++ b/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php index 618403a7d..453efc904 100644 --- a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php +++ b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\ChoiceLoader; use Chill\PersonBundle\Entity\Person; @@ -75,7 +84,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface $person = $this->personRepository->find($value); if ($this->hasCenterFilter() - && !in_array($person->getCenter(), $this->centers)) { + && !in_array($person->getCenter(), $this->centers, true)) { throw new RuntimeException('chosen a person not in correct center'); } diff --git a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php index ba8544cf0..152d2ddb4 100644 --- a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php +++ b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonAltNameDataMapper.php b/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonAltNameDataMapper.php index b817b960c..865cb850c 100644 --- a/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonAltNameDataMapper.php +++ b/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonAltNameDataMapper.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\DataMapper; use Chill\PersonBundle\Entity\PersonAltName; diff --git a/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php b/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php index 0198b3b8d..69badeb74 100644 --- a/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php +++ b/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\DataTransformer; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php index 297a58a57..75ccbec06 100644 --- a/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php +++ b/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\MainBundle\Form\Type\ChillDateType; diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdType.php index d628ab47f..a24810fdd 100644 --- a/src/Bundle/ChillPersonBundle/Form/HouseholdType.php +++ b/src/Bundle/ChillPersonBundle/Form/HouseholdType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\MainBundle\Form\Type\ChillDateType; diff --git a/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php b/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php index 2387daa9f..5cddaff1f 100644 --- a/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php +++ b/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php b/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php index 82fb5d3a9..8d1342c62 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php b/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php index e0d828c07..140a8fc8d 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\PersonBundle\Form\Type\PickPersonType; diff --git a/src/Bundle/ChillPersonBundle/Form/PersonType.php b/src/Bundle/ChillPersonBundle/Form/PersonType.php index 7c5200dd3..18db354c7 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form; use Chill\CustomFieldsBundle\Form\Type\CustomFieldType; diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php index a23a065d7..359e5b367 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\SocialWork; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php index bd5c03584..d5ed3f642 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\SocialWork; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php index 85f240792..ee18b7eed 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\SocialWork; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php index 9f340de46..b72e49d59 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\SocialWork; use Chill\MainBundle\Form\Type\TranslatableStringFormType; diff --git a/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php b/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php index 5f209e8a7..49b0f56e1 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\Type; use Chill\MainBundle\Templating\Entity\ChillEntityRenderExtension; diff --git a/src/Bundle/ChillPersonBundle/Form/Type/GenderType.php b/src/Bundle/ChillPersonBundle/Form/Type/GenderType.php index 0949fce0b..f8e5e1b26 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/GenderType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/GenderType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\Type; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php b/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php index 5e0b7e14e..76108a80a 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\Type; use Chill\MainBundle\Templating\TranslatableStringHelper; diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php b/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php index 8150551c9..5abff8d58 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\Type; use Chill\MainBundle\Phonenumber\PhonenumberHelper; diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php index 7f061bc1c..d42e9ad55 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\Type; use Chill\MainBundle\Entity\Center; @@ -162,7 +171,7 @@ class PickPersonType 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/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php index 1e09c9b94..5be758e62 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Form\Type; use Chill\MainBundle\Form\Type\DataTransformer\ObjectToIdTransformer; diff --git a/src/Bundle/ChillPersonBundle/Household/MembersEditor.php b/src/Bundle/ChillPersonBundle/Household/MembersEditor.php index 2a5254889..d85e0cdc3 100644 --- a/src/Bundle/ChillPersonBundle/Household/MembersEditor.php +++ b/src/Bundle/ChillPersonBundle/Household/MembersEditor.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Household; use Chill\PersonBundle\Entity\Household\Household; @@ -132,7 +141,7 @@ class MembersEditor } foreach ($this->membershipsAffected as $m) { - if (in_array(spl_object_hash($m), $this->oldMembershipsHashes)) { + if (in_array(spl_object_hash($m), $this->oldMembershipsHashes, true)) { $list->addAll($this->validator->validate($m, null, [self::VALIDATION_GROUP_AFFECTED])); } else { $list->addAll($this->validator->validate($m, null, [self::VALIDATION_GROUP_CREATED, diff --git a/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php b/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php index 884209136..ebbf2e2ba 100644 --- a/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php +++ b/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Household; use Chill\PersonBundle\Entity\Household\Household; diff --git a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php index 83394c239..2936d5e69 100644 --- a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/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\PersonBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php index 57ee8d75d..8c7c634c4 100644 --- a/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/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\PersonBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php index 7a2712be3..32433bb56 100644 --- a/src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php index 3de6d6323..cb38acadc 100644 --- a/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/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\PersonBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php index 52e2205e4..013bcbb87 100644 --- a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/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\PersonBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationRenderer.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationRenderer.php index fb3bd070b..91a3c09a2 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationRenderer.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationRenderer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Notification; use Chill\MainBundle\Entity\Notification; @@ -26,6 +35,6 @@ final class AccompanyingPeriodNotificationRenderer public function supports(Notification $notification) { - return $notification->getRelatedEntityClass() == AccompanyingPeriod::class; + return $notification->getRelatedEntityClass() === AccompanyingPeriod::class; } } diff --git a/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php b/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php index a3decb69e..1cd0eb70a 100644 --- a/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php +++ b/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Privacy; /* diff --git a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php index b74c5d250..63a1b6704 100644 --- a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php +++ b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Privacy; /* diff --git a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php index 111ba355f..15a8a3e0b 100644 --- a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php +++ b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Privacy; /* diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkGoalRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkGoalRepository.php index 4c0dd3fc4..981fc8872 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkGoalRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkGoalRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkGoal; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php index 0b6eff3c2..4b470d606 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php index 05e7c19e8..4a065541c 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\Comment; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php index 9392180e2..f450af1e7 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\Origin; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php index 339258e70..2a695db28 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/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\PersonBundle\Repository\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php index 655b3792e..8eab33489 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php index c8fd4ad30..0156d3f6a 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index d6ad39d57..ab19ace51 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php index f06812986..fafefcabd 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Household; use Chill\MainBundle\Entity\AddressReference; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepositoryInterface.php index 1323361ee..1e08aa6d0 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Household; use Chill\MainBundle\Entity\AddressReference; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php index e4bc03357..a402c4291 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Household; use Chill\PersonBundle\Entity\Household\Household; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php index 8e9b789a7..8a30de586 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Household; use Chill\PersonBundle\Entity\Household\PersonHouseholdAddress; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php index f8d264449..a174e3d35 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Household; use Chill\PersonBundle\Entity\Household\Position; diff --git a/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php b/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php index c0558ef4e..d11a47f75 100644 --- a/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\MaritalStatus; diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php index 72b2da862..a8f3ca1b8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php index 7bb46d84f..81e37eece 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\MainBundle\Search\SearchApiQuery; diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php index 5ef285e36..2f1e77335 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\PersonAltName; diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php index da650ec15..92d4e02f8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\Person; diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php index 69c02c055..e368151ca 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository; use Chill\PersonBundle\Entity\Person; @@ -127,11 +136,11 @@ final class PersonRepository implements ObjectRepository $orX = $qb->expr()->orX(); - if (in_array('mobile', $only)) { + if (in_array('mobile', $only, true)) { $orX->add($qb->expr()->like("REPLACE(p.mobilenumber, ' ', '')", ':phonenumber')); } - if (in_array('phone', $only)) { + if (in_array('phone', $only, true)) { $orX->add($qb->expr()->like("REPLACE(p.phonenumber, ' ', '')", ':phonenumber')); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php index 22a95b3ca..fadaf119c 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Relationships; use Chill\PersonBundle\Entity\Relationships\Relation; diff --git a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php index 2b2bf9136..bb408711b 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\Relationships; use Chill\PersonBundle\Entity\Relationships\Relationship; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php index ac8e4d9d3..32c120bb8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\SocialWork; use Chill\PersonBundle\Entity\SocialWork\Evaluation; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php index 211d86ba0..035c63e22 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\SocialWork; use Chill\PersonBundle\Entity\SocialWork\Goal; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php index 1dca70d1e..1c65fd6c1 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\SocialWork; use Chill\PersonBundle\Entity\SocialWork\Goal; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php index 1a8623d5e..78acc1321 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Repository\SocialWork; use Chill\PersonBundle\Entity\SocialWork\SocialAction; diff --git a/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/AppKernel.php b/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/AppKernel.php index 67e742bf1..18d2e2c41 100644 --- a/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/AppKernel.php +++ b/src/Bundle/ChillPersonBundle/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/ChillPersonBundle/Resources/test/Fixtures/App/app/autoload.php b/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/autoload.php index a2dfe7f92..6f199176e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/autoload.php +++ b/src/Bundle/ChillPersonBundle/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/ChillPersonBundle/Resources/test/Fixtures/App/web/app_dev.php b/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/web/app_dev.php index 3122a0243..cce0df8eb 100644 --- a/src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/web/app_dev.php +++ b/src/Bundle/ChillPersonBundle/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/ChillPersonBundle/Search/SearchPersonApiProvider.php b/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php index d0f7f7bba..a2e8348ff 100644 --- a/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php +++ b/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Search; use Chill\MainBundle\Search\SearchApiInterface; @@ -91,6 +100,6 @@ class SearchPersonApiProvider implements SearchApiInterface public function supportsTypes(string $pattern, array $types, array $parameters): bool { - return in_array('person', $types); + return in_array('person', $types, true); } } diff --git a/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php b/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php index f62278882..8b9b08efc 100644 --- a/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php +++ b/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Search; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php index 0e1dd493b..7da687b4c 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Security\Authorization; class HouseholdVoter diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php index c68d6c36e..aa2b142e0 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Security\Authorization; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php index 45f9c7f05..80173ad5d 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\PersonBundle\Entity\AccompanyingPeriod\Origin; @@ -15,7 +24,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** * @internal we keep this normalizer, because the property 'text' may be replace by a rendering in the future */ -class AccompanyingPeriodOriginNormalizer implements NormalizerInterface +final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface { public function normalize($origin, ?string $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php index a6f57964e..3a7307713 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php index ed1569b95..1ce3523c9 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\MainBundle\Serializer\Normalizer\DiscriminatedObjectDenormalizer; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php index 20581d365..9dea845b7 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork; @@ -55,7 +64,7 @@ class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInte ['skip' => self::class] )); - if (in_array('accompanying_period_work:edit', $context['groups'] ?? [])) { + if (in_array('accompanying_period_work:edit', $context['groups'] ?? [], true)) { $this->handleEvaluationCollection($data, $work, $format, $context); } diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php index d2304ef99..527434e50 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php @@ -152,7 +152,7 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize private function performChecks($data): void { - if (null == $data['concerned'] ?? null + if (null === $data['concerned'] ?? null && false === ·\is_array('concerned')) { throw new Exception\UnexpectedValueException("The schema does not have any key 'concerned'"); } diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php index 20366c545..3e320abb4 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\DocGeneratorBundle\Serializer\Helper\NormalizeNullValueHelper; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php index d930e2bd2..e9ed7e04d 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php index eeffc6455..9b73556be 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\PersonBundle\Entity\SocialWork\SocialAction; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php index 67ab4a491..31949761f 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Serializer\Normalizer; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php index 158de15f8..d8285fd9f 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Templating\Entity; use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 5220957cd..03062296e 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Templating\Entity; use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php index 6140b5ded..5b800ae9c 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Templating\Entity; use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface; diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php index 2b3e31159..49a420887 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Templating\Entity; use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface; diff --git a/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php b/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php index e6fe2efe3..d71bc2de8 100644 --- a/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php +++ b/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Test; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php index f6cd76b79..70a4f26f3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\AccompanyingPeriod; use Chill\MainBundle\Entity\Center; @@ -20,14 +29,14 @@ use Symfony\Component\HttpFoundation\Request; * @internal * @coversNothing */ -class AccompanyingPeriodConfidentialTest extends WebTestCase +final class AccompanyingPeriodConfidentialTest extends WebTestCase { /** * Setup before the first test of this class (see phpunit doc). */ public static function setUpBeforeClass() { - static::bootKernel(); + self::bootKernel(); } /** @@ -35,7 +44,7 @@ class AccompanyingPeriodConfidentialTest extends WebTestCase */ public function setUp() { - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'fred', 'PHP_AUTH_PW' => 'password', ]); @@ -46,8 +55,8 @@ class AccompanyingPeriodConfidentialTest extends WebTestCase $maxGenerated = 3; $maxResults = $maxGenerated * 8; - static::bootKernel(); - $em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + self::bootKernel(); + $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); @@ -95,7 +104,7 @@ class AccompanyingPeriodConfidentialTest extends WebTestCase { $period = self::$container->get(AccompanyingPeriodRepository::class) ->find($periodId); - $em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); $isConfidential = $period->isConfidential(); $step = $period->getStep(); diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php index c57f24332..54a6591b7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\AccompanyingPeriod\SocialIssueConsistency; use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface; @@ -22,7 +31,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends TestCase +final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends TestCase { public function testPrePersist() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php index b7f580f55..fb7dc39d5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Entity\Center; @@ -35,7 +44,7 @@ use function json_encode; * @internal * @coversNothing */ -class AccompanyingCourseApiControllerTest extends WebTestCase +final class AccompanyingCourseApiControllerTest extends WebTestCase { protected static EntityManagerInterface $em; @@ -50,7 +59,7 @@ class AccompanyingCourseApiControllerTest extends WebTestCase */ public static function setUpBeforeClass() { - static::bootKernel(); + self::bootKernel(); } /** @@ -58,7 +67,7 @@ class AccompanyingCourseApiControllerTest extends WebTestCase */ public function setUp() { - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); @@ -112,8 +121,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase $maxGenerated = 3; $maxResults = $maxGenerated * 8; - static::bootKernel(); - $em = static::$container->get(EntityManagerInterface::class); + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); @@ -176,8 +185,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase $maxGenerated = 3; $maxResults = $maxGenerated * 8; - static::bootKernel(); - $em = static::$container->get(EntityManagerInterface::class); + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); $qb = $em->createQueryBuilder(); @@ -237,8 +246,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase $dataLength = 2; $maxResults = 100; - static::bootKernel(); - $em = static::$container->get(EntityManagerInterface::class); + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); $qb = $em->createQueryBuilder(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php index babd55c53..1b318bcb0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Entity\Center; @@ -26,7 +35,7 @@ use function preg_match; * @internal * @coversNothing */ -class AccompanyingCourseControllerTest extends WebTestCase +final class AccompanyingCourseControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php index a086471cc..2bacc5c46 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -26,7 +35,7 @@ use function array_key_exists; * @internal * @coversNothing */ -class AccompanyingPeriodControllerTest extends WebTestCase +final class AccompanyingPeriodControllerTest extends WebTestCase { public const CLOSING_INPUT = 'chill_personbundle_accompanyingperiod[closingDate]'; @@ -54,8 +63,8 @@ class AccompanyingPeriodControllerTest extends WebTestCase */ public static function setUpBeforeClass() { - static::bootKernel(); - static::$em = static::$kernel->getContainer() + self::bootKernel(); + self::$em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); } @@ -64,12 +73,12 @@ class AccompanyingPeriodControllerTest extends WebTestCase */ public function setUp() { - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); - $center = static::$em->getRepository('ChillMainBundle:Center') + $center = self::$em->getRepository('ChillMainBundle:Center') ->findOneBy(['name' => 'Center A']); $this->person = (new Person(new DateTime('2015-01-05'))) @@ -78,8 +87,8 @@ class AccompanyingPeriodControllerTest extends WebTestCase ->setCenter($center) ->setGender(Person::MALE_GENDER); - static::$em->persist($this->person); - static::$em->flush(); + self::$em->persist($this->person); + self::$em->flush(); } /** @@ -87,10 +96,10 @@ class AccompanyingPeriodControllerTest extends WebTestCase */ public function tearDown() { - static::$em->refresh($this->person); - static::$em->remove($this->person); + self::$em->refresh($this->person); + self::$em->remove($this->person); - static::$em->flush(); + self::$em->flush(); } /** @@ -557,10 +566,10 @@ class AccompanyingPeriodControllerTest extends WebTestCase } $this->person->addAccompanyingPeriod($period); - static::$em->persist($period); + self::$em->persist($period); } - static::$em->flush(); + self::$em->flush(); } /** @@ -586,7 +595,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase */ protected function getRandomClosingMotive() { - $motives = static::$em + $motives = self::$em ->getRepository('ChillPersonBundle:AccompanyingPeriod\ClosingMotive') ->findAll(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php index 782da23d8..469b125fc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Entity\Address; @@ -30,7 +39,7 @@ use function shuffle; * @internal * @coversNothing */ -class HouseholdApiControllerTest extends WebTestCase +final class HouseholdApiControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php index 047a21888..c3c2bad00 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -24,7 +33,7 @@ use function shuffle; * @internal * @coversNothing */ -class HouseholdControllerTest extends WebTestCase +final class HouseholdControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php index 9c9dcc294..8b39998f6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a 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\ChillPersonBundle\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -32,7 +41,7 @@ use function shuffle; * @internal * @coversNothing */ -class HouseholdMemberControllerTest extends WebTestCase +final class HouseholdMemberControllerTest extends WebTestCase { use PrepareClientTrait; @@ -89,7 +98,7 @@ class HouseholdMemberControllerTest extends WebTestCase $participation = $person->getCurrentHouseholdParticipationShareHousehold(); - if (null == $participation + if (null === $participation || ( null === $participation->getEndDate() && $participation->getStartDate() <= $yesterday diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php index a06f0b980..dcd54437a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\PersonBundle\Entity\Person; @@ -16,7 +25,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonAddressControllerTest extends WebTestCase +final class PersonAddressControllerTest extends WebTestCase { /** * @var \Symfony\Component\BrowserKit\Client @@ -40,9 +49,9 @@ class PersonAddressControllerTest extends WebTestCase public static function setUpBeforeClass() { - static::bootKernel(); + self::bootKernel(); - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $center = $em->getRepository('ChillMainBundle:Center') @@ -63,15 +72,15 @@ class PersonAddressControllerTest extends WebTestCase */ public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->em = static::$kernel->getContainer() + $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $this->postalCode = $this->em->getRepository('ChillMainBundle:PostalCode') ->findOneBy(['code' => 1000]); - $this->client = static::createClient([], [ + $this->client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php index ef910a5c8..d1f19c26c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -23,7 +32,7 @@ use function shuffle; * @internal * @coversNothing */ -class PersonApiControllerTest extends WebTestCase +final class PersonApiControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index 1fa4d4e4e..8863262fb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -23,7 +32,7 @@ use function in_array; * @internal * @coversNothing */ -class PersonControllerCreateTest extends WebTestCase +final class PersonControllerCreateTest extends WebTestCase { use PrepareClientTrait; @@ -45,8 +54,8 @@ class PersonControllerCreateTest extends WebTestCase public static function tearDownAfterClass() { - static::bootKernel(); - $em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + self::bootKernel(); + $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); //remove two people created during test $jesus = $em->getRepository('ChillPersonBundle:Person') @@ -120,11 +129,11 @@ class PersonControllerCreateTest extends WebTestCase 'The gender input has three options: man, women and undefined' ); $this->assertTrue( - in_array('man', $genderType->availableOptionValues()), + in_array('man', $genderType->availableOptionValues(), true), 'gender has "homme" option' ); $this->assertTrue( - in_array('woman', $genderType->availableOptionValues()), + in_array('woman', $genderType->availableOptionValues(), true), 'gender has "femme" option' ); $this->assertFalse($genderType->hasValue(), 'The gender input is not checked'); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php index f57c30529..3729afa3d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -22,7 +31,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonControllerUpdateTest extends WebTestCase +final class PersonControllerUpdateTest extends WebTestCase { use PrepareClientTrait; @@ -51,9 +60,9 @@ class PersonControllerUpdateTest extends WebTestCase */ public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->em = static::$kernel->getContainer() + $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $center = $this->em->getRepository('ChillMainBundle:Center') @@ -126,7 +135,7 @@ class PersonControllerUpdateTest extends WebTestCase */ public function testEditPageDeniedForUnauthorizedInsideCenter() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_administrative', 'PHP_AUTH_PW' => 'password', ]); @@ -141,7 +150,7 @@ class PersonControllerUpdateTest extends WebTestCase */ public function testEditPageDeniedForUnauthorizedOutsideCenter() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center b_social', 'PHP_AUTH_PW' => 'password', ]); @@ -226,8 +235,8 @@ class PersonControllerUpdateTest extends WebTestCase 'a element .success is shown' ); - if ('birthdate' == $field || 'memo' == $field || 'countryOfBirth' == $field || 'nationality' == $field - || 'gender' == $field) { + if ('birthdate' === $field || 'memo' === $field || 'countryOfBirth' === $field || 'nationality' === $field + || 'gender' === $field) { // we do not perform test on the web page contents. } else { $this->assertGreaterThan(0, $crawler->filter('html:contains("' . $value . '")')->count()); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php index 73ff514c2..0cef3a488 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; //ini_set('memory_limit', '-1'); @@ -23,7 +32,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase +final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase { /** * @var string The url using for editing the person's information @@ -50,9 +59,9 @@ class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase */ public function setUp() { - static::bootKernel(['environment' => 'test_with_hidden_fields']); + self::bootKernel(['environment' => 'test_with_hidden_fields']); - $this->em = static::$kernel->getContainer() + $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $center = $this->em->getRepository('ChillMainBundle:Center') @@ -70,7 +79,7 @@ class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase $this->editUrl = '/en/person/' . $this->person->getId() . '/general/edit'; $this->viewUrl = '/en/person/' . $this->person->getId() . '/general'; - $this->client = static::createClient( + $this->client = self::createClient( [ 'environment' => 'test_with_hidden_fields', ], @@ -160,8 +169,8 @@ class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase 'a element .success is shown' ); - if ('birthdate' == $field || 'memo' == $field || 'countryOfBirth' == $field || 'nationality' == $field - || 'gender' == $field) { + if ('birthdate' === $field || 'memo' === $field || 'countryOfBirth' === $field || 'nationality' === $field + || 'gender' === $field) { // we do not perform test on the web page contents. } else { $this->assertGreaterThan(0, $crawler->filter('html:contains("' . $value . '")')->count()); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php index 65fda40c7..7e5f5541d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\PersonBundle\Entity\Person; @@ -16,7 +25,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonControllerViewTest extends WebTestCase +final class PersonControllerViewTest extends WebTestCase { /** * @var \Doctrine\ORM\EntityManagerInterface The entity manager @@ -35,9 +44,9 @@ class PersonControllerViewTest extends WebTestCase public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->em = static::$kernel->getContainer() + $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $center = $this->em->getRepository('ChillMainBundle:Center') @@ -69,7 +78,7 @@ class PersonControllerViewTest extends WebTestCase */ public function testViewPerson() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); @@ -93,7 +102,7 @@ class PersonControllerViewTest extends WebTestCase */ public function testViewPersonAccessDeniedForUnauthorized() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center b_social', 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php index 041075b4f..b2dce2a96 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\PersonBundle\Entity\Person; @@ -16,7 +25,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonControllerViewWithHiddenFieldsTest extends WebTestCase +final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase { /** * @var \Doctrine\ORM\EntityManagerInterface The entity manager @@ -35,9 +44,9 @@ class PersonControllerViewWithHiddenFieldsTest extends WebTestCase public function setUp() { - static::bootKernel(['environment' => 'test_with_hidden_fields']); + self::bootKernel(['environment' => 'test_with_hidden_fields']); - $this->em = static::$kernel->getContainer() + $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $center = $this->em->getRepository('ChillMainBundle:Center') @@ -70,7 +79,7 @@ class PersonControllerViewWithHiddenFieldsTest extends WebTestCase public function testViewPerson() { $this->markTestSkipped('This configuration does not allow multiple environnements'); - $client = static::createClient( + $client = self::createClient( ['environment' => 'test_with_hidden_fields'], [ 'PHP_AUTH_USER' => 'center a_social', diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php index a37632b17..d843287c9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\PersonBundle\Entity\Person; @@ -16,13 +25,13 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonDuplicateControllerViewTest extends WebTestCase +final class PersonDuplicateControllerViewTest extends WebTestCase { public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->em = static::$container + $this->em = self::$container ->get('doctrine.orm.entity_manager'); $center = $this->em->getRepository('ChillMainBundle:Center') @@ -47,7 +56,7 @@ class PersonDuplicateControllerViewTest extends WebTestCase public function testViewDuplicatePerson() { - $client = static::createClient([], [ + $client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php index d2da9298b..3ccc5dcbc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php @@ -26,7 +26,7 @@ use function random_int; * @internal * @coversNothing */ -class RelationshipApiControllerTest extends WebTestCase +final class RelationshipApiControllerTest extends WebTestCase { use PrepareClientTrait; @@ -41,13 +41,13 @@ class RelationshipApiControllerTest extends WebTestCase public function setUp() { - static::bootKernel(); + self::bootKernel(); $this->client = $this->getClientAuthenticated(); } public function personProvider(): array { - static::bootKernel(); + self::bootKernel(); $em = self::$container->get(EntityManagerInterface::class); $countPersons = $em->createQueryBuilder() ->select('count(p)') @@ -75,7 +75,7 @@ class RelationshipApiControllerTest extends WebTestCase public function relationProvider(): array { - static::bootKernel(); + self::bootKernel(); $em = self::$container->get(EntityManagerInterface::class); $countPersons = $em->createQueryBuilder() ->select('count(p)') diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php index c60f12e58..4fcc0957e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; @@ -20,7 +29,7 @@ use function json_decode; * @internal * @coversNothing */ -class SocialIssueApiControllerTest extends WebTestCase +final class SocialIssueApiControllerTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php index 7b0e4df7b..51a719d47 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource; @@ -18,7 +27,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class ResourceTest extends TestCase +final class ResourceTest extends TestCase { public function testSetResource() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php index 7bafd44be..0c226e7bd 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Entity; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -22,7 +31,7 @@ use function count; * @internal * @coversNothing */ -class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase +final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase { public function testClosingEqualOpening() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php index d033edb6a..9b4351098 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a 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\ChillPersonBundle\Tests\Entity\Household; use Chill\PersonBundle\Entity\Household\HouseholdMember; @@ -17,7 +26,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class HouseholdMemberTest extends TestCase +final class HouseholdMemberTest extends TestCase { public function testPositionDoNotSharehousehold() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php index de05adc59..e0abfb251 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Entity; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -23,7 +32,7 @@ use DateTimeImmutable; * @internal * @coversNothing */ -class PersonTest extends \PHPUnit\Framework\TestCase +final class PersonTest extends \PHPUnit\Framework\TestCase { /** * Test if the getAccompanyingPeriodsOrdered function, for periods diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php index 01ced7760..edad98558 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Entity\SocialWork; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; @@ -17,7 +26,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class SocialIssueTest extends TestCase +final class SocialIssueTest extends TestCase { public function testFindSocialIssuesAncestors() { diff --git a/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php b/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php index 7fac9220e..44fdafc00 100644 --- a/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is 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 Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\PersonAltName; use Chill\PersonBundle\EventListener\PersonEventListener; @@ -16,7 +25,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class PersonCreateEventTest extends TestCase +final class PersonCreateEventTest extends TestCase { public function generateAltNames(): iterator { diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php index e344bd784..93731b742 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Aggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; @@ -16,7 +25,7 @@ use DateTime; * @internal * @coversNothing */ -class AgeAggregatorTest extends AbstractAggregatorTest +final class AgeAggregatorTest extends AbstractAggregatorTest { /** * @var \Chill\PersonBundle\Export\Aggregator\AgeAggregator @@ -25,9 +34,9 @@ class AgeAggregatorTest extends AbstractAggregatorTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->aggregator = static::$container->get('chill.person.export.aggregator_age'); + $this->aggregator = self::$container->get('chill.person.export.aggregator_age'); } public function getAggregator() @@ -46,11 +55,11 @@ class AgeAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$container + $em = self::$container ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php index c72459466..dbcc7629c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Aggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; @@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest; * @internal * @coversNothing */ -class GenderAggregatorTest extends AbstractAggregatorTest +final class GenderAggregatorTest extends AbstractAggregatorTest { /** * @var \Chill\PersonBundle\Export\Aggregator\GenderAggregator @@ -24,9 +33,9 @@ class GenderAggregatorTest extends AbstractAggregatorTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->aggregator = static::$container->get('chill.person.export.aggregator_gender'); + $this->aggregator = self::$container->get('chill.person.export.aggregator_gender'); } public function getAggregator() @@ -43,11 +52,11 @@ class GenderAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$container + $em = self::$container ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php index 3d6bb9551..2f5fd9386 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Aggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; @@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest; * @internal * @coversNothing */ -class NationalityAggregatorTest extends AbstractAggregatorTest +final class NationalityAggregatorTest extends AbstractAggregatorTest { /** * @var \Chill\PersonBundle\Export\Aggregator\NationalityAggregator @@ -24,9 +33,9 @@ class NationalityAggregatorTest extends AbstractAggregatorTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->aggregator = static::$container->get('chill.person.export.aggregator_nationality'); + $this->aggregator = self::$container->get('chill.person.export.aggregator_nationality'); } public function getAggregator() @@ -44,11 +53,11 @@ class NationalityAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$container + $em = self::$container ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php index 18b189807..0b3a9a777 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Export; use Chill\MainBundle\Test\Export\AbstractExportTest; @@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest; * @internal * @coversNothing */ -class CountPersonTest extends AbstractExportTest +final class CountPersonTest extends AbstractExportTest { /** * @var @@ -26,9 +35,9 @@ class CountPersonTest extends AbstractExportTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->export = static::$container->get('chill.person.export.export_count_person'); + $this->export = self::$container->get('chill.person.export.export_count_person'); } public function getExport() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php index 8822d5e92..142174b5b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Export; use Chill\MainBundle\Test\Export\AbstractExportTest; @@ -19,7 +28,7 @@ use DateTime; * @internal * @coversNothing */ -class ListPersonTest extends AbstractExportTest +final class ListPersonTest extends AbstractExportTest { /** * @var ListPerson @@ -28,9 +37,9 @@ class ListPersonTest extends AbstractExportTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->export = static::$container->get('chill.person.export.list_person'); + $this->export = self::$container->get('chill.person.export.list_person'); // add a fake request with a default locale (used in translatable string) $prophet = new \Prophecy\Prophet(); @@ -38,7 +47,7 @@ class ListPersonTest extends AbstractExportTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - static::$container->get('request_stack') + self::$container->get('request_stack') ->push($request->reveal()); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php index e57a5f673..6f04ecf58 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Filter; use Chill\MainBundle\Test\Export\AbstractFilterTest; @@ -17,7 +26,7 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; * @internal * @coversNothing */ -class AccompanyingPeriodFilterTest extends AbstractFilterTest +final class AccompanyingPeriodFilterTest extends AbstractFilterTest { /** * @var \Chill\PersonBundle\Export\Filter\BirthdateFilter @@ -26,10 +35,10 @@ class AccompanyingPeriodFilterTest extends AbstractFilterTest public function setUp() { - static::bootKernel(); + self::bootKernel(); try { - $this->filter = static::$container->get('chill.person.export.filter_accompanying_period'); + $this->filter = self::$container->get('chill.person.export.filter_accompanying_period'); } catch (ServiceNotFoundException $e) { $this->markTestSkipped('The current configuration does not use accompanying_periods'); } @@ -52,11 +61,11 @@ class AccompanyingPeriodFilterTest extends AbstractFilterTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$container + $em = self::$container ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php index e5f61212e..9df550d52 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Filter; use Chill\MainBundle\Test\Export\AbstractFilterTest; @@ -16,7 +25,7 @@ use DateTime; * @internal * @coversNothing */ -class BirthdayFilterTest extends AbstractFilterTest +final class BirthdayFilterTest extends AbstractFilterTest { /** * @var \Chill\PersonBundle\Export\Filter\BirthdateFilter @@ -25,9 +34,9 @@ class BirthdayFilterTest extends AbstractFilterTest public function setUp() { - static::bootKernel(); + self::bootKernel(); - $this->filter = static::$container->get('chill.person.export.filter_birthdate'); + $this->filter = self::$container->get('chill.person.export.filter_birthdate'); } public function getFilter() @@ -47,11 +56,11 @@ class BirthdayFilterTest extends AbstractFilterTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$container + $em = self::$container ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php index 91c9e213f..db5faac64 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Export\Filter; use Chill\MainBundle\Test\Export\AbstractFilterTest; @@ -16,7 +25,7 @@ use Chill\PersonBundle\Entity\Person; * @internal * @coversNothing */ -class GenderFilterTest extends AbstractFilterTest +final class GenderFilterTest extends AbstractFilterTest { /** * @var \Chill\PersonBundle\Export\Filter\GenderFilter @@ -25,7 +34,7 @@ class GenderFilterTest extends AbstractFilterTest public function setUp() { - static::bootKernel(); + self::bootKernel(); // add a fake request with a default locale (used in translatable string) $prophet = new \Prophecy\Prophet(); @@ -33,7 +42,7 @@ class GenderFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = static::$container->get('chill.person.export.filter_gender'); + $this->filter = self::$container->get('chill.person.export.filter_gender'); } public function getFilter() @@ -58,11 +67,11 @@ class GenderFilterTest extends AbstractFilterTest public function getQueryBuilders() { - if (null === static::$kernel) { - static::bootKernel(); + if (null === self::$kernel) { + self::bootKernel(); } - $em = static::$container + $em = self::$container ->get('doctrine.orm.entity_manager'); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php index c9140e032..66d1fde2d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Form\Type; use Chill\PersonBundle\Form\Type\PickPersonType; @@ -18,7 +27,7 @@ use function count; * @internal * @coversNothing */ -class PickPersonTypeTest extends KernelTestCase +final class PickPersonTypeTest extends KernelTestCase { /** * @var \Symfony\Component\Form\FormFactoryInterface diff --git a/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php b/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php index 8f4cc18b2..d931be973 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Household; use Chill\PersonBundle\Entity\Household\Household; @@ -22,7 +31,7 @@ use function count; * @internal * @coversNothing */ -class MembersEditorTest extends TestCase +final class MembersEditorTest extends TestCase { private MembersEditorFactory $factory; diff --git a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php index 4447b2fea..27adc50b9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Search; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -17,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class PersonSearchTest extends WebTestCase +final class PersonSearchTest extends WebTestCase { public function testDefaultAccented() { @@ -229,7 +238,7 @@ class PersonSearchTest extends WebTestCase */ private function getAuthenticatedClient($username = 'center a_social') { - return static::createClient([], [ + return self::createClient([], [ 'PHP_AUTH_USER' => $username, 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php index c7ae0d4d4..dc3c6d4a6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Security\Authorization; use Chill\MainBundle\Entity\Center; @@ -24,7 +33,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; * @internal * @coversNothing */ -class PersonVoterTest extends KernelTestCase +final class PersonVoterTest extends KernelTestCase { use PrepareCenterTrait; use PrepareScopeTrait; @@ -42,8 +51,8 @@ class PersonVoterTest extends KernelTestCase public function setUp() { - static::bootKernel(); - $this->voter = static::$container + self::bootKernel(); + $this->voter = self::$container ->get('chill.person.security.authorization.person'); $this->prophet = new \Prophecy\Prophet(); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php index 75a3802c7..65c9d19ae 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Serializer\Normalizer; use Chill\PersonBundle\Entity\Household\Household; @@ -21,7 +30,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; * @internal * @coversNothing */ -class HouseholdNormalizerTest extends KernelTestCase +final class HouseholdNormalizerTest extends KernelTestCase { private ?NormalizerInterface $normalizer; diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php index 34ac0e674..f70c6491e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a 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\PersonBundle\Entity\Person; @@ -18,7 +27,7 @@ use function array_merge; * @internal * @coversNothing */ -class PersonDocGenNormalizerTest extends KernelTestCase +final class PersonDocGenNormalizerTest extends KernelTestCase { private const BLANK = [ 'firstname' => '', diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php index 349af455b..7c0fac507 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a 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\PersonBundle\Entity\Person; @@ -18,7 +27,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; * @internal * @coversNothing */ -class PersonJsonNormalizerTest extends KernelTestCase +final class PersonJsonNormalizerTest extends KernelTestCase { private NormalizerInterface $normalizer; diff --git a/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php index a10b47c94..2434a861c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Timeline; use Chill\MainBundle\Test\PrepareClientTrait; @@ -23,7 +32,7 @@ use function shuffle; * @internal * @coversNothing */ -class TimelineAccompanyingPeriodTest extends WebTestCase +final class TimelineAccompanyingPeriodTest extends WebTestCase { use PrepareClientTrait; diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php index 2b4217c3a..1a11a1c0a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Validator\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -20,7 +29,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; * @internal * @coversNothing */ -class LocationValidityValidatorTest extends ConstraintValidatorTestCase +final class LocationValidityValidatorTest extends ConstraintValidatorTestCase { public function testPeriodDoesNotContainsPersonOnAnyPerson() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php index d79112d01..2f1d01bbb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Validator\Household; use Chill\PersonBundle\Entity\Household\Household; @@ -23,7 +32,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; * @internal * @coversNothing */ -class HouseholdMembershipSequentialValidatorTest extends ConstraintValidatorTestCase +final class HouseholdMembershipSequentialValidatorTest extends ConstraintValidatorTestCase { public function testEmptyPerson() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php index aca79b011..cf7f365da 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Validator\Household; use Chill\PersonBundle\Entity\Household\Household; @@ -21,7 +30,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; * @internal * @coversNothing */ -class MaxHolderValidatorTest extends ConstraintValidatorTestCase +final class MaxHolderValidatorTest extends ConstraintValidatorTestCase { public function provideInvalidHousehold() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php index bc2e0e3cc..983f3eb0e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Validator\Person; use Chill\PersonBundle\Validator\Constraints\Person\Birthdate; @@ -20,7 +29,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; * @internal * @coversNothing */ -class BirthdateValidatorTest extends ConstraintValidatorTestCase +final class BirthdateValidatorTest extends ConstraintValidatorTestCase { public function testTomorrowInvalid() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php index 383b14e31..cf727ebec 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; * @internal * @coversNothing */ -class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase +final class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase { public function testValidateRequired() { diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php index e6ea0bb67..208af69ca 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Validator\Person; use Chill\PersonBundle\Entity\Person; @@ -21,7 +30,7 @@ use function str_repeat; * @internal * @coversNothing */ -class PersonValidationTest extends KernelTestCase +final class PersonValidationTest extends KernelTestCase { private ValidatorInterface $validator; diff --git a/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php b/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php index 8a149c7d3..c8cef5033 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php +++ b/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Tests\Workflows; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -18,7 +27,7 @@ use Symfony\Component\Workflow\Registry; * @internal * @coversNothing */ -class AccompanyingPeriodLifecycle extends KernelTestCase +final class AccompanyingPeriodLifecycle extends KernelTestCase { protected function setUp() { diff --git a/src/Bundle/ChillPersonBundle/Tests/bootstrap.php b/src/Bundle/ChillPersonBundle/Tests/bootstrap.php index 0eb126c4f..de8d848cc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/bootstrap.php +++ b/src/Bundle/ChillPersonBundle/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/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php index 41359c3a9..509f281c5 100644 --- a/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Timeline; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; @@ -72,7 +81,7 @@ abstract class AbstractTimelineAccompanyingPeriod implements TimelineProviderInt */ protected function basicFetchQuery($context, array $args) { - if (false === in_array($context, self::SUPPORTED_CONTEXTS)) { + if (false === in_array($context, self::SUPPORTED_CONTEXTS, true)) { throw new LogicException('TimelineAccompanyingPeriod is not able ' . 'to render context ' . $context); } diff --git a/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodClosing.php b/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodClosing.php index becca4ddb..425ed3e2a 100644 --- a/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodClosing.php +++ b/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodClosing.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Timeline; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodOpening.php b/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodOpening.php index e4d24fbed..521eac6a5 100644 --- a/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodOpening.php +++ b/src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodOpening.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Timeline; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php index 326e37a49..4b26df900 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\AccompanyingPeriod; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php index 275ab281f..1eb0dfe12 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php index 8c194ac41..135c5f877 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Household; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php index bedcb9621..23e5fcb6f 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Household; use Chill\MainBundle\Util\DateRangeCovering; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php index 047cacf05..def7f6062 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Household; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php index 5ddd457bb..cec84f38c 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Household; use Chill\MainBundle\Util\DateRangeCovering; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/Birthdate.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/Birthdate.php index ab0a413a5..efb5dbacc 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/Birthdate.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/Birthdate.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Person; use Symfony\Component\Validator\Constraint; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php index 25767c6c8..b09928cfc 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Person; use DateInterval; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php index 8e7b8642a..b8b69fac1 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Validator\Constraints\Person; /** diff --git a/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php b/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php index 9e755163d..891593a67 100644 --- a/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php +++ b/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Templating\Widget\WidgetInterface; diff --git a/src/Bundle/ChillPersonBundle/Widget/PersonListWidget/PersonFilteringInterface.php b/src/Bundle/ChillPersonBundle/Widget/PersonListWidget/PersonFilteringInterface.php index b3a94e19f..cf74521a2 100644 --- a/src/Bundle/ChillPersonBundle/Widget/PersonListWidget/PersonFilteringInterface.php +++ b/src/Bundle/ChillPersonBundle/Widget/PersonListWidget/PersonFilteringInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\PersonListWidget; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php b/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php index a320e57c2..cdc0aeeb1 100644 --- a/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php +++ b/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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/src/Bundle/ChillPersonBundle/migrations/Version20141129010948.php b/src/Bundle/ChillPersonBundle/migrations/Version20141129010948.php index fffc11496..91b786c7c 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20141129010948.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20141129010948.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20150212173934.php b/src/Bundle/ChillPersonBundle/migrations/Version20150212173934.php index d14368d89..0c25c52d6 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20150212173934.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20150212173934.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20150607231010.php b/src/Bundle/ChillPersonBundle/migrations/Version20150607231010.php index 2206e463f..14e233682 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20150607231010.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20150607231010.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Chill\MainBundle\Entity\Center; @@ -21,7 +30,7 @@ class Version20150607231010 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\'.' ); @@ -39,7 +48,7 @@ class Version20150607231010 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/ChillPersonBundle/migrations/Version20150811152608.php b/src/Bundle/ChillPersonBundle/migrations/Version20150811152608.php index 4d825878b..f4a79d3ae 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20150811152608.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20150811152608.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; @@ -23,7 +32,7 @@ class Version20150811152608 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\'.' ); @@ -34,7 +43,7 @@ class Version20150811152608 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/ChillPersonBundle/migrations/Version20150812110708.php b/src/Bundle/ChillPersonBundle/migrations/Version20150812110708.php index f4bfb1031..f24ab1d1c 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20150812110708.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20150812110708.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; @@ -20,7 +29,7 @@ class Version20150812110708 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\'.' ); @@ -32,7 +41,7 @@ class Version20150812110708 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/ChillPersonBundle/migrations/Version20150820113409.php b/src/Bundle/ChillPersonBundle/migrations/Version20150820113409.php index 2ae72b302..b7ac5b0c5 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20150820113409.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20150820113409.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; @@ -21,7 +30,7 @@ class Version20150820113409 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\'.' ); @@ -33,7 +42,7 @@ class Version20150820113409 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/ChillPersonBundle/migrations/Version20160310161006.php b/src/Bundle/ChillPersonBundle/migrations/Version20160310161006.php index c808b9e17..b7a8e8fcf 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20160310161006.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20160310161006.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; @@ -19,7 +28,7 @@ class Version20160310161006 extends AbstractMigration { public function down(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('DROP TABLE chill_person_persons_to_addresses'); } @@ -27,7 +36,7 @@ class Version20160310161006 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 TABLE chill_person_persons_to_addresses (' . 'person_id INT NOT NULL, ' diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php b/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php index 1b4d8f041..3e468ce22 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; @@ -37,7 +46,7 @@ class Version20160422000000 extends AbstractMigration } $this->abortIf( - count($personWithTwoAddressWithSameValidFrom) != 0, + count($personWithTwoAddressWithSameValidFrom) !== 0, 'There exists some person with multiple adress with the same validFrom' ); } diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20160818113633.php b/src/Bundle/ChillPersonBundle/migrations/Version20160818113633.php index ea8e335ef..0eee61995 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20160818113633.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20160818113633.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20160818151130.php b/src/Bundle/ChillPersonBundle/migrations/Version20160818151130.php index 5f306bd4c..825f6c973 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20160818151130.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20160818151130.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20170117131924.php b/src/Bundle/ChillPersonBundle/migrations/Version20170117131924.php index 706bd3e6d..44b80d1cb 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20170117131924.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20170117131924.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Person; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillReportBundle/ChillReportBundle.php b/src/Bundle/ChillReportBundle/ChillReportBundle.php index b0e75c8c4..6d3499282 100644 --- a/src/Bundle/ChillReportBundle/ChillReportBundle.php +++ b/src/Bundle/ChillReportBundle/ChillReportBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/Bundle/ChillReportBundle/Controller/ReportController.php b/src/Bundle/ChillReportBundle/Controller/ReportController.php index 48a1a8b21..ca7b21cf9 100644 --- a/src/Bundle/ChillReportBundle/Controller/ReportController.php +++ b/src/Bundle/ChillReportBundle/Controller/ReportController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Controller; use Chill\MainBundle\Pagination\PaginatorFactory; diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php index 5bf496e50..5b4008488 100644 --- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php +++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\DataFixtures\ORM; use Chill\CustomFieldsBundle\Entity\CustomField; diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomFieldsGroup.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomFieldsGroup.php index 1d59a9732..abe0faffd 100644 --- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomFieldsGroup.php +++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomFieldsGroup.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\DataFixtures\ORM; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReportACL.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReportACL.php index e9fa8f436..e4abec3cf 100644 --- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReportACL.php +++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReportACL.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadPermissionsGroup; @@ -50,7 +59,7 @@ class LoadReportACL extends AbstractFixture implements OrderedFixtureInterface case 'administrative': case 'direction': - if (in_array($scope->getName()['en'], ['administrative', 'social'])) { + if (in_array($scope->getName()['en'], ['administrative', 'social'], true)) { printf("denying power on %s\n", $scope->getName()['en']); break 2; // we do not want any power on social or administrative diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php index d8ae8ec3f..53b3a656e 100644 --- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php +++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\DataFixtures\ORM; use Chill\CustomFieldsBundle\Entity\CustomField; @@ -188,7 +197,7 @@ class LoadReports extends AbstractFixture implements ContainerAwareInterface, Or if ($other) { $result = ['_other' => null, '_choices' => $picked]; - if (in_array('_other', $picked)) { + if (in_array('_other', $picked, true)) { $result['_other'] = $this->faker->realText(70); } diff --git a/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php b/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php index 8e0294d43..0bd39ddfa 100644 --- a/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php +++ b/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\DependencyInjection; use Chill\CustomFieldsBundle\Form\Type\LinkedCustomFieldsType; diff --git a/src/Bundle/ChillReportBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillReportBundle/DependencyInjection/Configuration.php index 81c652be1..b20849627 100644 --- a/src/Bundle/ChillReportBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillReportBundle/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\ReportBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillReportBundle/Entity/Report.php b/src/Bundle/ChillReportBundle/Entity/Report.php index 50ed09652..103ec89c9 100644 --- a/src/Bundle/ChillReportBundle/Entity/Report.php +++ b/src/Bundle/ChillReportBundle/Entity/Report.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Entity; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php index 2164b0b5e..85bb35774 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php @@ -281,7 +281,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface default: // for fields which are associated with person - if (in_array($key, $this->fields)) { + if (in_array($key, $this->fields, true)) { return static function ($value) use ($key) { if ('_header' === $value) { return strtolower($key); @@ -300,7 +300,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface $fields = []; foreach ($data['fields'] as $key) { - if (in_array($key, $this->fields)) { + if (in_array($key, $this->fields, true)) { $fields[] = $key; } } @@ -344,7 +344,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface // process fields which are not custom fields foreach ($this->fields as $f) { // do not add fields which are not selected - if (!in_array($f, $data['fields'])) { + if (!in_array($f, $data['fields'], true)) { continue; } @@ -412,7 +412,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface // process fields which are custom fields foreach ($this->getCustomFields() as $cf) { // do not add custom fields which are not selected - if (!in_array($cf->getSlug(), $data['fields'])) { + if (!in_array($cf->getSlug(), $data['fields'], true)) { continue; } diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php b/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php index 6d01cd04a..e228f7723 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Export\Export; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; diff --git a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php index c3c244957..e2f03328f 100644 --- a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php +++ b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Export\Filter; use Chill\MainBundle\Export\FilterInterface; diff --git a/src/Bundle/ChillReportBundle/Form/ReportType.php b/src/Bundle/ChillReportBundle/Form/ReportType.php index 52efd0892..c2dc0e007 100644 --- a/src/Bundle/ChillReportBundle/Form/ReportType.php +++ b/src/Bundle/ChillReportBundle/Form/ReportType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Form; use Chill\CustomFieldsBundle\Form\Type\CustomFieldType; diff --git a/src/Bundle/ChillReportBundle/Resources/test/Fixtures/App/app/AppKernel.php b/src/Bundle/ChillReportBundle/Resources/test/Fixtures/App/app/AppKernel.php index a2293aa3c..5e8be2766 100644 --- a/src/Bundle/ChillReportBundle/Resources/test/Fixtures/App/app/AppKernel.php +++ b/src/Bundle/ChillReportBundle/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/ChillReportBundle/Resources/test/Fixtures/App/app/autoload.php b/src/Bundle/ChillReportBundle/Resources/test/Fixtures/App/app/autoload.php index a2dfe7f92..6f199176e 100644 --- a/src/Bundle/ChillReportBundle/Resources/test/Fixtures/App/app/autoload.php +++ b/src/Bundle/ChillReportBundle/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/ChillReportBundle/Search/ReportSearch.php b/src/Bundle/ChillReportBundle/Search/ReportSearch.php index 82b453812..0a8002510 100644 --- a/src/Bundle/ChillReportBundle/Search/ReportSearch.php +++ b/src/Bundle/ChillReportBundle/Search/ReportSearch.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Search; use Chill\MainBundle\Entity\Scope; diff --git a/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php b/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php index e62752897..b855a0b15 100644 --- a/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php +++ b/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Security\Authorization; use Chill\MainBundle\Entity\Center; @@ -59,7 +68,7 @@ class ReportVoter extends AbstractChillVoter implements ProvideRoleHierarchyInte if ($subject instanceof Report) { return in_array($attribute, [ self::CREATE, self::UPDATE, self::SEE, - ]); + ], true); } if ($subject instanceof Center) { diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php index 6b6186196..7af9b6b09 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Tests\Controller; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; @@ -24,7 +33,7 @@ use function in_array; * @internal * @coversNothing */ -class ReportControllerNextTest extends WebTestCase +final class ReportControllerNextTest extends WebTestCase { /** * @var CustomFieldsGroup @@ -38,9 +47,9 @@ class ReportControllerNextTest extends WebTestCase public function setUp() { - static::bootKernel(); + self::bootKernel(); // get person from fixture - $em = static::$kernel->getContainer() + $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); $this->person = $em @@ -59,7 +68,7 @@ class ReportControllerNextTest extends WebTestCase } // get custom fields group from fixture - $customFieldsGroups = static::$kernel->getContainer() + $customFieldsGroups = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup') ->findBy(['entity' => 'Chill\ReportBundle\Entity\Report']); @@ -67,7 +76,7 @@ class ReportControllerNextTest extends WebTestCase $filteredCustomFieldsGroupHouse = array_filter( $customFieldsGroups, static function (CustomFieldsGroup $group) { - return in_array('Situation de logement', $group->getName()); + return in_array('Situation de logement', $group->getName(), true); } ); $this->group = $filteredCustomFieldsGroupHouse[0]; @@ -92,7 +101,7 @@ class ReportControllerNextTest extends WebTestCase public function testUngrantedUserIsDeniedAccessOnReport() { $client = $this->getAuthenticatedClient('center b_social'); - $reports = static::$kernel->getContainer()->get('doctrine.orm.entity_manager') + $reports = self::$kernel->getContainer()->get('doctrine.orm.entity_manager') ->getRepository('ChillReportBundle:Report') ->findBy(['person' => $this->person]); $report = $reports[0]; @@ -165,7 +174,7 @@ class ReportControllerNextTest extends WebTestCase protected function getAuthenticatedClient($username = 'center a_social') { - return static::createClient([], [ + return self::createClient([], [ 'PHP_AUTH_USER' => $username, 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php index 2bb723b37..70e30cae4 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Tests\Controller; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; @@ -27,7 +36,7 @@ use function in_array; * @internal * @coversNothing */ -class ReportControllerTest extends WebTestCase +final class ReportControllerTest extends WebTestCase { public const REPORT_NAME_FIELD = 'cFGroup'; @@ -55,13 +64,13 @@ class ReportControllerTest extends WebTestCase public static function setUpBeforeClass() { - static::bootKernel(); + self::bootKernel(); - static::$em = static::$kernel->getContainer() + self::$em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); //get a random person - static::$person = static::$kernel->getContainer() + self::$person = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillPersonBundle:Person') ->findOneBy( @@ -71,13 +80,13 @@ class ReportControllerTest extends WebTestCase ] ); - if (null === static::$person) { + if (null === self::$person) { throw new RuntimeException('The expected person is not present in the database. ' . 'Did you run `php app/console doctrine:fixture:load` before launching tests ? ' . "(expecting person is 'Charline Depardieu'"); } - $customFieldsGroups = static::$kernel->getContainer() + $customFieldsGroups = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup') ->findBy(['entity' => 'Chill\ReportBundle\Entity\Report']); @@ -85,12 +94,12 @@ class ReportControllerTest extends WebTestCase $filteredCustomFieldsGroupHouse = array_filter( $customFieldsGroups, static function (CustomFieldsGroup $group) { - return in_array('Situation de logement', $group->getName()); + return in_array('Situation de logement', $group->getName(), true); } ); - static::$group = $filteredCustomFieldsGroupHouse[0]; + self::$group = $filteredCustomFieldsGroupHouse[0]; - static::$user = static::$kernel->getContainer() + self::$user = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillMainBundle:User') ->findOneBy(['username' => 'center a_social']); @@ -98,7 +107,7 @@ class ReportControllerTest extends WebTestCase public function setUp() { - static::$client = static::createClient([], [ + self::$client = self::createClient([], [ 'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_PW' => 'password', ]); @@ -111,7 +120,7 @@ class ReportControllerTest extends WebTestCase */ public function getAuthenticatedClient($username = 'center a_social') { - return static::createClient([], [ + return self::createClient([], [ 'PHP_AUTH_USER' => $username, 'PHP_AUTH_PW' => 'password', ]); @@ -203,7 +212,7 @@ class ReportControllerTest extends WebTestCase $client = $this->getAuthenticatedClient(); $crawler = $client->request('GET', sprintf( '/fr/person/%s/report/list', - static::$person->getId() + self::$person->getId() )); $this->assertTrue($client->getResponse()->isSuccessful()); @@ -212,7 +221,7 @@ class ReportControllerTest extends WebTestCase $this->assertGreaterThan(0, count($linkSee)); $this->assertRegExp(sprintf( '|/fr/person/%s/report/[0-9]*/view$|', - static::$person->getId(), + self::$person->getId(), $reportId ), $linkSee[0]->getUri()); @@ -220,7 +229,7 @@ class ReportControllerTest extends WebTestCase $this->assertGreaterThan(0, count($linkUpdate)); $this->assertRegExp(sprintf( '|/fr/person/%s/report/[0-9]*/edit$|', - static::$person->getId(), + self::$person->getId(), $reportId ), $linkUpdate[0]->getUri()); } @@ -238,7 +247,7 @@ class ReportControllerTest extends WebTestCase $client = $this->getAuthenticatedClient(); $crawlerPersonPage = $client->request('GET', sprintf( '/fr/person/%d/general', - static::$person->getId() + self::$person->getId() )); if (!$client->getResponse()->isSuccessful()) { @@ -256,7 +265,7 @@ class ReportControllerTest extends WebTestCase $this->assertContains( sprintf( '/fr/person/%d/report/select/type/for/creation', - static::$person->getId() + self::$person->getId() ), $link->getUri(), 'There is a "add a report" link in menu' @@ -293,8 +302,8 @@ class ReportControllerTest extends WebTestCase { $client = $this->getAuthenticatedClient(); $form = $this->getReportForm( - static::$person, - static::$group, + self::$person, + self::$group, $client ); //var_dump($form); @@ -319,7 +328,7 @@ class ReportControllerTest extends WebTestCase $client = $this->getAuthenticatedClient(); $crawler = $client->request( 'GET', - sprintf('/fr/person/%s/report/%s/edit', static::$person->getId(), $reportId) + sprintf('/fr/person/%s/report/%s/edit', self::$person->getId(), $reportId) ); $this->assertTrue($client->getResponse()->isSuccessful()); @@ -337,12 +346,12 @@ class ReportControllerTest extends WebTestCase $this->assertTrue($client->getResponse()->isRedirect( sprintf( '/fr/person/%s/report/%s/view', - static::$person->getId(), + self::$person->getId(), $reportId ) )); - $this->assertEquals(new DateTime('yesterday'), static::$kernel->getContainer() + $this->assertEquals(new DateTime('yesterday'), self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('ChillReportBundle:Report') ->find($reportId) @@ -371,7 +380,7 @@ class ReportControllerTest extends WebTestCase $client->followRedirect(); $this->assertRegExp( - '|/fr/person/' . static::$person->getId() . '/report/[0-9]*/view$|', + '|/fr/person/' . self::$person->getId() . '/report/[0-9]*/view$|', $client->getHistory()->current()->getUri(), "The next page is a redirection to the new report's view page" ); @@ -398,7 +407,7 @@ class ReportControllerTest extends WebTestCase $client = $this->getAuthenticatedClient(); $client->request( 'GET', - sprintf('/fr/person/%s/report/%s/view', static::$person->getId(), $reportId) + sprintf('/fr/person/%s/report/%s/view', self::$person->getId(), $reportId) ); $this->assertTrue( @@ -474,7 +483,7 @@ class ReportControllerTest extends WebTestCase $this->assertEquals( 'center a_social', - static::$user->getUsername(), + self::$user->getUsername(), 'the user field is the current user by default' ); } diff --git a/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php b/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php index fd5bccde5..b251247bb 100644 --- a/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php +++ b/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -class ChillReportExtensionTest extends KernelTestCase +final class ChillReportExtensionTest extends KernelTestCase { /* * Check if class Chill\ReportBundle\Entity\Report is in chill_custom_fields.customizables_entities @@ -23,7 +32,7 @@ class ChillReportExtensionTest extends KernelTestCase public function testDeclareReportAsCustomizable() { self::bootKernel(['environment' => 'test']); - $customizablesEntities = static::$kernel->getContainer() + $customizablesEntities = self::$kernel->getContainer() ->getParameter('chill_custom_fields.customizables_entities'); $reportFounded = false; diff --git a/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php b/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php index 229a9d848..7a747fc05 100644 --- a/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Tests\Search; use DateTime; @@ -18,7 +27,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ReportSearchTest extends WebTestCase +final class ReportSearchTest extends WebTestCase { public function testNamedSearch() { @@ -107,7 +116,7 @@ class ReportSearchTest extends WebTestCase */ private function getAuthenticatedClient($username = 'center a_social') { - return static::createClient([], [ + return self::createClient([], [ 'PHP_AUTH_USER' => $username, 'PHP_AUTH_PW' => 'password', ]); diff --git a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php index f24f9e721..2fb0fba40 100644 --- a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ReportBundle\Tests\Security\Authorization; use Chill\MainBundle\Entity\Center; @@ -23,7 +32,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; * @internal * @coversNothing */ -class ReportVoterTest extends KernelTestCase +final class ReportVoterTest extends KernelTestCase { use PrepareCenterTrait; use PrepareScopeTrait; @@ -45,8 +54,8 @@ class ReportVoterTest extends KernelTestCase public function setUp() { - static::bootKernel(); - $this->voter = static::$kernel->getContainer() + self::bootKernel(); + $this->voter = self::$kernel->getContainer() ->get('chill.report.security.authorization.report_voter'); $this->prophet = new \Prophecy\Prophet(); } diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php index 92842aaed..5acf27f53 100644 --- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillReportBundle/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\ReportBundle\Tests\Timeline; use Chill\MainBundle\Entity\Scope; @@ -23,7 +32,7 @@ use function count; * @internal * @coversNothing */ -class TimelineProviderTest extends WebTestCase +final class TimelineProviderTest extends WebTestCase { /** * @var \Doctrine\ORM\EntityManager @@ -45,12 +54,12 @@ class TimelineProviderTest extends WebTestCase */ public function setUp() { - static::bootKernel(); + self::bootKernel(); - static::$em = static::$kernel->getContainer() + self::$em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = static::$em->getRepository('ChillMainBundle:Center') + $center = self::$em->getRepository('ChillMainBundle:Center') ->findOneBy(['name' => 'Center A']); $person = (new Person(new DateTime('2015-05-01'))) @@ -58,18 +67,18 @@ class TimelineProviderTest extends WebTestCase ->setFirstName('Nelson') ->setLastName('Mandela') ->setCenter($center); - static::$em->persist($person); + self::$em->persist($person); $this->person = $person; $scopesSocial = array_filter( - static::$em + self::$em ->getRepository('ChillMainBundle:Scope') ->findAll(), static function (Scope $scope) { return $scope->getName()['en'] === 'social'; } ); $report = (new Report()) - ->setUser(static::$em->getRepository('ChillMainBundle:User') + ->setUser(self::$em->getRepository('ChillMainBundle:User') ->findOneByUsername('center a_social')) ->setDate(new DateTime('2015-05-02')) ->setPerson($this->person) @@ -78,10 +87,10 @@ class TimelineProviderTest extends WebTestCase 'house-desc' => 'blah blah', ]) ->setScope(end($scopesSocial)); - static::$em->persist($report); + self::$em->persist($report); $this->report = $report; - static::$em->flush(); + self::$em->flush(); } public function tearDown() @@ -94,7 +103,7 @@ class TimelineProviderTest extends WebTestCase public function testReportIsNotVisibleToUngrantedUsers() { - $client = static::createClient( + $client = self::createClient( [], MainTestHelper::getAuthenticatedClientOptions('center a_administrative') ); @@ -115,7 +124,7 @@ class TimelineProviderTest extends WebTestCase */ public function testTimelineReport() { - $client = static::createClient( + $client = self::createClient( [], MainTestHelper::getAuthenticatedClientOptions() ); @@ -137,7 +146,7 @@ class TimelineProviderTest extends WebTestCase public function testTimelineReportWithSummaryField() { //load the page - $client = static::createClient( + $client = self::createClient( [], MainTestHelper::getAuthenticatedClientOptions() ); @@ -177,7 +186,7 @@ class TimelineProviderTest extends WebTestCase */ private function getHousingCustomFieldsGroup() { - $groups = static::$em + $groups = self::$em ->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup') ->findAll(); diff --git a/src/Bundle/ChillReportBundle/Tests/bootstrap.php b/src/Bundle/ChillReportBundle/Tests/bootstrap.php index 0eb126c4f..de8d848cc 100644 --- a/src/Bundle/ChillReportBundle/Tests/bootstrap.php +++ b/src/Bundle/ChillReportBundle/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/ChillReportBundle/Timeline/TimelineReportProvider.php b/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php index c48ff21a4..97bca3bd4 100644 --- a/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php +++ b/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php @@ -123,7 +123,8 @@ class TimelineReportProvider implements TimelineProviderInterface foreach ($entity->getCFGroup()->getCustomFields() as $customField) { if (in_array( $customField->getSlug(), - $entity->getCFGroup()->getOptions()['summary_fields'] + $entity->getCFGroup()->getOptions()['summary_fields'], + true )) { // if we do not want to show empty values if (false === $this->showEmptyValues) { @@ -239,7 +240,7 @@ break; $askedCenters = $args['centers']; foreach ($reachableCenters as $center) { - if (false === in_array($center, $askedCenters)) { + if (false === in_array($center, $askedCenters, true)) { continue; } @@ -249,7 +250,7 @@ break; $scopeIds = []; foreach ($this->helper->getReachableScopes($this->security->getUser(), $role, $center) as $scope) { - if (in_array($scope->getId(), $scopeIds)) { + if (in_array($scope->getId(), $scopeIds, true)) { continue; } $scopeIds[] = $scope->getId(); @@ -297,7 +298,7 @@ break; $scopes = $this->helper->getReachableScopes($this->security->getUser(), $role, $args['person']->getCenter()); foreach ($scopes as $scope) { - if (in_array($scope->getId(), $parameters)) { + if (in_array($scope->getId(), $parameters, true)) { continue; } diff --git a/src/Bundle/ChillReportBundle/migrations/Version20141129012050.php b/src/Bundle/ChillReportBundle/migrations/Version20141129012050.php index 57d64f9b6..c57b7dbca 100644 --- a/src/Bundle/ChillReportBundle/migrations/Version20141129012050.php +++ b/src/Bundle/ChillReportBundle/migrations/Version20141129012050.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Report; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php index 6a45e09ce..e6b4898e2 100644 --- a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php +++ b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Report; use Chill\MainBundle\Entity\Scope; @@ -29,7 +38,7 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI 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\'.' ); @@ -52,7 +61,7 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI 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/ChillTaskBundle/ChillTaskBundle.php b/src/Bundle/ChillTaskBundle/ChillTaskBundle.php index cd3b1fdf7..f67652520 100644 --- a/src/Bundle/ChillTaskBundle/ChillTaskBundle.php +++ b/src/Bundle/ChillTaskBundle/ChillTaskBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle; use Chill\TaskBundle\DependencyInjection\Compiler\TaskWorkflowDefinitionCompilerPass; diff --git a/src/Bundle/ChillTaskBundle/Controller/TaskController.php b/src/Bundle/ChillTaskBundle/Controller/TaskController.php index 13fab75d5..7ae237957 100644 --- a/src/Bundle/ChillTaskBundle/Controller/TaskController.php +++ b/src/Bundle/ChillTaskBundle/Controller/TaskController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Controller; use Chill\TaskBundle\Entity\AbstractTask; diff --git a/src/Bundle/ChillTaskBundle/DataFixtures/ORM/LoadTaskACL.php b/src/Bundle/ChillTaskBundle/DataFixtures/ORM/LoadTaskACL.php index 378e33a48..5bcc628d6 100644 --- a/src/Bundle/ChillTaskBundle/DataFixtures/ORM/LoadTaskACL.php +++ b/src/Bundle/ChillTaskBundle/DataFixtures/ORM/LoadTaskACL.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadPermissionsGroup; @@ -47,7 +56,7 @@ class LoadTaskACL extends AbstractFixture implements OrderedFixtureInterface 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/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php b/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php index 0c73c16da..403e98a26 100644 --- a/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php +++ b/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\DependencyInjection; use Chill\TaskBundle\Security\Authorization\TaskVoter; diff --git a/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php b/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php index a3e51043c..1d751b2b3 100644 --- a/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php +++ b/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\DependencyInjection\Compiler; use Chill\TaskBundle\Event\Lifecycle\TaskLifecycleEvent; diff --git a/src/Bundle/ChillTaskBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillTaskBundle/DependencyInjection/Configuration.php index 3a43bfcc2..afe7fc6da 100644 --- a/src/Bundle/ChillTaskBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillTaskBundle/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\TaskBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php index 4d20305c0..51881c9cc 100644 --- a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Entity; use Chill\MainBundle\Entity\HasCenterInterface; diff --git a/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php b/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php index 34df011b0..e43d3bb43 100644 --- a/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Entity; use DateTime; diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index d6e918799..c2ce53e89 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Entity; use DateInterval; diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php index 788569a81..28f40db6b 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Entity\Task; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php index 5c6cd44d0..446de0b26 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Entity\Task; use Chill\TaskBundle\Entity\SingleTask; diff --git a/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php b/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php index 7bb63749a..8ddddbebe 100644 --- a/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php +++ b/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Event\Lifecycle; use Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent; diff --git a/src/Bundle/ChillTaskBundle/Event/TaskEvent.php b/src/Bundle/ChillTaskBundle/Event/TaskEvent.php index 87187643f..06859f9ea 100644 --- a/src/Bundle/ChillTaskBundle/Event/TaskEvent.php +++ b/src/Bundle/ChillTaskBundle/Event/TaskEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Event; use Chill\TaskBundle\Entity\AbstractTask; diff --git a/src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php b/src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php index 7ff66c476..b10e867ff 100644 --- a/src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php +++ b/src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Event\UI; use Chill\TaskBundle\Entity\AbstractTask; diff --git a/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php b/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php index 3613f03c8..5ced64e5c 100644 --- a/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php +++ b/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Form; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php index d97980efe..2f33ca01f 100644 --- a/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php +++ b/src/Bundle/ChillTaskBundle/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\TaskBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php index c25f181e8..418d524ca 100644 --- a/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php +++ b/src/Bundle/ChillTaskBundle/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\TaskBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php index 94cb94d29..9ebab03e7 100644 --- a/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillTaskBundle/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\TaskBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php index 04ce82c77..76ebb9e1c 100644 --- a/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Repository; /** diff --git a/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php index fc2c6e885..921acf89a 100644 --- a/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Repository; /** diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php index fc9480a91..f1e19bc2f 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Repository; use Chill\PersonBundle\Entity\AccompanyingPeriod; diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php index d516da094..a93b79c19 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Repository; use Chill\MainBundle\Entity\Center; diff --git a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php index e5109e23f..b7f8d6654 100644 --- a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php +++ b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Security\Authorization; use Symfony\Component\EventDispatcher\Event; diff --git a/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php b/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php index 98c41edf3..e45bf481d 100644 --- a/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php +++ b/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Templating; use Chill\TaskBundle\Entity\AbstractTask; diff --git a/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php b/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php index 6461c23e5..775226560 100644 --- a/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php +++ b/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Templating\UI; use Chill\MainBundle\Entity\User; diff --git a/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php b/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php index 8060d18aa..caa4cbf0b 100644 --- a/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php +++ b/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Tests\Controller; use Chill\MainBundle\Entity\Center; @@ -20,7 +29,7 @@ use function array_rand; * @internal * @coversNothing */ -class SingleTaskControllerTest extends WebTestCase +final class SingleTaskControllerTest extends WebTestCase { /** * @var Faker\Generator @@ -35,7 +44,7 @@ class SingleTaskControllerTest extends WebTestCase public function testNew() { - $client = static::createClient( + $client = self::createClient( [], TestHelper::getAuthenticatedClientOptions() ); diff --git a/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php b/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php index 67c775fc2..fb4cd77e2 100644 --- a/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php +++ b/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,6 +24,6 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class TaskControllerTest extends WebTestCase +final class TaskControllerTest extends WebTestCase { } diff --git a/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php b/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php index 4644efb40..1457f132b 100644 --- a/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php +++ b/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Timeline; use Chill\MainBundle\Timeline\TimelineProviderInterface; diff --git a/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php b/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php index 7478e67cf..7f73023b5 100644 --- a/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php +++ b/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Timeline; use Chill\ActivityBundle\Security\Authorization\ActivityVoter; @@ -191,7 +200,7 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface $this->security->getUser(), new Role(ActivityVoter::SEE_DETAILS) ) as $center) { - if (false === in_array($center, $centers)) { + if (false === in_array($center, $centers, true)) { continue; } diff --git a/src/Bundle/ChillTaskBundle/Workflow/Definition/DefaultTaskDefinition.php b/src/Bundle/ChillTaskBundle/Workflow/Definition/DefaultTaskDefinition.php index 71331d860..5ad62cf57 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/Definition/DefaultTaskDefinition.php +++ b/src/Bundle/ChillTaskBundle/Workflow/Definition/DefaultTaskDefinition.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Workflow\Definition; use Chill\TaskBundle\Entity\AbstractTask; diff --git a/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php b/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php index 92699ff46..324c79bf1 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php +++ b/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Workflow\Event; use Chill\TaskBundle\Security\Authorization\TaskVoter; diff --git a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php index 95445ba5e..3d75ce8ba 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php +++ b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Workflow; interface TaskWorkflowDefinition diff --git a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php index 36976db81..439d98fc2 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php +++ b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\TaskBundle\Workflow; use Chill\TaskBundle\Entity\AbstractTask; diff --git a/src/Bundle/ChillTaskBundle/migrations/Version20180413135614.php b/src/Bundle/ChillTaskBundle/migrations/Version20180413135614.php index e6519bd34..2fde06c71 100644 --- a/src/Bundle/ChillTaskBundle/migrations/Version20180413135614.php +++ b/src/Bundle/ChillTaskBundle/migrations/Version20180413135614.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Task; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillTaskBundle/migrations/Version20180413201023.php b/src/Bundle/ChillTaskBundle/migrations/Version20180413201023.php index a5e23d033..3a6e5b893 100644 --- a/src/Bundle/ChillTaskBundle/migrations/Version20180413201023.php +++ b/src/Bundle/ChillTaskBundle/migrations/Version20180413201023.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software 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\Task; use Doctrine\DBAL\Schema\Schema; diff --git a/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php b/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php index 690660656..ec83a74c5 100644 --- a/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php +++ b/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle; use Chill\ThirdPartyBundle\DependencyInjection\CompilerPass\ThirdPartyTypeCompilerPass; diff --git a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php index f05d6a0a8..843a0e3d0 100644 --- a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php +++ b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; diff --git a/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdParty.php b/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdParty.php index 6977641af..51fcfcf93 100644 --- a/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdParty.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\DataFixtures\ORM; use Chill\MainBundle\DataFixtures\ORM\LoadCenters; diff --git a/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyCategory.php b/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyCategory.php index f218f7783..fdb008fec 100644 --- a/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyCategory.php +++ b/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\DataFixtures\ORM; use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory; diff --git a/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyProfession.php b/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyProfession.php index 6eef003a1..a2b796bf7 100644 --- a/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyProfession.php +++ b/src/Bundle/ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdPartyProfession.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\DataFixtures\ORM; use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession; diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php index 2314f19ef..cfb1a74cf 100644 --- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php +++ b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\DependencyInjection; use Chill\ThirdPartyBundle\Controller\ThirdPartyController; diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php index 3842595aa..d103000a5 100644 --- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php +++ b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\DependencyInjection\CompilerPass; use Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager; @@ -34,7 +43,7 @@ class ThirdPartyTypeCompilerPass implements CompilerPassInterface // check forr keys already in use : $key = $taggedService->getClass()::getKey(); - if (in_array($key, $usedKeys)) { + if (in_array($key, $usedKeys, true)) { throw new LogicException(sprintf( 'Tag with key "%s" is already in used', $key diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/Configuration.php index 7b34a329e..5e397dd82 100644 --- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillThirdPartyBundle/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\ThirdPartyBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index 15252927c..d158fdf5c 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Entity; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; @@ -302,7 +311,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this; } - if (!in_array($type, $this->types ?? [])) { + if (!in_array($type, $this->types ?? [], true)) { $this->types[] = $type; } @@ -573,8 +582,8 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this; } - if (in_array($type, $this->types ?? [])) { - $this->types = array_filter($this->types, fn ($e) => !in_array($e, $this->types)); + if (in_array($type, $this->types ?? [], true)) { + $this->types = array_filter($this->types, fn ($e) => !in_array($e, $this->types, true)); } foreach ($this->children as $child) { @@ -822,7 +831,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface } foreach ($this->getCategories() as $t) { - if (!in_array(spl_object_hash($t), $categoriesHashes)) { + if (!in_array(spl_object_hash($t), $categoriesHashes, true)) { $this->removeCategory($t); } } diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyCategory.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyCategory.php index 373f2fe6d..bddbac533 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyCategory.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyCategory.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Entity; use Chill\ThirdPartyBundle\Repository\ThirdPartyCategoryRepository; diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php index 659cba50a..dc035c280 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Entity; use Chill\ThirdPartyBundle\Repository\ThirdPartyProfessionRepository; diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php b/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php index 0e534b42c..d87d3dc0a 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Form\ChoiceLoader; use Chill\MainBundle\Entity\Center; @@ -60,7 +69,7 @@ class ThirdPartyChoiceLoader implements ChoiceLoaderInterface $party = $this->partyRepository->find($value); - if (false === in_array($this->center, $party->getCenters()->toArray())) { + if (false === in_array($this->center, $party->getCenters()->toArray(), true)) { throw new RuntimeException("the party's center is not authorized"); } diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php index 556343d56..4b015da09 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Form; use Chill\MainBundle\Entity\Civility; diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php index 59499dc52..f4227a539 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Form\Type; use Chill\MainBundle\Search\SearchInterface; diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php index 48cb195f5..ce4ba1a4c 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Form\Type; use Chill\MainBundle\Templating\TranslatableStringHelper; diff --git a/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php b/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php index 609e485e8..dcaa444d5 100644 --- a/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php +++ b/src/Bundle/ChillThirdPartyBundle/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\ThirdPartyBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php index b08c36f7c..ff619a61f 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Repository; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepositoryInterface.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepositoryInterface.php index 9b8b4607c..d13046686 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepositoryInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Repository; use Chill\ThirdPartyBundle\Entity\ThirdParty; diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyCategoryRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyCategoryRepository.php index f49734b9f..11fddf9c8 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyCategoryRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyCategoryRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Repository; use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory; diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyProfessionRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyProfessionRepository.php index 99c38e6fc..de6b87da8 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyProfessionRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyProfessionRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Repository; use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession; diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php index 71eac4340..d78c734a1 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Repository; use Chill\ThirdPartyBundle\Entity\ThirdParty; diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php index f708b0d9f..da9318d75 100644 --- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php +++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Search; use Chill\MainBundle\Search\SearchApiInterface; @@ -115,6 +124,6 @@ class ThirdPartyApiSearch implements SearchApiInterface public function supportsTypes(string $pattern, array $types, array $parameters): bool { - return in_array('thirdparty', $types); + return in_array('thirdparty', $types, true); } } diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php index fbed5854c..4c10d144f 100644 --- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php +++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Search; use Chill\MainBundle\Pagination\PaginatorFactory; diff --git a/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php b/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php index 62ed77eec..d4fced158 100644 --- a/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php +++ b/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Security\Voter; use Chill\MainBundle\Entity\User; @@ -63,7 +72,7 @@ class ThirdPartyVoter extends AbstractChillVoter implements ProvideRoleHierarchy protected function supports($attribute, $subject) { if ($subject instanceof ThirdParty) { - return in_array($attribute, $this->getRoles()); + return in_array($attribute, $this->getRoles(), true); } if (null === $subject) { diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index 11f24c136..62ca15717 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Templating\Entity; use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php index 58b6e1f4c..34ba251e4 100644 --- a/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php +++ b/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -15,25 +24,25 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -class ThirdPartyControllerTest extends WebTestCase +final class ThirdPartyControllerTest extends WebTestCase { 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'); } public function testUpdate() { - $client = static::createClient(); + $client = self::createClient(); $crawler = $client->request('GET', '/update'); } diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php index fefecfb0d..b6df5d4cf 100644 --- a/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php +++ b/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdParty\Tests\Entity; use Chill\ThirdPartyBundle\Entity\ThirdParty; @@ -17,7 +26,7 @@ use PHPUnit\Framework\TestCase; * @internal * @coversNothing */ -class ThirdPartyTest extends TestCase +final class ThirdPartyTest extends TestCase { public function testAddingRemovingActivityTypes() { diff --git a/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeManager.php b/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeManager.php index af0f7de06..8ff3505e4 100644 --- a/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeManager.php +++ b/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeManager.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\ThirdPartyType; use function array_keys; diff --git a/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeProviderInterface.php b/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeProviderInterface.php index 8310480c5..4ff2f5d3b 100644 --- a/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeProviderInterface.php +++ b/src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeProviderInterface.php @@ -7,6 +7,15 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + +/** + * Chill is a software for social workers. + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\ThirdPartyBundle\ThirdPartyType; /**