Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getSettingsSchema(): array

public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
{
$definition = $data->fieldDefinition;
$definition = $data->getFieldDefinition();
$fieldForm->add('value', Point2DType::class, [
'required' => $definition->isRequired,
'label' => $definition->getName(),
Expand Down
2 changes: 1 addition & 1 deletion code_samples/field_types/2dpoint_ft/steps/step_3/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getFieldTypeIdentifier(): string

public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
{
$definition = $data->fieldDefinition;
$definition = $data->getFieldDefinition();
$fieldForm->add('value', Point2DType::class, [
'required' => $definition->isRequired,
'label' => $definition->getName(),
Expand Down
2 changes: 1 addition & 1 deletion code_samples/field_types/2dpoint_ft/steps/step_6/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getSettingsSchema(): array

public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
{
$definition = $data->fieldDefinition;
$definition = $data->getFieldDefinition();
$fieldForm->add('value', Point2DType::class, [
'required' => $definition->isRequired,
'label' => $definition->getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function getFieldTypeIdentifier(): string

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

$fieldForm->add('value', HelloWorldType::class, [
'required' => $definition->isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

final class CameraManufacturerVisitor extends CriterionVisitor
{
public function canVisit(CriterionInterface $criterion)
public function canVisit(CriterionInterface $criterion): bool
{
return $criterion instanceof CameraManufacturerCriterion;
}

/**
* @param \App\Query\Criterion\CameraManufacturerCriterion $criterion
*/
public function visit(CriterionInterface $criterion, CriterionVisitor $subVisitor = null)
public function visit(CriterionInterface $criterion, ?CriterionVisitor $subVisitor = null): string
{
$expressions = array_map(
fn ($value): string => 'exif_camera_manufacturer_id:"' . $this->escapeQuote((string) $value) . '"',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public function __construct(protected ContentHandler $contentHandler, protected
{
}

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

public function mapFields(Content $content)
public function mapFields(Content $content): array
{
$mainLocationId = $content->versionInfo->contentInfo->mainLocationId;
$location = $this->locationHandler->load($mainLocationId);
Expand Down
18 changes: 0 additions & 18 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -606,30 +606,12 @@ parameters:
count: 1
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php

-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationResultExtractor\:\:canVisit\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php

-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationResultExtractor\:\:extract\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php

-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationVisitor\:\:formatRangeValue\(\) has parameter \$value with no type specified\.$#'
identifier: missingType.parameter
count: 1
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php

-
message: '#^Method App\\Query\\Aggregation\\Solr\\PriorityRangeAggregationVisitor\:\:visit\(\) should return array\<string\> but returns array\<string, array\<string, array\<string, string\>\>\|string\>\.$#'
identifier: return.type
count: 1
path: code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php

-
message: '#^Method App\\Query\\Criterion\\Elasticsearch\\CameraManufacturerVisitor\:\:visit\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down
Loading