Skip to content

Commit 43cf730

Browse files
committed
Make PHPStan happy after rebase
1 parent 93e0c02 commit 43cf730

File tree

3 files changed

+66
-48
lines changed

3 files changed

+66
-48
lines changed

code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function buildValue(array $limitationValues): CustomLimitationValue
5757
*
5858
* @return bool|null
5959
*/
60-
public function evaluate(Limitation $value, UserReference $currentUser, ValueObject $object, array $targets = null): ?bool
60+
public function evaluate(Limitation $value, UserReference $currentUser, object $object, ?array $targets = null): ?bool
6161
{
6262
if (!$value instanceof CustomLimitationValue) {
6363
throw new InvalidArgumentException('$value', 'Must be of type: CustomLimitationValue');

code_samples/search/custom/src/Search/FieldMapper/WebinarEventTitleFulltextFieldMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public function __construct(
2222
$this->locationHandler = $locationHandler;
2323
}
2424

25-
public function accept(Content $content)
25+
public function accept(Content $content): bool
2626
{
2727
// ContentType with ID 42 is webinar event
2828
return $content->versionInfo->contentInfo->contentTypeId == 42;
2929
}
3030

31-
public function mapFields(Content $content)
31+
public function mapFields(Content $content): array
3232
{
3333
$mainLocationId = $content->versionInfo->contentInfo->mainLocationId;
3434
$location = $this->locationHandler->load($mainLocationId);

phpstan-baseline.neon

Lines changed: 63 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: '#^Method App\\AI\\REST\\Output\\ValueObjectVisitor\\AudioText\:\:visit\(\) has parameter \$data with no type specified\.$#'
5+
identifier: missingType.parameter
6+
count: 1
7+
path: code_samples/ai_actions/src/AI/REST/Output/ValueObjectVisitor/AudioText.php
8+
39
-
410
message: '#^Class App\\Form\\Type\\TextToTextOptionsType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#'
511
identifier: missingType.generics
@@ -25,7 +31,7 @@ parameters:
2531
path: code_samples/api/graphql/src/DependencyInjection/Compiler/MyCustomTypeGraphQLCompilerPass.php
2632

2733
-
28-
message: '#^Parameter \#1 \$migration of method Ibexa\\Migration\\MigrationService\:\:executeOne\(\) expects Ibexa\\Migration\\Repository\\Migration, Ibexa\\Migration\\Repository\\Migration\|null given\.$#'
34+
message: '#^Parameter \#1 \$migration of method Ibexa\\Contracts\\Migration\\MigrationService\:\:executeOne\(\) expects Ibexa\\Migration\\Repository\\Migration, Ibexa\\Migration\\Repository\\Migration\|null given\.$#'
2935
identifier: argument.type
3036
count: 1
3137
path: code_samples/api/migration/src/Command/MigrationCommand.php
@@ -60,12 +66,6 @@ parameters:
6066
count: 3
6167
path: code_samples/api/public_php_api/src/Command/CreateContentTypeCommand.php
6268

63-
-
64-
message: '#^Parameter \#1 \$messages of method Symfony\\Component\\Console\\Output\\OutputInterface\:\:writeln\(\) expects iterable\<string\>\|string, string\|null given\.$#'
65-
identifier: argument.type
66-
count: 1
67-
path: code_samples/api/public_php_api/src/Command/FilterLocationCommand.php
68-
6969
-
7070
message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$url\.$#'
7171
identifier: property.protected
@@ -210,6 +210,12 @@ parameters:
210210
count: 1
211211
path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php
212212

213+
-
214+
message: '#^Method App\\Rest\\ValueObjectVisitor\\Greeting\:\:visit\(\) has parameter \$data with no type specified\.$#'
215+
identifier: missingType.parameter
216+
count: 1
217+
path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php
218+
213219
-
214220
message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\> given\.$#'
215221
identifier: argument.type
@@ -240,12 +246,6 @@ parameters:
240246
count: 1
241247
path: code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php
242248

243-
-
244-
message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProvider\:\:getPlaceholder\(\) has parameter \$options with no value type specified in iterable type array\.$#'
245-
identifier: missingType.iterableValue
246-
count: 1
247-
path: code_samples/back_office/images/src/PlaceholderProvider.php
248-
249249
-
250250
message: '#^Method App\\Security\\Limitation\\Mapper\\CustomLimitationFormMapper\:\:mapLimitationForm\(\) has parameter \$form with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
251251
identifier: missingType.generics
@@ -294,12 +294,6 @@ parameters:
294294
count: 1
295295
path: code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php
296296

297-
-
298-
message: '#^Method App\\Setting\\Group\\MyGroup\:\:__construct\(\) has parameter \$values with no value type specified in iterable type array\.$#'
299-
identifier: missingType.iterableValue
300-
count: 1
301-
path: code_samples/back_office/settings/src/Setting/Group/MyGroup.php
302-
303297
-
304298
message: '#^Method App\\Setting\\Unit\:\:mapFieldForm\(\) has parameter \$formBuilder with generic interface Symfony\\Component\\Form\\FormBuilderInterface but does not specify its types\: TData$#'
305299
identifier: missingType.generics
@@ -378,6 +372,18 @@ parameters:
378372
count: 1
379373
path: code_samples/customer_portal/src/Form/VerifyType.php
380374

375+
-
376+
message: '#^Property App\\Command\\ManageDiscountsCommand\:\:\$defaultName has no type specified\.$#'
377+
identifier: missingType.property
378+
count: 1
379+
path: code_samples/discounts/src/Command/ManageDiscountsCommand.php
380+
381+
-
382+
message: '#^Access to protected property Ibexa\\Contracts\\ContentForms\\Data\\Content\\FieldData\:\:\$fieldDefinition\.$#'
383+
identifier: property.protected
384+
count: 1
385+
path: code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php
386+
381387
-
382388
message: '#^Method App\\FieldType\\Point2D\\Type\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#'
383389
identifier: missingType.iterableValue
@@ -420,12 +426,24 @@ parameters:
420426
count: 1
421427
path: code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php
422428

429+
-
430+
message: '#^Access to protected property Ibexa\\Contracts\\ContentForms\\Data\\Content\\FieldData\:\:\$fieldDefinition\.$#'
431+
identifier: property.protected
432+
count: 1
433+
path: code_samples/field_types/2dpoint_ft/steps/step_3/Type.php
434+
423435
-
424436
message: '#^Method App\\FieldType\\Point2D\\Type\:\:mapFieldValueForm\(\) has parameter \$fieldForm with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
425437
identifier: missingType.generics
426438
count: 1
427439
path: code_samples/field_types/2dpoint_ft/steps/step_3/Type.php
428440

441+
-
442+
message: '#^Access to protected property Ibexa\\Contracts\\ContentForms\\Data\\Content\\FieldData\:\:\$fieldDefinition\.$#'
443+
identifier: property.protected
444+
count: 1
445+
path: code_samples/field_types/2dpoint_ft/steps/step_6/Type.php
446+
429447
-
430448
message: '#^Method App\\FieldType\\Point2D\\Type\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#'
431449
identifier: missingType.iterableValue
@@ -444,6 +462,12 @@ parameters:
444462
count: 1
445463
path: code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Comparable.php
446464

465+
-
466+
message: '#^Access to protected property Ibexa\\Contracts\\ContentForms\\Data\\Content\\FieldData\:\:\$fieldDefinition\.$#'
467+
identifier: property.protected
468+
count: 1
469+
path: code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php
470+
447471
-
448472
message: '#^Method App\\FieldType\\HelloWorld\\Type\:\:mapFieldValueForm\(\) has parameter \$fieldForm with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
449473
identifier: missingType.generics
@@ -456,12 +480,6 @@ parameters:
456480
count: 1
457481
path: code_samples/field_types/generic_ft/src/Form/Type/HelloWorldType.php
458482

459-
-
460-
message: '#^Method App\\FormBuilder\\FieldType\\Field\\Mapper\\CheckboxWithRichtextDescriptionFieldMapper\:\:mapFormOptions\(\) return type has no value type specified in iterable type array\.$#'
461-
identifier: missingType.iterableValue
462-
count: 1
463-
path: code_samples/forms/custom_form_attribute/src/FormBuilder/FieldType/Field/Mapper/CheckboxWithRichtextDescriptionFieldMapper.php
464-
465483
-
466484
message: '#^Class App\\FormBuilder\\Form\\Type\\CheckboxWithRichtextDescriptionType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#'
467485
identifier: missingType.generics
@@ -474,12 +492,6 @@ parameters:
474492
count: 1
475493
path: code_samples/forms/custom_form_attribute/src/FormBuilder/Form/Type/FieldAttribute/AttributeRichtextDescriptionType.php
476494

477-
-
478-
message: '#^Method App\\FormBuilder\\Field\\Mapper\\CountryFieldMapper\:\:mapFormOptions\(\) return type has no value type specified in iterable type array\.$#'
479-
identifier: missingType.iterableValue
480-
count: 1
481-
path: code_samples/forms/custom_form_field/src/FormBuilder/Field/Mapper/CountryFieldMapper.php
482-
483495
-
484496
message: '#^Method App\\QueryType\\LatestContentQueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#'
485497
identifier: missingType.iterableValue
@@ -637,20 +649,14 @@ parameters:
637649
path: code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationResultExtractor.php
638650

639651
-
640-
message: '#^Argument of an invalid type stdClass supplied for foreach, only iterables are supported\.$#'
641-
identifier: foreach.nonIterable
642-
count: 1
643-
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php
644-
645-
-
646-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationResultExtractor\:\:canVisit\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#'
647-
identifier: missingType.iterableValue
652+
message: '#^Class App\\Query\\Aggregation\\PriorityRangeAggregation extends generic class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Aggregation\\AbstractRangeAggregation but does not specify its types\: TValue$#'
653+
identifier: missingType.generics
648654
count: 1
649-
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php
655+
path: code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php
650656

651657
-
652-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationResultExtractor\:\:extract\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#'
653-
identifier: missingType.iterableValue
658+
message: '#^Argument of an invalid type stdClass supplied for foreach, only iterables are supported\.$#'
659+
identifier: foreach.nonIterable
654660
count: 1
655661
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php
656662

@@ -661,8 +667,8 @@ parameters:
661667
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php
662668

663669
-
664-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationVisitor\:\:visit\(\) should return array\<string\> but returns array\<string, array\<string, array\<string, string\>\>\|string\>\.$#'
665-
identifier: return.type
670+
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationVisitor\:\:visit\(\) has parameter \$aggregation with generic class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Aggregation\\AbstractRangeAggregation but does not specify its types\: TValue$#'
671+
identifier: missingType.generics
666672
count: 1
667673
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php
668674

@@ -672,6 +678,18 @@ parameters:
672678
count: 1
673679
path: code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php
674680

681+
-
682+
message: '#^Method App\\Query\\Criterion\\Solr\\CameraManufacturerVisitor\:\:canVisit\(\) has no return type specified\.$#'
683+
identifier: missingType.return
684+
count: 1
685+
path: code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php
686+
687+
-
688+
message: '#^Method App\\Query\\Criterion\\Solr\\CameraManufacturerVisitor\:\:visit\(\) has no return type specified\.$#'
689+
identifier: missingType.return
690+
count: 1
691+
path: code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php
692+
675693
-
676694
message: '#^Parameter \#2 \$array of function array_map expects array, array\<bool\|float\|int\|string\>\|bool\|float\|int\|string given\.$#'
677695
identifier: argument.type
@@ -751,7 +769,7 @@ parameters:
751769
path: code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php
752770

753771
-
754-
message: '#^Offset ''data'' might not exist on array\|null\.$#'
772+
message: '#^Offset ''data'' might not exist on array\<string, mixed\>\|null\.$#'
755773
identifier: offsetAccess.notFound
756774
count: 1
757775
path: code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php

0 commit comments

Comments
 (0)