Skip to content

Commit 25923b9

Browse files
committed
Fixed new batch of errors (#2857)
1 parent b13ceae commit 25923b9

File tree

7 files changed

+8
-26
lines changed

7 files changed

+8
-26
lines changed

code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getSettingsSchema(): array
3232

3333
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
3434
{
35-
$definition = $data->fieldDefinition;
35+
$definition = $data->getFieldDefinition();
3636
$fieldForm->add('value', Point2DType::class, [
3737
'required' => $definition->isRequired,
3838
'label' => $definition->getName(),

code_samples/field_types/2dpoint_ft/steps/step_3/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function getFieldTypeIdentifier(): string
1818

1919
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
2020
{
21-
$definition = $data->fieldDefinition;
21+
$definition = $data->getFieldDefinition();
2222
$fieldForm->add('value', Point2DType::class, [
2323
'required' => $definition->isRequired,
2424
'label' => $definition->getName(),

code_samples/field_types/2dpoint_ft/steps/step_6/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getSettingsSchema(): array
2828

2929
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
3030
{
31-
$definition = $data->fieldDefinition;
31+
$definition = $data->getFieldDefinition();
3232
$fieldForm->add('value', Point2DType::class, [
3333
'required' => $definition->isRequired,
3434
'label' => $definition->getName(),

code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function getFieldTypeIdentifier(): string
1717

1818
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
1919
{
20-
$definition = $data->fieldDefinition;
20+
$definition = $data->getFieldDefinition();
2121

2222
$fieldForm->add('value', HelloWorldType::class, [
2323
'required' => $definition->isRequired,

code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
final class CameraManufacturerVisitor extends CriterionVisitor
1212
{
13-
public function canVisit(CriterionInterface $criterion)
13+
public function canVisit(CriterionInterface $criterion): bool
1414
{
1515
return $criterion instanceof CameraManufacturerCriterion;
1616
}
1717

1818
/**
1919
* @param \App\Query\Criterion\CameraManufacturerCriterion $criterion
2020
*/
21-
public function visit(CriterionInterface $criterion, CriterionVisitor $subVisitor = null)
21+
public function visit(CriterionInterface $criterion, ?CriterionVisitor $subVisitor = null): string
2222
{
2323
$expressions = array_map(
2424
fn ($value): string => 'exif_camera_manufacturer_id:"' . $this->escapeQuote((string) $value) . '"',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ public function __construct(protected ContentHandler $contentHandler, protected
1414
{
1515
}
1616

17-
public function accept(Content $content)
17+
public function accept(Content $content): bool
1818
{
1919
// ContentType with ID 42 is webinar event
2020
return $content->versionInfo->contentInfo->contentTypeId == 42;
2121
}
2222

23-
public function mapFields(Content $content)
23+
public function mapFields(Content $content): array
2424
{
2525
$mainLocationId = $content->versionInfo->contentInfo->mainLocationId;
2626
$location = $this->locationHandler->load($mainLocationId);

phpstan-baseline.neon

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -606,30 +606,12 @@ parameters:
606606
count: 1
607607
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php
608608

609-
-
610-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationResultExtractor\:\:canVisit\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#'
611-
identifier: missingType.iterableValue
612-
count: 1
613-
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php
614-
615-
-
616-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationResultExtractor\:\:extract\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#'
617-
identifier: missingType.iterableValue
618-
count: 1
619-
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php
620-
621609
-
622610
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationVisitor\:\:formatRangeValue\(\) has parameter \$value with no type specified\.$#'
623611
identifier: missingType.parameter
624612
count: 1
625613
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php
626614

627-
-
628-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationVisitor\:\:visit\(\) should return array\<string\> but returns array\<string, array\<string, array\<string, string\>\>\|string\>\.$#'
629-
identifier: return.type
630-
count: 1
631-
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php
632-
633615
-
634616
message: '#^Method App\\Query\\Criterion\\Elasticsearch\\CameraManufacturerVisitor\:\:visit\(\) return type has no value type specified in iterable type array\.$#'
635617
identifier: missingType.iterableValue

0 commit comments

Comments
 (0)