mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 08:44:58 +00:00
Compare commits
9 Commits
issue706_c
...
phpstan-fi
Author | SHA1 | Date | |
---|---|---|---|
70871176fc
|
|||
4b2c330d22
|
|||
aa41070a66
|
|||
070e153263
|
|||
264a6ef43e
|
|||
584ac05b53
|
|||
856eea37ee
|
|||
a01cc23c14
|
|||
344a65e99d
|
@@ -9,13 +9,24 @@ declare(strict_types=1);
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$config = require __DIR__ . '/tests/app/vendor/drupol/php-conventions/config/php73/php_cs_fixer.config.php';
|
||||
$finder = PhpCsFixer\Finder::create();
|
||||
|
||||
$config
|
||||
->getFinder()
|
||||
->ignoreDotFiles(false)
|
||||
$finder
|
||||
->in(__DIR__.'/src')
|
||||
->append([__FILE__])
|
||||
->exclude(['docs/', 'tests/app'])
|
||||
->notPath('tests/app')
|
||||
->name(['.php_cs.dist.php']);
|
||||
->ignoreDotFiles(true)
|
||||
->name('**.php')
|
||||
;
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
$config
|
||||
->setFinder($finder)
|
||||
->setRiskyAllowed(true)
|
||||
->setCacheFile('.php_cs.cache')
|
||||
->setUsingCache(true)
|
||||
;
|
||||
|
||||
$rules = $config->getRules();
|
||||
|
||||
@@ -68,9 +79,15 @@ $riskyRules = [
|
||||
// 'psr_autoloading' => false,
|
||||
];
|
||||
|
||||
$untilFullSwitchToPhp8 = [
|
||||
'blank_line_between_import_groups' => false,
|
||||
'declare_strict_types' => true,
|
||||
];
|
||||
|
||||
$rules = array_merge(
|
||||
$rules,
|
||||
$riskyRules
|
||||
$riskyRules,
|
||||
$untilFullSwitchToPhp8,
|
||||
);
|
||||
|
||||
$rules['header_comment']['header'] = trim(file_get_contents(__DIR__ . '/resource/header.txt'));
|
@@ -8,7 +8,7 @@
|
||||
"social worker"
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4",
|
||||
"php": "^7.4|^8.2",
|
||||
"ext-json": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-redis": "*",
|
||||
@@ -64,18 +64,24 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-fixtures-bundle": "^3.3",
|
||||
"drupol/php-conventions": "^5",
|
||||
"fakerphp/faker": "^1.13",
|
||||
"jangregor/phpstan-prophecy": "^1.0",
|
||||
"nelmio/alice": "^3.8",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpstan/extension-installer": "^1.2",
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.1",
|
||||
"phpstan/phpstan-strict-rules": "^1.0",
|
||||
"phpunit/phpunit": ">= 7.5",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"psalm/plugin-symfony": "^4.0.2",
|
||||
"symfony/debug-bundle": "^5.1",
|
||||
"symfony/dotenv": "^4.4",
|
||||
"symfony/maker-bundle": "^1.20",
|
||||
"symfony/phpunit-bridge": "^4.4",
|
||||
"symfony/stopwatch": "^4.4",
|
||||
"symfony/var-dumper": "^4.4"
|
||||
"symfony/var-dumper": "^4.4",
|
||||
"vimeo/psalm": "^4.30.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
|
40
grumphp.yml
40
grumphp.yml
@@ -1,40 +0,0 @@
|
||||
imports:
|
||||
- {
|
||||
resource: tests/app/vendor/drupol/php-conventions/config/php73/grumphp.yml,
|
||||
}
|
||||
|
||||
parameters:
|
||||
tasks.phpcsfixer.config: .php_cs.dist.php
|
||||
tasks.license.name: AGPL-3.0
|
||||
tasks.license.holder: Champs-Libres
|
||||
tasks.license.date_from: 2001
|
||||
|
||||
tasks.phpcsfixer.allow_risky: true
|
||||
tasks.phpcsfixer.diff: true
|
||||
tasks.phpstan.level: 1
|
||||
tasks.phpstan.blocking: true
|
||||
tasks.phpstan.ignore_patterns:
|
||||
- "/.github/"
|
||||
- "/.idea/"
|
||||
- "/build/"
|
||||
- "/benchmarks/"
|
||||
- "/docs/"
|
||||
- "/node_modules/"
|
||||
- "/resource/"
|
||||
- "/spec/"
|
||||
- "/var/"
|
||||
- "/vendor/"
|
||||
- "/tests/app"
|
||||
|
||||
# Psalm
|
||||
tasks.psalm.blocking: true
|
||||
tasks.psalm.ignore_patterns:
|
||||
- "/.github/"
|
||||
- "/.idea/"
|
||||
- "/build/"
|
||||
- "/benchmarks/"
|
||||
- "/node_modules/"
|
||||
- "/resource/"
|
||||
- "/spec/"
|
||||
- "/var/"
|
||||
- "/vendor/"
|
306
phpstan-baseline-level-2.neon
Normal file
306
phpstan-baseline-level-2.neon
Normal file
@@ -0,0 +1,306 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ActivityBundle\\\\Entity\\\\Activity\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\PersonBundle\\\\Entity\\\\Person\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, DateTime\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ActivityBundle\\\\Entity\\\\ActivityReasonCategory\\|null given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ActivityBundle\\\\Entity\\\\ActivityReason\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php
|
||||
|
||||
-
|
||||
message: "#^Call to method DateTime\\:\\:setTimezone\\(\\) with incorrect case\\: setTimeZone$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in &&, Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\|null given on the right side\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, Chill\\\\AsideActivityBundle\\\\Entity\\\\AsideActivityCategory\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php
|
||||
|
||||
-
|
||||
message: "#^Call to method DateTimeImmutable\\:\\:setTimezone\\(\\) with incorrect case\\: setTimeZone$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\MainBundle\\\\Entity\\\\Location\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, Symfony\\\\Component\\\\Validator\\\\ConstraintViolationListInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomField\\|null given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup\\|null given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getFirstName\\(\\) with incorrect case\\: getFirstname$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getLastName\\(\\) with incorrect case\\: getLastname$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getMobilenumber\\(\\) with incorrect case\\: getMobileNumber$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getPhonenumber\\(\\) with incorrect case\\: getPhoneNumber$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Event given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Event\\|null given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, int given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Only numeric types are allowed in pre\\-increment, string given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\EventType\\|null given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventTypeController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Participation\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/ParticipationController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Role\\|null given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillEventBundle/Controller/RoleController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Status\\|null given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillEventBundle/Controller/StatusController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\Language\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, Chill\\\\MainBundle\\\\Entity\\\\Language\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\Center\\|null given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillMainBundle/Controller/CenterController.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Redis\\:\\:setex\\(\\) with incorrect case\\: setEx$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\PermissionsGroup\\|null given\\.$#"
|
||||
count: 5
|
||||
path: src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\RoleScope\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillMainBundle/Controller/ScopeController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\GroupCenter\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Controller/UserController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\User\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Controller/UserController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php
|
||||
|
||||
-
|
||||
message: "#^Only numeric types are allowed in pre\\-increment, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, int\\<0, max\\> given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillMainBundle/Search/SearchApiQuery.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\MainBundle\\\\Entity\\\\Address\\:\\:getPostcode\\(\\) with incorrect case\\: getPostCode$#"
|
||||
count: 6
|
||||
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassDiscriminatorMapping\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\MainBundle\\\\Entity\\\\Address\\:\\:getPostcode\\(\\) with incorrect case\\: getPostCode$#"
|
||||
count: 6
|
||||
path: src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Person.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriodParticipation\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Person.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getFirstName\\(\\) with incorrect case\\: getFirstname$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getLastName\\(\\) with incorrect case\\: getLastname$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, int\\<0, max\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in &&, null given on the left side\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\Household\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, array\\<Chill\\\\PersonBundle\\\\Entity\\\\Person\\\\ResidentialAddress\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getDeathdate\\(\\) with incorrect case\\: getDeathDate$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\PersonBundle\\\\Entity\\\\Person\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ReportBundle\\\\Entity\\\\Report given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: "#^Call to method Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\:\\:setFirstname\\(\\) with incorrect case\\: setFirstName$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/EventListener/ThirdPartyEventListener.php
|
||||
|
||||
-
|
||||
message: "#^Dynamic call to static method Chill\\\\ThirdPartyBundle\\\\ThirdPartyType\\\\ThirdPartyTypeProviderInterface\\:\\:getKey\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeManager.php
|
1021
phpstan-baseline-level-3.neon
Normal file
1021
phpstan-baseline-level-3.neon
Normal file
File diff suppressed because it is too large
Load Diff
5101
phpstan-baseline-level-4.neon
Normal file
5101
phpstan-baseline-level-4.neon
Normal file
File diff suppressed because it is too large
Load Diff
721
phpstan-baseline-level-5.neon
Normal file
721
phpstan-baseline-level-5.neon
Normal file
@@ -0,0 +1,721 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$context of method Chill\\\\ActivityBundle\\\\Timeline\\\\TimelineActivityProvider\\:\\:checkContext\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Chill\\\\BudgetBundle\\\\Repository\\\\ChargeType\\)\\: mixed\\)\\|null, Closure\\(Chill\\\\BudgetBundle\\\\Entity\\\\ChargeKind\\)\\: int\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Chill\\\\BudgetBundle\\\\Repository\\\\ResourceType\\)\\: mixed\\)\\|null, Closure\\(Chill\\\\BudgetBundle\\\\Entity\\\\ResourceKind\\)\\: int\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\InviteUpdateMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/Controller/InviteApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$name of method Chill\\\\MainBundle\\\\Entity\\\\Country\\:\\:setName\\(\\) expects string, array\\<string, string\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$title of method Chill\\\\MainBundle\\\\Entity\\\\LocationType\\:\\:setTitle\\(\\) expects array, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$status of method Chill\\\\CalendarBundle\\\\Entity\\\\Invite\\:\\:setStatus\\(\\) expects string, array\\<string, string\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarRemovedMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarRangeRemovedMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarRangeMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$token of method Chill\\\\CalendarBundle\\\\RemoteCalendar\\\\Connector\\\\MSGraph\\\\OnBehalfOfUserTokenStorage\\:\\:setToken\\(\\) expects TheNetworg\\\\OAuth2\\\\Client\\\\Token\\\\AccessToken, League\\\\OAuth2\\\\Client\\\\Token\\\\AccessTokenInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserTokenStorage.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$code of class Exception constructor expects int, array\\<string, int\\|string\\|null\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$offset of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarRepository\\:\\:findBy\\(\\) expects int\\|null, array\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$prefix of function uniqid expects string, int\\<0, max\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects callable\\(Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadataInterface\\)\\: mixed, Closure\\(Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadata\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$metadata of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeNullData\\(\\) expects Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadata, Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadataInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$attributes of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeNullData\\(\\) expects array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadata\\>, array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadataInterface\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#5 \\$metadata of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeObject\\(\\) expects Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadata, Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadataInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#6 \\$attributes of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeObject\\(\\) expects array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadata\\>, array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadataInterface\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$name of method Symfony\\\\Component\\\\Form\\\\FormFactoryInterface\\:\\:createNamedBuilder\\(\\) expects string, null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, Chill\\\\MainBundle\\\\Entity\\\\Center given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$participations of method Chill\\\\EventBundle\\\\Controller\\\\ParticipationController\\:\\:createEditFormMultiple\\(\\) expects ArrayIterator, Traversable given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillEventBundle/Controller/ParticipationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$previous of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects Throwable\\|null, int given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$code of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects int, Symfony\\\\Component\\\\Serializer\\\\Exception\\\\NotEncodableValueException given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$code of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects int, Symfony\\\\Component\\\\Serializer\\\\Exception\\\\UnexpectedValueException given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$formClass of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:createFormFor\\(\\) expects string\\|null, Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\type\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$scope of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null, Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\Scope\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$name of method Chill\\\\MainBundle\\\\Entity\\\\Country\\:\\:setName\\(\\) expects string, array\\<int\\|string, string\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, Chill\\\\MainBundle\\\\Entity\\\\the given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$alias of method Chill\\\\MainBundle\\\\Export\\\\ExportManager\\:\\:getExport\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$name of method Symfony\\\\Component\\\\Form\\\\FormFactoryInterface\\:\\:createNamedBuilder\\(\\) expects string, null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:exportFormStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:formatterFormStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:forwardToGenerate\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:selectCentersStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countUnreadByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:findUnreadByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$addressee of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countAllForAttendee\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$addressee of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:findAllForAttendee\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$sender of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countAllForSender\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$sender of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:findAllForSender\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countUnreadByUserWhereAddressee\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countUnreadByUserWhereSender\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$token of class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent constructor expects Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\type\\|null, string given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$ip of class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent constructor expects Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\type\\|null, string\\|null given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineBuilder\\:\\:countItems\\(\\) expects Chill\\\\MainBundle\\\\Timeline\\\\unknown, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:addSubscriberToFinal\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:addSubscriberToStep\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:isUserSubscribedToFinal\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:isUserSubscribedToStep\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:removeSubscriberToFinal\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:removeSubscriberToStep\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Configuration\\:\\:filterWidgetByPlace\\(\\) expects string, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Configuration\\:\\:getWidgetAliasesbyPlace\\(\\) expects Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\type, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$array of function implode expects array\\|null, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:createDefinition\\(\\) expects Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$order of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:createDefinition\\(\\) expects Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type, float given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:getServiceId\\(\\) expects string, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$order of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:getServiceId\\(\\) expects float, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, array\\<Chill\\\\MainBundle\\\\Export\\\\AggregatorInterface\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/ExportManager.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$nbAggregators of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVFormatter\\:\\:appendAggregatorForm\\(\\) expects string, int\\<0, max\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$array of function array_map expects array, Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$nbAggregators of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadSheetFormatter\\:\\:appendAggregatorForm\\(\\) expects string, int\\<0, max\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Embeddable\\\\PrivateCommentEmbeddable\\:\\:getCommentForUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$em of class Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\ObjectToIdTransformer constructor expects Doctrine\\\\ORM\\\\EntityManagerInterface, Doctrine\\\\Persistence\\\\ObjectManager given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$em of class Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\MultipleObjectsToIdTransformer constructor expects Doctrine\\\\ORM\\\\EntityManagerInterface, Doctrine\\\\Persistence\\\\ObjectManager given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$translatableStrings of method Chill\\\\MainBundle\\\\Templating\\\\TranslatableStringHelper\\:\\:localize\\(\\) expects array, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$datetime of class DateTime constructor expects string, Chill\\\\MainBundle\\\\Search\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Search/AbstractSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$paginator of method Chill\\\\MainBundle\\\\Search\\\\SearchApi\\:\\:fetchRawResult\\(\\) expects Chill\\\\MainBundle\\\\Pagination\\\\Paginator, Chill\\\\MainBundle\\\\Pagination\\\\PaginatorInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Search/SearchApi.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function uasort expects callable\\(Chill\\\\MainBundle\\\\Search\\\\HasAdvancedSearchForm, Chill\\\\MainBundle\\\\Search\\\\HasAdvancedSearchForm\\)\\: int, Closure\\(Chill\\\\MainBundle\\\\Search\\\\SearchInterface, Chill\\\\MainBundle\\\\Search\\\\SearchInterface\\)\\: \\-1\\|0\\|1 given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Search/SearchProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, Chill\\\\MainBundle\\\\Search\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Search/SearchProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of function get_class expects object, array\\<Chill\\\\MainBundle\\\\Entity\\\\Center\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Notification\\:\\:isReadBy\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Embeddable\\\\PrivateCommentEmbeddable\\:\\:setCommentForUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineBuilder\\:\\:buildUnionQuery\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\unknown given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineProviderInterface\\:\\:getEntityTemplate\\(\\) expects Chill\\\\MainBundle\\\\Timeline\\\\type, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$phoneNumber of method Chill\\\\MainBundle\\\\Phonenumber\\\\PhoneNumberHelperInterface\\:\\:format\\(\\) expects libphonenumber\\\\PhoneNumber\\|null, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$transitionBy of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflowStep\\:\\:setTransitionBy\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$mobilenumber of method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:setMobilenumber\\(\\) expects libphonenumber\\\\PhoneNumber\\|null, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$phonenumber of method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:setPhonenumber\\(\\) expects libphonenumber\\\\PhoneNumber\\|null, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(mixed, mixed\\)\\: int, Closure\\(mixed, mixed\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationRepository\\:\\:countNearMaxDateByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationRepository\\:\\:findNearMaxDateByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of static method DateTimeImmutable\\:\\:createFromMutable\\(\\) expects DateTime, DateTimeInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(mixed, mixed\\)\\: int, Closure\\(mixed, mixed\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$previous of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects Throwable\\|null, int given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$code of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects int, Symfony\\\\Component\\\\Serializer\\\\Exception\\\\InvalidArgumentException\\|Symfony\\\\Component\\\\Serializer\\\\Exception\\\\UnexpectedValueException given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$form of method Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:isLastPostDataChanges\\(\\) expects Symfony\\\\Component\\\\Form\\\\Form, Symfony\\\\Component\\\\Form\\\\FormInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$precision of method Chill\\\\PersonBundle\\\\Search\\\\SimilarPersonMatcher\\:\\:matchPerson\\(\\) expects float, Chill\\\\PersonBundle\\\\Repository\\\\PersonNotDuplicateRepository given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$orderBy of method Chill\\\\PersonBundle\\\\Search\\\\SimilarPersonMatcher\\:\\:matchPerson\\(\\) expects string, float given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$addYearComparison of method Chill\\\\PersonBundle\\\\Search\\\\SimilarPersonMatcher\\:\\:matchPerson\\(\\) expects bool, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineBuilder\\:\\:countItems\\(\\) expects Chill\\\\MainBundle\\\\Timeline\\\\unknown, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$period of method Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodLocationHistory\\:\\:setPeriod\\(\\) expects Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod, null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$now of method Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\Household\\:\\:getCurrentMembers\\(\\) expects DateTimeImmutable\\|null, DateTimeInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Household/Household.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$now of method Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\Household\\:\\:getNonCurrentMembers\\(\\) expects DateTimeImmutable\\|null, DateTimeInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Household/Household.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$key of method Doctrine\\\\Common\\\\Collections\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:remove\\(\\) expects \\(int\\|string\\), Chill\\\\PersonBundle\\\\Entity\\\\SocialWork\\\\SocialAction given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$translatableStrings of method Chill\\\\MainBundle\\\\Templating\\\\TranslatableStringHelper\\:\\:localize\\(\\) expects array, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$entity of method Chill\\\\PersonBundle\\\\Templating\\\\Entity\\\\ClosingMotiveRender\\:\\:renderString\\(\\) expects Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\ClosingMotive, Chill\\\\MainBundle\\\\Templating\\\\Entity\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$entityName of method Doctrine\\\\ORM\\\\EntityManager\\:\\:getRepository\\(\\) expects class\\-string\\<ChillPersonBundle\\:AccompanyingPeriod\\>, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:filterReachableCenters\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$context of method Chill\\\\PersonBundle\\\\Timeline\\\\AbstractTimelineAccompanyingPeriod\\:\\:getBasicEntityTemplate\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodClosing.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$context of method Chill\\\\PersonBundle\\\\Timeline\\\\AbstractTimelineAccompanyingPeriod\\:\\:getBasicEntityTemplate\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodOpening.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelperInterface\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$className of method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getRepository\\(\\) expects class\\-string\\<ChillReportBundle\\:Report\\>, string given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$entity of method Chill\\\\ReportBundle\\\\Controller\\\\ReportController\\:\\:createEditForm\\(\\) expects Chill\\\\ReportBundle\\\\Entity\\\\Report, ChillReportBundle\\:Report given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableScopes\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$em of class Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\ScopeTransformer constructor expects Doctrine\\\\ORM\\\\EntityManagerInterface, Doctrine\\\\Persistence\\\\ObjectManager given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Form/ReportType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableScopes\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Form/ReportType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Search/ReportSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableScopes\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Search/ReportSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$context of method Chill\\\\ReportBundle\\\\Timeline\\\\TimelineReportProvider\\:\\:checkContext\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$entity of method Chill\\\\ReportBundle\\\\Timeline\\\\TimelineReportProvider\\:\\:getFieldsToRender\\(\\) expects Chill\\\\ReportBundle\\\\Entity\\\\Report, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$entityName of method Doctrine\\\\ORM\\\\EntityManager\\:\\:getRepository\\(\\) expects class\\-string\\<ChillReportBundle\\:Report\\>, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 6
|
||||
path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Controller/TaskController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$keys of function array_fill_keys expects array, Chill\\\\TaskBundle\\\\Entity\\\\json given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$task of method Chill\\\\TaskBundle\\\\Entity\\\\Task\\\\SingleTaskPlaceEvent\\:\\:setTask\\(\\) expects Chill\\\\TaskBundle\\\\Entity\\\\SingleTask, Chill\\\\TaskBundle\\\\Entity\\\\AbstractTask given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$repository of class Chill\\\\PersonBundle\\\\Form\\\\DataTransformer\\\\PersonToIdTransformer constructor expects Chill\\\\PersonBundle\\\\Repository\\\\PersonRepository, Doctrine\\\\ORM\\\\EntityManagerInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$extras of method Knp\\\\Menu\\\\MenuItem\\:\\:setExtras\\(\\) expects array\\<string, mixed\\>, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$storedObject of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getContent\\(\\) expects Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject, ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document given\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$storedObject of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:setContent\\(\\) expects Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject, ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$type of method Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\:\\:setType\\(\\) expects string\\|null, false given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
|
@@ -1,76 +1,6 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Implicit array creation is not allowed \\- variable \\$centers might not exist\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
|
||||
|
||||
-
|
||||
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\:\\:\\$work\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
|
||||
|
||||
-
|
||||
message: "#^Undefined variable\\: \\$person$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
|
||||
|
||||
-
|
||||
message: "#^Variable variables are not allowed\\.$#"
|
||||
count: 4
|
||||
path: src/Bundle/ChillPersonBundle/Search/PersonSearch.php
|
||||
|
||||
-
|
||||
message: "#^Function Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\·\\\\is_array not found\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
|
||||
|
||||
-
|
||||
message: "#^Undefined variable\\: \\$choiceSlug$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
|
||||
|
||||
-
|
||||
message: "#^Undefined variable\\: \\$type$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Controller/TaskController.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\AbstractCRUDController\\:\\:getRoleFor\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Controller\\\\UserController\\:\\:createEditForm\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/UserController.php
|
||||
|
||||
-
|
||||
message: "#^Undefined variable\\: \\$current$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Pagination/PageGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AbstractChillVoter\\:\\:getSupportedAttributes\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AbstractChillVoter\\:\\:getSupportedClasses\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AbstractChillVoter\\:\\:isGranted\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php
|
||||
|
||||
-
|
||||
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:\\$security\\.$#"
|
||||
count: 3
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Chill\\\\ThirdPartyBundle\\\\Form\\\\Type\\\\PickThirdPartyTypeCategoryType\\:\\:transform\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php
|
||||
|
@@ -400,16 +400,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\ThirdPartyBundle\\\\Search\\\\ThirdPartySearch\\:\\:renderResult\\(\\) should return string but return statement is missing\\.$#"
|
||||
count: 1
|
||||
|
@@ -1,7 +1,8 @@
|
||||
parameters:
|
||||
level: 1
|
||||
level: 5
|
||||
paths:
|
||||
- src/
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
excludePaths:
|
||||
- .php_cs*
|
||||
- docs/
|
||||
@@ -24,4 +25,8 @@ includes:
|
||||
- phpstan-critical.neon
|
||||
- phpstan-deprecations.neon
|
||||
- phpstan-types.neon
|
||||
- phpstan-baseline-level-2.neon
|
||||
- phpstan-baseline-level-3.neon
|
||||
- phpstan-baseline-level-4.neon
|
||||
- phpstan-baseline-level-5.neon
|
||||
|
||||
|
25
psalm.xml
25
psalm.xml
@@ -9,9 +9,10 @@
|
||||
cacheDirectory="./.psalm"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src" />
|
||||
<directory name="src"/>
|
||||
<ignoreFiles>
|
||||
<directory name="./tests/" />
|
||||
<directory name="./tests/"/>
|
||||
<directory name="./node_modules/"/>
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
|
||||
@@ -20,9 +21,27 @@
|
||||
<issueHandlers>
|
||||
<UndefinedDocblockClass>
|
||||
<errorLevel type="suppress">
|
||||
<referencedClass name="UnitEnum" />
|
||||
<referencedClass name="UnitEnum"/>
|
||||
</errorLevel>
|
||||
</UndefinedDocblockClass>
|
||||
</issueHandlers>
|
||||
|
||||
<!--
|
||||
<fileExtensions>
|
||||
<extension name=".php"/>
|
||||
<extension name=".twig" checker="tests/app/vendor/psalm/plugin-symfony/src/Twig/TemplateFileAnalyzer.php" />
|
||||
</fileExtensions>
|
||||
-->
|
||||
|
||||
<plugins>
|
||||
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
|
||||
<!--
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin">
|
||||
<containerXml>tests/app/var/cache/dev/srcApp_KernelDevDebugContainer.xml</containerXml>
|
||||
<stubs>
|
||||
<file name="vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php" />
|
||||
</stubs>
|
||||
</pluginClass>
|
||||
-->
|
||||
</plugins>
|
||||
</psalm>
|
||||
|
@@ -651,8 +651,8 @@ final class ActivityController extends AbstractController
|
||||
throw $this->createNotFoundException('Accompanying Period not found');
|
||||
}
|
||||
|
||||
// TODO Add permission
|
||||
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
// TODO Add permission
|
||||
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
} else {
|
||||
throw $this->createNotFoundException('Person or Accompanying Period not found');
|
||||
}
|
||||
|
@@ -58,7 +58,8 @@ class DateAggregator implements AggregatorInterface
|
||||
break;
|
||||
|
||||
case 'year':
|
||||
$fmt = 'YYYY'; $order = 'DESC';
|
||||
$fmt = 'YYYY';
|
||||
$order = 'DESC';
|
||||
|
||||
break; // order DESC does not works !
|
||||
|
||||
|
@@ -73,7 +73,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
||||
};
|
||||
|
||||
case 'scopesNames':
|
||||
return $this->translatableStringExportLabelHelper->getLabelMulti($key, $values, ListActivityHelper::MSG_KEY . 'course circles');
|
||||
return $this->translatableStringExportLabelHelper->getLabelMulti($key, $values, ListActivityHelper::MSG_KEY . 'course circles');
|
||||
|
||||
default:
|
||||
return $this->helper->getLabels($key, $values, $data);
|
||||
|
@@ -225,10 +225,9 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
|
||||
$personToCenter = $metadataPerson->getAssociationMapping('center')['joinColumns'][0]['name'];
|
||||
|
||||
// acls:
|
||||
$role = new Role(ActivityVoter::SEE);
|
||||
$reachableCenters = $this->authorizationHelper->getReachableCenters(
|
||||
$this->tokenStorage->getToken()->getUser(),
|
||||
$role
|
||||
ActivityVoter::SEE
|
||||
);
|
||||
|
||||
if (count($reachableCenters) === 0) {
|
||||
@@ -239,7 +238,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
|
||||
if ('person' === $context) {
|
||||
// we start with activities having the person_id linked to person
|
||||
$where .= sprintf('%s = ? AND ', $activityToPerson);
|
||||
$parameters[] = $person->getId();
|
||||
$parameters[] = $args['context']->getId();
|
||||
}
|
||||
|
||||
// we add acl (reachable center and scopes)
|
||||
@@ -252,7 +251,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
|
||||
continue;
|
||||
}
|
||||
// we get all the reachable scopes for this center
|
||||
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), $role, $center);
|
||||
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), ActivityVoter::SEE, $center);
|
||||
// we get the ids for those scopes
|
||||
$reachablesScopesId = array_map(
|
||||
static function (Scope $scope) {
|
||||
|
@@ -11,12 +11,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\AsideActivityBundle\Export\Export;
|
||||
|
||||
use Chill\AsideActivityBundle\Export\Declarations;
|
||||
use Chill\AsideActivityBundle\Repository\AsideActivityRepository;
|
||||
use Chill\AsideActivityBundle\Security\AsideActivityVoter;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use ChillAsideActivityBundle\Export\Declarations;
|
||||
use Doctrine\ORM\Query;
|
||||
use LogicException;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
@@ -53,6 +53,11 @@ class ResourceKindRepository implements ObjectRepository
|
||||
->getResult();
|
||||
}
|
||||
|
||||
public function findOneByKind(string $kind): ?ResourceKind
|
||||
{
|
||||
return $this->repository->findOneBy(['kind' => $kind]) ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ResourceType[]
|
||||
*/
|
||||
|
@@ -145,6 +145,9 @@ class CalendarDocController
|
||||
$returnParams = ['id' => $calendarDoc->getCalendar()->getPerson()->getId()];
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \LogicException(sprintf("This context '%s' is not supported", $calendarDoc->getCalendar()->getContext()));
|
||||
}
|
||||
|
||||
$form = $this->formFactory->createBuilder()
|
||||
|
@@ -512,7 +512,9 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
||||
*/
|
||||
public function getUsers(): Collection
|
||||
{
|
||||
return $this->getInvites()->map(static function (Invite $i) { return $i->getUser(); });
|
||||
return $this->getInvites()->map(static function (Invite $i) {
|
||||
return $i->getUser();
|
||||
});
|
||||
}
|
||||
|
||||
public function hasCalendarRange(): bool
|
||||
@@ -597,7 +599,9 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
||||
}
|
||||
|
||||
$invite = $this->invites
|
||||
->filter(static function (Invite $invite) use ($user) { return $invite->getUser() === $user; })
|
||||
->filter(static function (Invite $invite) use ($user) {
|
||||
return $invite->getUser() === $user;
|
||||
})
|
||||
->first();
|
||||
$this->removeInvite($invite);
|
||||
|
||||
|
@@ -89,10 +89,14 @@ class CalendarToRemoteHandler implements MessageHandlerInterface
|
||||
|
||||
$newInvites = array_filter(
|
||||
array_map(
|
||||
function ($id) { return $this->inviteRepository->find($id); },
|
||||
function ($id) {
|
||||
return $this->inviteRepository->find($id);
|
||||
},
|
||||
$calendarMessage->getNewInvitesIds(),
|
||||
),
|
||||
static function (?Invite $invite) { return null !== $invite; }
|
||||
static function (?Invite $invite) {
|
||||
return null !== $invite;
|
||||
}
|
||||
);
|
||||
|
||||
$this->calendarConnector->syncCalendar(
|
||||
|
@@ -167,7 +167,9 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
||||
]
|
||||
)->toArray();
|
||||
|
||||
$ids = array_map(static function ($item) { return $item['id']; }, $bareEvents['value']);
|
||||
$ids = array_map(static function ($item) {
|
||||
return $item['id'];
|
||||
}, $bareEvents['value']);
|
||||
$existingIdsInRange = $this->calendarRangeRepository->findRemoteIdsPresent($ids);
|
||||
$existingIdsInCalendar = $this->calendarRepository->findRemoteIdsPresent($ids);
|
||||
|
||||
|
@@ -215,7 +215,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface
|
||||
$qb
|
||||
->where(
|
||||
$qb->expr()->orX(
|
||||
// the calendar where the person is the main person:
|
||||
// the calendar where the person is the main person:
|
||||
$qb->expr()->eq('c.person', ':person'),
|
||||
// when the calendar is in a reachable period, and contains person
|
||||
$qb->expr()->andX(
|
||||
|
@@ -96,7 +96,7 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
];
|
||||
|
||||
$calendar = new Calendar();
|
||||
$calendar->setMainUser(new class() extends User {
|
||||
$calendar->setMainUser(new class () extends User {
|
||||
public function getId()
|
||||
{
|
||||
return '1';
|
||||
@@ -114,8 +114,12 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
$this->assertEquals(8, $calendar->getCalendarRange()->getId());
|
||||
$this->assertEquals(9, $calendar->getLocation()->getId());
|
||||
$this->assertEquals(true, $calendar->getSendSMS());
|
||||
$this->assertContains(2, $calendar->getUsers()->map(static function (User $u) { return $u->getId(); }));
|
||||
$this->assertContains(3, $calendar->getUsers()->map(static function (User $u) { return $u->getId(); }));
|
||||
$this->assertContains(2, $calendar->getUsers()->map(static function (User $u) {
|
||||
return $u->getId();
|
||||
}));
|
||||
$this->assertContains(3, $calendar->getUsers()->map(static function (User $u) {
|
||||
return $u->getId();
|
||||
}));
|
||||
}
|
||||
|
||||
protected function getExtensions()
|
||||
@@ -147,7 +151,9 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
->will(static function ($args) {
|
||||
return implode(
|
||||
',',
|
||||
array_map(static function ($p) { return $p->getId(); }, $args[0])
|
||||
array_map(static function ($p) {
|
||||
return $p->getId();
|
||||
}, $args[0])
|
||||
);
|
||||
});
|
||||
$transformer->transform(Argument::exact(null))
|
||||
@@ -156,7 +162,9 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
->will(static function ($args) {
|
||||
return implode(
|
||||
',',
|
||||
array_map(static function ($p) { return $p->getId(); }, $args[0]->toArray())
|
||||
array_map(static function ($p) {
|
||||
return $p->getId();
|
||||
}, $args[0]->toArray())
|
||||
);
|
||||
});
|
||||
$transformer->reverseTransform(Argument::type('string'))
|
||||
|
@@ -197,7 +197,7 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return in_array($offset, [
|
||||
'person', 'role', 'status', 'event',
|
||||
@@ -207,30 +207,21 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
/**
|
||||
* @param mixed $offset
|
||||
*
|
||||
* @return Event|mixed|Person|Role|Status
|
||||
* @return Event|Person|Role|Status
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
public function offsetGet($offset): mixed
|
||||
{
|
||||
switch ($offset) {
|
||||
case 'person':
|
||||
return $this->getPerson();
|
||||
|
||||
break;
|
||||
|
||||
case 'role':
|
||||
return $this->getRole();
|
||||
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
return $this->getStatus();
|
||||
|
||||
break;
|
||||
|
||||
case 'event':
|
||||
return $this->getEvent();
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new \LogicException("this offset does not exists : " . $offset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,28 +229,28 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
* @param mixed $offset
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return Participation|void
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
switch ($offset) {
|
||||
case 'person':
|
||||
return $this->setPerson($value);
|
||||
$this->setPerson($value);
|
||||
|
||||
break;
|
||||
|
||||
case 'role':
|
||||
return $this->setRole($value);
|
||||
$this->setRole($value);
|
||||
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
return $this->setStatus($value);
|
||||
$this->setStatus($value);
|
||||
|
||||
break;
|
||||
|
||||
case 'event':
|
||||
return $this->setEvent($value);
|
||||
$this->setEvent($value);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -268,7 +259,7 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
/**
|
||||
* @param mixed $offset
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
$this->offsetSet($offset, null);
|
||||
}
|
||||
|
@@ -174,8 +174,8 @@ class EventSearch extends AbstractSearch
|
||||
}
|
||||
|
||||
if (
|
||||
(isset($terms['name']) || isset($terms['_default']))
|
||||
&& (!empty($terms['name']) || !empty($terms['_default']))
|
||||
(isset($terms['name']) || isset($terms['_default']))
|
||||
&& (!empty($terms['name']) || !empty($terms['_default']))
|
||||
) {
|
||||
// the form with name:"xyz" has precedence
|
||||
$name = $terms['name'] ?? $terms['_default'];
|
||||
|
@@ -34,6 +34,29 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
*/
|
||||
protected array $crudConfig = [];
|
||||
|
||||
/**
|
||||
* get the role given from the config.
|
||||
*
|
||||
* @param mixed $entity
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function getRoleFor(string $action, Request $request, $entity, $_format): string
|
||||
{
|
||||
$actionConfig = $this->getActionConfig($action);
|
||||
|
||||
if (null !== $actionConfig['roles'][$request->getMethod()]) {
|
||||
return $actionConfig['roles'][$request->getMethod()];
|
||||
}
|
||||
|
||||
if ($this->crudConfig['base_role']) {
|
||||
return $this->crudConfig['base_role'];
|
||||
}
|
||||
|
||||
throw new \RuntimeException(sprintf('the config does not have any role for the ' .
|
||||
'method %s nor a global role for the whole action. Add those to your ' .
|
||||
'configuration or override the required method', $request->getMethod()));
|
||||
}
|
||||
|
||||
public static function getSubscribedServices(): array
|
||||
{
|
||||
return array_merge(
|
||||
|
@@ -499,28 +499,6 @@ class ApiController extends AbstractCRUDController
|
||||
return ['groups' => ['read']];
|
||||
}
|
||||
|
||||
/**
|
||||
* get the role given from the config.
|
||||
*
|
||||
* @param mixed $entity
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function getRoleFor(string $action, Request $request, $entity, $_format): string
|
||||
{
|
||||
$actionConfig = $this->getActionConfig($action);
|
||||
|
||||
if (null !== $actionConfig['roles'][$request->getMethod()]) {
|
||||
return $actionConfig['roles'][$request->getMethod()];
|
||||
}
|
||||
|
||||
if ($this->crudConfig['base_role']) {
|
||||
return $this->crudConfig['base_role'];
|
||||
}
|
||||
|
||||
throw new RuntimeException(sprintf('the config does not have any role for the ' .
|
||||
'method %s nor a global role for the whole action. Add those to your ' .
|
||||
'configuration or override the required method', $request->getMethod()));
|
||||
}
|
||||
|
||||
protected function getSerializer(): SerializerInterface
|
||||
{
|
||||
|
@@ -50,8 +50,8 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
|
||||
|
||||
foreach (Intl::getLanguageBundle()->getLanguageNames() as $code => $language) {
|
||||
if (
|
||||
!in_array($code, $this->regionalVersionToInclude, true)
|
||||
&& !in_array($code, $this->ancientToExclude, true)
|
||||
!in_array($code, $this->regionalVersionToInclude, true)
|
||||
&& !in_array($code, $this->ancientToExclude, true)
|
||||
) {
|
||||
$lang = (new Language())
|
||||
->setId($code)
|
||||
|
@@ -274,7 +274,7 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->end() // end of root/children
|
||||
->end() // end of root
|
||||
;
|
||||
;
|
||||
|
||||
$rootNode->children()
|
||||
->arrayNode('add_address')->addDefaultsIfNotSet()->children()
|
||||
|
@@ -80,7 +80,6 @@ class Country
|
||||
/**
|
||||
* Get name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@@ -42,7 +42,9 @@ class IdToEntityDataTransformer implements DataTransformerInterface
|
||||
{
|
||||
$this->repository = $repository;
|
||||
$this->multiple = $multiple;
|
||||
$this->getId = $getId ?? static function (object $o) { return $o->getId(); };
|
||||
$this->getId = $getId ?? static function (object $o) {
|
||||
return $o->getId();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -137,8 +137,8 @@ class WorkflowStepType extends AbstractType
|
||||
$meta = $workflow->getMetadataStore()->getPlaceMetadata($to);
|
||||
|
||||
if (
|
||||
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
||||
) {
|
||||
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
||||
) {
|
||||
$toFinal = false;
|
||||
}
|
||||
}
|
||||
|
@@ -21,37 +21,36 @@ class Page implements PageInterface
|
||||
/**
|
||||
* the number of item per page.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $itemPerPage;
|
||||
protected int $itemPerPage;
|
||||
|
||||
/**
|
||||
* the number of the current page.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $number;
|
||||
protected int $number;
|
||||
|
||||
/**
|
||||
* The route for the current page.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $route;
|
||||
protected string $route;
|
||||
|
||||
/**
|
||||
* Parameters for the route to the current page.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $routeParameters;
|
||||
protected array $routeParameters;
|
||||
|
||||
/**
|
||||
* The number of items in the whole iteration.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $totalItems;
|
||||
protected int $totalItems;
|
||||
|
||||
/**
|
||||
* @var UrlGeneratorInterface
|
||||
@@ -59,12 +58,12 @@ class Page implements PageInterface
|
||||
protected $urlGenerator;
|
||||
|
||||
public function __construct(
|
||||
$number,
|
||||
$itemPerPage,
|
||||
int $number,
|
||||
int $itemPerPage,
|
||||
UrlGeneratorInterface $urlGenerator,
|
||||
$route,
|
||||
string $route,
|
||||
array $routeParameters,
|
||||
$totalItems
|
||||
int $totalItems
|
||||
) {
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->number = $number;
|
||||
@@ -74,24 +73,24 @@ class Page implements PageInterface
|
||||
$this->totalItems = $totalItems;
|
||||
}
|
||||
|
||||
public function generateUrl()
|
||||
public function generateUrl(): string
|
||||
{
|
||||
return $this->urlGenerator->generate($this->route, $this->routeParameters);
|
||||
}
|
||||
|
||||
public function getFirstItemNumber()
|
||||
public function getFirstItemNumber(): int
|
||||
{
|
||||
return ($this->number - 1) * $this->itemPerPage;
|
||||
}
|
||||
|
||||
public function getLastItemNumber()
|
||||
public function getLastItemNumber(): int
|
||||
{
|
||||
$last = $this->number * $this->itemPerPage - 1;
|
||||
|
||||
return $last < $this->totalItems ? $last : $this->totalItems;
|
||||
}
|
||||
|
||||
public function getNumber()
|
||||
public function getNumber(): int
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
@@ -27,27 +27,27 @@ class PageGenerator implements Iterator
|
||||
$this->paginator = $paginator;
|
||||
}
|
||||
|
||||
public function current()
|
||||
public function current(): Page
|
||||
{
|
||||
return $this->paginator->getPage($current);
|
||||
return $this->paginator->getPage($this->current);
|
||||
}
|
||||
|
||||
public function key()
|
||||
public function key(): int
|
||||
{
|
||||
return $this->current;
|
||||
}
|
||||
|
||||
public function next()
|
||||
public function next(): void
|
||||
{
|
||||
++$this->current;
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
public function rewind(): void
|
||||
{
|
||||
$this->current = 1;
|
||||
}
|
||||
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return 0 < $this->current
|
||||
&& $this->paginator->countPages() >= $this->current;
|
||||
|
@@ -26,21 +26,21 @@ class Paginator implements PaginatorInterface
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $currentPageNumber;
|
||||
protected int $currentPageNumber;
|
||||
|
||||
/**
|
||||
* the number of items on a single page.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $itemPerPage;
|
||||
protected int $itemPerPage;
|
||||
|
||||
/**
|
||||
* the key in the GET parameter to indicate the number of item per page.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $itemPerPageKey;
|
||||
protected string $itemPerPageKey;
|
||||
|
||||
/**
|
||||
* the key in the GET parameter to indicate the page number in
|
||||
@@ -48,45 +48,45 @@ class Paginator implements PaginatorInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $pageKey;
|
||||
protected string $pageKey;
|
||||
|
||||
/**
|
||||
* the route of the pages.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $route;
|
||||
protected string $route;
|
||||
|
||||
/**
|
||||
* the parameters of the route.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $routeParameters;
|
||||
protected array $routeParameters;
|
||||
|
||||
/**
|
||||
* The number of total items.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $totalItems;
|
||||
protected int $totalItems;
|
||||
|
||||
/**
|
||||
* the generator for url.
|
||||
*
|
||||
* @var UrlGeneratorInterface
|
||||
*/
|
||||
protected $urlGenerator;
|
||||
protected UrlGeneratorInterface $urlGenerator;
|
||||
|
||||
public function __construct(
|
||||
$totalItems,
|
||||
$itemPerPage,
|
||||
$currentPageNumber,
|
||||
$route,
|
||||
int $totalItems,
|
||||
int $itemPerPage,
|
||||
int $currentPageNumber,
|
||||
string $route,
|
||||
array $routeParameters,
|
||||
UrlGeneratorInterface $urlGenerator,
|
||||
$pageKey,
|
||||
$itemPerPageKey
|
||||
string $pageKey,
|
||||
string $itemPerPageKey
|
||||
) {
|
||||
$this->totalItems = $totalItems;
|
||||
$this->itemPerPage = $itemPerPage;
|
||||
@@ -98,12 +98,12 @@ class Paginator implements PaginatorInterface
|
||||
$this->itemPerPageKey = $itemPerPageKey;
|
||||
}
|
||||
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
return $this->countPages();
|
||||
}
|
||||
|
||||
public function countPages()
|
||||
public function countPages(): int
|
||||
{
|
||||
if (0 === $this->itemPerPage) {
|
||||
return 1;
|
||||
@@ -122,20 +122,17 @@ class Paginator implements PaginatorInterface
|
||||
return 0 === $nb ? 1 : (int) $nb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Chill\MainBundle\Pagination\Page
|
||||
*/
|
||||
public function getCurrentPage()
|
||||
public function getCurrentPage(): Page
|
||||
{
|
||||
return $this->getPage($this->currentPageNumber);
|
||||
}
|
||||
|
||||
public function getCurrentPageFirstItemNumber()
|
||||
public function getCurrentPageFirstItemNumber(): int
|
||||
{
|
||||
return $this->getCurrentPage()->getFirstItemNumber();
|
||||
}
|
||||
|
||||
public function getItemsPerPage()
|
||||
public function getItemsPerPage(): int
|
||||
{
|
||||
return $this->itemPerPage;
|
||||
}
|
||||
@@ -145,7 +142,7 @@ class Paginator implements PaginatorInterface
|
||||
*
|
||||
* @return \Chill\MainBundle\Pagination\Page
|
||||
*/
|
||||
public function getNextPage()
|
||||
public function getNextPage(): Page
|
||||
{
|
||||
if (!$this->hasNextPage()) {
|
||||
throw new RuntimeException('this page has no next page');
|
||||
@@ -155,11 +152,10 @@ class Paginator implements PaginatorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type $number
|
||||
*
|
||||
* @return \Chill\MainBundle\Pagination\Page
|
||||
*/
|
||||
public function getPage($number)
|
||||
public function getPage(int $number): Page
|
||||
{
|
||||
if (!$this->hasPage($number)) {
|
||||
throw new RuntimeException("The page with number {$number} does not "
|
||||
@@ -179,7 +175,7 @@ class Paginator implements PaginatorInterface
|
||||
);
|
||||
}
|
||||
|
||||
public function getPagesGenerator()
|
||||
public function getPagesGenerator(): iterable
|
||||
{
|
||||
for ($i = 1; $this->countPages() >= $i; ++$i) {
|
||||
yield $this->getPage($i);
|
||||
@@ -191,7 +187,7 @@ class Paginator implements PaginatorInterface
|
||||
*
|
||||
* @return \Chill\MainBundle\Pagination\Page
|
||||
*/
|
||||
public function getPreviousPage()
|
||||
public function getPreviousPage(): PageInterface
|
||||
{
|
||||
if (!$this->hasPreviousPage()) {
|
||||
throw new RuntimeException('this page has no previous page');
|
||||
@@ -200,7 +196,7 @@ class Paginator implements PaginatorInterface
|
||||
return $this->getPage($this->currentPageNumber - 1);
|
||||
}
|
||||
|
||||
public function getTotalItems()
|
||||
public function getTotalItems(): int
|
||||
{
|
||||
return $this->totalItems;
|
||||
}
|
||||
@@ -208,12 +204,12 @@ class Paginator implements PaginatorInterface
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasNextPage()
|
||||
public function hasNextPage(): bool
|
||||
{
|
||||
return $this->hasPage($this->currentPageNumber + 1);
|
||||
}
|
||||
|
||||
public function hasPage($number)
|
||||
public function hasPage($number): bool
|
||||
{
|
||||
if (0 === $this->totalItems) {
|
||||
return 1 === $number;
|
||||
@@ -226,18 +222,18 @@ class Paginator implements PaginatorInterface
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPreviousPage()
|
||||
public function hasPreviousPage(): bool
|
||||
{
|
||||
return $this->hasPage($this->currentPageNumber - 1);
|
||||
}
|
||||
|
||||
public function isCurrentPage(PageInterface $page)
|
||||
public function isCurrentPage(PageInterface $page): bool
|
||||
{
|
||||
return $page->getNumber() === $this->currentPageNumber;
|
||||
}
|
||||
|
||||
public function setItemsPerPage($itemPerPage)
|
||||
public function setItemsPerPage(int $itemsPerPage)
|
||||
{
|
||||
$this->itemPerPage = $itemPerPage;
|
||||
$this->itemPerPage = $itemsPerPage;
|
||||
}
|
||||
}
|
||||
|
@@ -124,12 +124,12 @@ class PaginatorFactory
|
||||
return array_merge(
|
||||
$this->router->getContext()->getParameters(),
|
||||
// get the route parameters
|
||||
$this->requestStack
|
||||
->getCurrentRequest()
|
||||
->attributes->get('_route_params'),
|
||||
$this->requestStack
|
||||
->getCurrentRequest()
|
||||
->attributes->get('_route_params'),
|
||||
// get the query parameters
|
||||
$this->requestStack
|
||||
->getCurrentRequest()->query->all()
|
||||
$this->requestStack
|
||||
->getCurrentRequest()->query->all()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -32,26 +32,26 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function countPages();
|
||||
public function countPages(): int;
|
||||
|
||||
/**
|
||||
* get the current page.
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
public function getCurrentPage();
|
||||
public function getCurrentPage(): PageInterface;
|
||||
|
||||
/**
|
||||
* get the first result for the current page.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getCurrentPageFirstItemNumber();
|
||||
public function getCurrentPageFirstItemNumber(): int;
|
||||
|
||||
/*
|
||||
* get the number of items per page
|
||||
*/
|
||||
public function getItemsPerPage();
|
||||
public function getItemsPerPage(): int;
|
||||
|
||||
/**
|
||||
* get the next page.
|
||||
@@ -60,7 +60,7 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
public function getNextPage();
|
||||
public function getNextPage(): PageInterface;
|
||||
|
||||
/**
|
||||
* get page by his number.
|
||||
@@ -69,14 +69,14 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @throws RuntimeException if the pagination has no page with specified number
|
||||
*/
|
||||
public function getPage($number);
|
||||
public function getPage(int $number): PageInterface;
|
||||
|
||||
/**
|
||||
* get a generator to generate pages.
|
||||
*
|
||||
* @return Generator which return PageInterface elements
|
||||
*/
|
||||
public function getPagesGenerator();
|
||||
public function getPagesGenerator(): iterable;
|
||||
|
||||
/**
|
||||
* get the previous page.
|
||||
@@ -85,35 +85,34 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
public function getPreviousPage();
|
||||
public function getPreviousPage(): PageInterface;
|
||||
|
||||
/**
|
||||
* get the number of results for this paginator.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTotalItems();
|
||||
public function getTotalItems(): int;
|
||||
|
||||
/**
|
||||
* check if the current page has a next page.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasNextPage();
|
||||
public function hasNextPage(): bool;
|
||||
|
||||
/**
|
||||
* check if the page with the given number exists.
|
||||
*
|
||||
* @param int $number
|
||||
*/
|
||||
public function hasPage($number);
|
||||
public function hasPage($number): bool;
|
||||
|
||||
/**
|
||||
* check if the current page has a page before.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPreviousPage();
|
||||
public function hasPreviousPage(): bool;
|
||||
|
||||
/**
|
||||
* check if the given page is the current page.
|
||||
@@ -122,10 +121,10 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isCurrentPage(PageInterface $page);
|
||||
public function isCurrentPage(PageInterface $page): bool;
|
||||
|
||||
/*
|
||||
* set the number of items per page
|
||||
*/
|
||||
public function setItemsPerPage($itemsPerPage);
|
||||
public function setItemsPerPage(int $itemsPerPage);
|
||||
}
|
||||
|
@@ -183,7 +183,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
}
|
||||
|
||||
// filter only number
|
||||
$filtered = preg_replace('/[^0-9]/', '', $phonenumber);
|
||||
$filtered = preg_replace('/[^0-9]/', '', (string) $phonenumber);
|
||||
|
||||
$item = $this->cachePool->getItem('pnum_' . $filtered);
|
||||
|
||||
|
@@ -26,28 +26,4 @@ use const E_USER_DEPRECATED;
|
||||
*/
|
||||
abstract class AbstractChillVoter extends Voter implements ChillVoterInterface
|
||||
{
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
@trigger_error(
|
||||
'This voter should implements the new `supports` '
|
||||
. 'methods introduced by Symfony 3.0, and do not rely on '
|
||||
. 'getSupportedAttributes and getSupportedClasses methods.',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
|
||||
// @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), true)
|
||||
&& in_array(get_class($subject), $this->getSupportedClasses(), true);
|
||||
}
|
||||
|
||||
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
|
||||
{
|
||||
@trigger_error('This voter should implements the new `voteOnAttribute` '
|
||||
. 'methods introduced by Symfony 3.0, and do not rely on '
|
||||
. 'isGranted method', E_USER_DEPRECATED);
|
||||
|
||||
// @TODO: isGranted() should be created in here and made abstract or in ChillVoterInterface.
|
||||
return $this->isGranted($attribute, $subject, $token->getUser());
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class Counter implements JsonSerializable
|
||||
return $this->counter;
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return ['count' => $this->counter];
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ interface ChillEntityRenderInterface
|
||||
/**
|
||||
* Return true if the class support this object for the given options.
|
||||
*
|
||||
* @param type $entity
|
||||
* @param object $entity
|
||||
*/
|
||||
public function supports($entity, array $options): bool;
|
||||
}
|
||||
|
@@ -70,23 +70,23 @@ class DelegatedBlockRenderingEvent extends Event implements ArrayAccess
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
public function offsetExists($offset)
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->context[$offset]);
|
||||
}
|
||||
|
||||
public function offsetGet($offset)
|
||||
public function offsetGet($offset): mixed
|
||||
{
|
||||
return $this->context[$offset];
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value)
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
throw new RuntimeException('The event context is read-only, you are not '
|
||||
. 'allowed to update it.');
|
||||
}
|
||||
|
||||
public function offsetUnset($offset)
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
throw new RuntimeException('The event context is read-only, you are not '
|
||||
. 'allowed to update it.');
|
||||
|
@@ -267,15 +267,15 @@ final class ExportManagerTest extends KernelTestCase
|
||||
)
|
||||
->willReturn(static function ($value) {
|
||||
switch ($value) {
|
||||
case 0:
|
||||
case 1:
|
||||
return $value;
|
||||
case 0:
|
||||
case 1:
|
||||
return $value;
|
||||
|
||||
case '_header':
|
||||
return 'export';
|
||||
case '_header':
|
||||
return 'export';
|
||||
|
||||
default: throw new RuntimeException(sprintf('The value %s is not valid', $value));
|
||||
}
|
||||
default: throw new RuntimeException(sprintf('The value %s is not valid', $value));
|
||||
}
|
||||
});
|
||||
|
||||
$export->getQueryKeys(Argument::Type('array'))->willReturn(['export']);
|
||||
@@ -307,15 +307,15 @@ final class ExportManagerTest extends KernelTestCase
|
||||
)
|
||||
->willReturn(static function ($value) {
|
||||
switch ($value) {
|
||||
case '_header': return 'foo_header';
|
||||
case '_header': return 'foo_header';
|
||||
|
||||
case 'cat a': return 'label cat a';
|
||||
case 'cat a': return 'label cat a';
|
||||
|
||||
case 'cat b': return 'label cat b';
|
||||
case 'cat b': return 'label cat b';
|
||||
|
||||
default:
|
||||
throw new RuntimeException(sprintf('This value (%s) is not valid', $value));
|
||||
}
|
||||
default:
|
||||
throw new RuntimeException(sprintf('This value (%s) is not valid', $value));
|
||||
}
|
||||
});
|
||||
$aggregator->addRole()->willReturn(null);
|
||||
//$aggregator->addRole()->shouldBeCalled();
|
||||
|
@@ -77,13 +77,13 @@ final class IdToEntityDataTransformerTest extends TestCase
|
||||
|
||||
public function testTransformMulti()
|
||||
{
|
||||
$o1 = new class() {
|
||||
$o1 = new class () {
|
||||
public function getId()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
$o2 = new class() {
|
||||
$o2 = new class () {
|
||||
public function getId()
|
||||
{
|
||||
return 2;
|
||||
@@ -104,7 +104,7 @@ final class IdToEntityDataTransformerTest extends TestCase
|
||||
|
||||
public function testTransformSingle()
|
||||
{
|
||||
$o = new class() {
|
||||
$o = new class () {
|
||||
public function getId()
|
||||
{
|
||||
return 1;
|
||||
|
@@ -33,7 +33,7 @@ final class DefaultScopeResolverTest extends TestCase
|
||||
public function testHasScopeInterface()
|
||||
{
|
||||
$scope = new Scope();
|
||||
$entity = new class($scope) implements HasScopeInterface {
|
||||
$entity = new class ($scope) implements HasScopeInterface {
|
||||
public function __construct(Scope $scope)
|
||||
{
|
||||
$this->scope = $scope;
|
||||
@@ -52,7 +52,7 @@ final class DefaultScopeResolverTest extends TestCase
|
||||
|
||||
public function testHasScopesInterface()
|
||||
{
|
||||
$entity = new class($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
|
||||
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
|
||||
public function __construct(Scope $scopeA, Scope $scopeB)
|
||||
{
|
||||
$this->scopes = [$scopeA, $scopeB];
|
||||
|
@@ -34,7 +34,7 @@ final class ScopeResolverDispatcherTest extends TestCase
|
||||
public function testHasScopeInterface()
|
||||
{
|
||||
$scope = new Scope();
|
||||
$entity = new class($scope) implements HasScopeInterface {
|
||||
$entity = new class ($scope) implements HasScopeInterface {
|
||||
public function __construct(Scope $scope)
|
||||
{
|
||||
$this->scope = $scope;
|
||||
@@ -52,7 +52,7 @@ final class ScopeResolverDispatcherTest extends TestCase
|
||||
|
||||
public function testHasScopesInterface()
|
||||
{
|
||||
$entity = new class($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
|
||||
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
|
||||
public function __construct(Scope $scopeA, Scope $scopeB)
|
||||
{
|
||||
$this->scopes = [$scopeA, $scopeB];
|
||||
|
@@ -63,18 +63,18 @@ class RoleScopeScopePresence extends ConstraintValidator
|
||||
|
||||
//if the role scope should have a scope
|
||||
if (
|
||||
!in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& $value->getScope() === null
|
||||
) {
|
||||
!in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& $value->getScope() === null
|
||||
) {
|
||||
$this->context->buildViolation($constraint->messagePresenceRequired)
|
||||
->setParameter('%role%', $this->translator->trans($value->getRole()))
|
||||
->addViolation();
|
||||
$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(), true)
|
||||
&& null !== $value->getScope()
|
||||
) {
|
||||
(
|
||||
in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& null !== $value->getScope()
|
||||
) {
|
||||
$this->context->buildViolation($constraint->messageNullRequired)
|
||||
->setParameter('%role%', $this->translator->trans($value->getRole()))
|
||||
->addViolation();
|
||||
|
@@ -343,7 +343,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
$person->setMobilenumber($value);
|
||||
|
||||
break;
|
||||
// we just keep the column number for those data
|
||||
// we just keep the column number for those data
|
||||
case 'postalcode':
|
||||
$postalCodeValue = $value;
|
||||
|
||||
|
@@ -59,6 +59,8 @@ final class PersonController extends AbstractController
|
||||
*/
|
||||
protected $personRepository;
|
||||
|
||||
private Security $security;
|
||||
|
||||
/**
|
||||
* @var SimilarPersonMatcher
|
||||
*/
|
||||
|
@@ -129,7 +129,7 @@ class Configuration implements ConfigurationInterface
|
||||
->defaultValue(false)
|
||||
->end()
|
||||
->end() // children of 'root', parent = root
|
||||
;
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
@@ -1155,7 +1155,7 @@ class AccompanyingPeriod implements
|
||||
|
||||
public function removeWork(AccompanyingPeriodWork $work): self
|
||||
{
|
||||
$this->work->removeElement($work);
|
||||
$this->works->removeElement($work);
|
||||
$work->setAccompanyingPeriod(null);
|
||||
|
||||
return $this;
|
||||
|
@@ -746,7 +746,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
foreach ($this->getAccompanyingPeriodParticipations()
|
||||
->map(fn (AccompanyingPeriodParticipation $app) => $app->getAccompanyingPeriod())
|
||||
as $period
|
||||
) {
|
||||
) {
|
||||
if (!$result->contains($period)) {
|
||||
$result->add($period);
|
||||
}
|
||||
|
@@ -65,9 +65,9 @@ class AccompanyingPeriodType extends AbstractType
|
||||
$accompanyingPeriod = $options['data'];
|
||||
|
||||
if (
|
||||
('close' === $options['period_action'])
|
||||
|| ('create' === $options['period_action'])
|
||||
|| ('update' === $options['period_action'] && !$accompanyingPeriod->isOpen())
|
||||
('close' === $options['period_action'])
|
||||
|| ('create' === $options['period_action'])
|
||||
|| ('update' === $options['period_action'] && !$accompanyingPeriod->isOpen())
|
||||
) {
|
||||
$builder->add('closingDate', DateType::class, [
|
||||
'required' => true,
|
||||
|
@@ -24,9 +24,9 @@ final class EvaluationRepository implements EvaluationRepositoryInterface
|
||||
$this->repository = $entityManager->getRepository(Evaluation::class);
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Evaluation
|
||||
public function find($id): ?Evaluation
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
return $this->repository->find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -16,7 +16,7 @@ use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
interface EvaluationRepositoryInterface extends ObjectRepository
|
||||
{
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Evaluation;
|
||||
public function find($id): ?Evaluation;
|
||||
|
||||
/**
|
||||
* @return array<int, Evaluation>
|
||||
|
@@ -38,9 +38,9 @@ final class GoalRepository implements ObjectRepository
|
||||
->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Goal
|
||||
public function find($id): ?Goal
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
return $this->repository->find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -48,9 +48,9 @@ final class ResultRepository implements ObjectRepository
|
||||
->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Result
|
||||
public function find($id): ?Result
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
return $this->repository->find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -32,9 +32,9 @@ final class SocialActionRepository implements ObjectRepository
|
||||
return $this->repository->createQueryBuilder($alias, $indexBy);
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?SocialAction
|
||||
public function find($id): ?SocialAction
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
return $this->repository->find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,9 +27,9 @@ final class SocialIssueRepository implements ObjectRepository
|
||||
$this->repository = $entityManager->getRepository(SocialIssue::class);
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?SocialIssue
|
||||
public function find($id): ?SocialIssue
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
return $this->repository->find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -26,6 +26,7 @@ use Chill\PersonBundle\Repository\PersonACLAwareRepositoryInterface;
|
||||
use DateTime;
|
||||
use Exception;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
@@ -162,11 +163,11 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
||||
$phonenumber = new PhoneNumber();
|
||||
$phonenumber->setNationalNumber($terms['phonenumber']);
|
||||
} catch (Exception $ex) {
|
||||
throw new ParsingException("The date for {$key} is "
|
||||
throw new ParsingException("The data for {$key} is "
|
||||
. 'not parsable', 0, $ex);
|
||||
}
|
||||
|
||||
$data['phonenumber'] = $phonenumber ?? null;
|
||||
$data['phonenumber'] = $phonenumber;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
@@ -51,7 +51,7 @@ class AccompanyingPeriodWorkEvaluationVoter extends Voter implements ChillVoterI
|
||||
{
|
||||
switch ($attribute) {
|
||||
case self::STATS:
|
||||
return $this->security->isGranted(AccompanyingPeriodWorkVoter::STATS, $subject);
|
||||
return $this->security->isGranted(AccompanyingPeriodVoter::STATS, $subject);
|
||||
|
||||
case self::SEE:
|
||||
return $this->security->isGranted(AccompanyingPeriodWorkVoter::SEE, $subject->getAccompanyingPeriodWork());
|
||||
|
@@ -24,12 +24,12 @@ class AuthorizedCenterOnPersonCreation implements AuthorizedCenterOnPersonCreati
|
||||
public function __construct(AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, ParameterBagInterface $parameterBag)
|
||||
{
|
||||
$this->authorizationHelperForCurrentUser = $authorizationHelperForCurrentUser;
|
||||
$this->showCenter = $parameterBag->get('chill_main')['acl']['form_show_centers'];
|
||||
$this->showCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
|
||||
}
|
||||
|
||||
public function getCenters(): array
|
||||
{
|
||||
if (!$this->showCenter) {
|
||||
if (!$this->showCenters) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
@@ -181,7 +181,7 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize
|
||||
{
|
||||
if (
|
||||
null === $data['concerned'] ?? null
|
||||
&& false === ·\is_array('concerned')
|
||||
&& false === \is_array('concerned')
|
||||
) {
|
||||
throw new Exception\UnexpectedValueException("The schema does not have any key 'concerned'");
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T
|
||||
|
||||
protected function generateClass(AccompanyingPeriod $period, Collection $socialIssues): AccompanyingPeriodLinkedWithSocialIssuesEntityInterface
|
||||
{
|
||||
return new class($period, $socialIssues) implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface {
|
||||
return new class ($period, $socialIssues) implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface {
|
||||
public Collection $socialIssues;
|
||||
|
||||
public AccompanyingPeriod $period;
|
||||
|
@@ -248,7 +248,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
->getRepository(\Chill\MainBundle\Entity\Country::class);
|
||||
|
||||
// load all countries in a single query
|
||||
$countryRepository->findBy(['countryCode' => $values]);
|
||||
$countryRepository->findBy(['countryCode' => $values]);
|
||||
|
||||
return function ($value) use ($key, $countryRepository) {
|
||||
if ('_header' === $value) {
|
||||
@@ -541,7 +541,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
. ' | ' . $label;
|
||||
}
|
||||
|
||||
if ('_other' === $slugChoice && $cfType->isChecked($cf, $choiceSlug, $decoded)) {
|
||||
if ('_other' === $slugChoice && $cfType->isChecked($cf, $slugChoice, $decoded)) {
|
||||
return $cfType->extractOtherValue($cf, $decoded);
|
||||
}
|
||||
|
||||
|
@@ -92,7 +92,7 @@ final class TimelineProviderTest extends WebTestCase
|
||||
{
|
||||
//static::$em->refresh($this->person);
|
||||
//static::$em->refresh($this->report);
|
||||
// static::$em->remove($this->person);
|
||||
// static::$em->remove($this->person);
|
||||
//static::$em->remove($this->report);
|
||||
}
|
||||
|
||||
|
@@ -83,7 +83,7 @@ class TaskController extends AbstractController
|
||||
|
||||
if (null === $task) {
|
||||
throw $this->createNotFoundException("task with id '{$taskId}' and type "
|
||||
. "'{$type}' does not exists");
|
||||
. "'{$kind}' does not exists");
|
||||
}
|
||||
|
||||
$workflow = $registry->get($task);
|
||||
|
@@ -88,22 +88,12 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
|
||||
return ChoiceType::class;
|
||||
}
|
||||
|
||||
public function reverseTransform($value)
|
||||
private function reverseTransform($value)
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$r = [];
|
||||
|
||||
foreach ($value as $v) {
|
||||
$r[] = $this->transform($v);
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
if ($value instanceof ThirdPartyCategory) {
|
||||
return 'category:' . $value->getId();
|
||||
}
|
||||
|
@@ -33,9 +33,8 @@ final class ThirdPartyRepository implements ObjectRepository
|
||||
/**
|
||||
* count amongst parties associated to $centers, with $terms parameters.
|
||||
*
|
||||
* @param type $terms
|
||||
*/
|
||||
public function countByMemberOfCenters(array $centers, $terms = []): int
|
||||
public function countByMemberOfCenters(array $centers, array $terms = []): int
|
||||
{
|
||||
$qb = $this->buildQuery($centers, $terms);
|
||||
$qb->select('COUNT(tp)');
|
||||
|
@@ -15,6 +15,7 @@ use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Search\SearchInterface;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
|
||||
use Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
@@ -47,16 +48,20 @@ class ThirdPartySearch implements SearchInterface
|
||||
*/
|
||||
protected $tokenStorage;
|
||||
|
||||
private ThirdPartyRepository $thirdPartyRepository;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $em,
|
||||
TokenStorageInterface $tokenStorage,
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
PaginatorFactory $paginatorFactory
|
||||
PaginatorFactory $paginatorFactory,
|
||||
ThirdPartyRepository $thirdPartyRepository
|
||||
) {
|
||||
$this->em = $em;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->paginatorFactory = $paginatorFactory;
|
||||
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||
}
|
||||
|
||||
public function getOrder(): int
|
||||
@@ -74,7 +79,7 @@ class ThirdPartySearch implements SearchInterface
|
||||
$centers = $this->authorizationHelper
|
||||
->getReachableCenters(
|
||||
$this->tokenStorage->getToken()->getUser(),
|
||||
new Role(ThirdPartyVoter::SHOW)
|
||||
ThirdPartyVoter::SHOW
|
||||
);
|
||||
$total = $this->count($centers, $terms);
|
||||
$paginator = $this->paginatorFactory->create($total);
|
||||
@@ -84,7 +89,7 @@ class ThirdPartySearch implements SearchInterface
|
||||
|
||||
if ('json' === $format) {
|
||||
return [
|
||||
'results' => $this->em->getRepository(ThirdParty::class)
|
||||
'results' => $this->thirdPartyRepository
|
||||
->findByMemberOfCenters(
|
||||
$centers,
|
||||
$start,
|
||||
@@ -104,7 +109,7 @@ class ThirdPartySearch implements SearchInterface
|
||||
|
||||
protected function count($centers, $terms): int
|
||||
{
|
||||
return $this->em->getRepository(ThirdParty::class)
|
||||
return $this->thirdPartyRepository
|
||||
->countByMemberOfCenters($centers, $terms);
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,7 @@
|
||||
services:
|
||||
Chill\ThirdPartyBundle\Search\ThirdPartySearch:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
|
||||
$paginatorFactory: '@Chill\MainBundle\Pagination\PaginatorFactory'
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
tags:
|
||||
- { name: 'chill.search', alias: '3party' }
|
||||
|
||||
|
@@ -69,27 +69,21 @@ class Convert
|
||||
|
||||
$content = $this->storedObjectManager->read($storedObject);
|
||||
|
||||
try {
|
||||
$url = sprintf('%s/cool/convert-to/pdf', $this->collaboraDomain);
|
||||
$form = new FormDataPart([
|
||||
'data' => new DataPart($content, $storedObject->getUuid()->toString(), $storedObject->getType()),
|
||||
]);
|
||||
$response = $this->httpClient->request('POST', $url, [
|
||||
'headers' => $form->getPreparedHeaders()->toArray(),
|
||||
'body' => $form->bodyToString(),
|
||||
'timeout' => 10,
|
||||
]);
|
||||
$url = sprintf('%s/cool/convert-to/pdf', $this->collaboraDomain);
|
||||
$form = new FormDataPart([
|
||||
'data' => new DataPart($content, $storedObject->getUuid()->toString(), $storedObject->getType()),
|
||||
]);
|
||||
$response = $this->httpClient->request('POST', $url, [
|
||||
'headers' => $form->getPreparedHeaders()->toArray(),
|
||||
'body' => $form->bodyToString(),
|
||||
'timeout' => 10,
|
||||
]);
|
||||
|
||||
try {
|
||||
return new Response($response->getContent(), Response::HTTP_OK, [
|
||||
'Content-Type' => 'application/pdf',
|
||||
]);
|
||||
} catch (ClientExceptionInterface $exception) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
} catch (RedirectionExceptionInterface $e) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
} catch (ServerExceptionInterface $e) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
} catch (ClientExceptionInterface|TransportExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface $exception) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ final class ChillDocumentManager implements DocumentManagerInterface
|
||||
$document->setFilename($data['name']);
|
||||
|
||||
$this->entityManager->persist($document);
|
||||
$this->entityManager->flush($document);
|
||||
$this->entityManager->flush();
|
||||
|
||||
// TODO : Ask proper mapping.
|
||||
// Available: basename, name, extension, content, size
|
||||
|
@@ -32,7 +32,7 @@ class UserManager implements \ChampsLibres\WopiBundle\Contracts\UserManagerInter
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $user->getLabel();
|
||||
return $user->getLabel();
|
||||
}
|
||||
|
||||
public function getUserId(string $accessToken, string $fileId, RequestInterface $request): ?string
|
||||
|
Submodule tests/app updated: 8694ad7c4d...3cb4c26fe7
Reference in New Issue
Block a user