Skip to content

Commit

Permalink
IBX-4929: Fix PhpDoc tags (#48)
Browse files Browse the repository at this point in the history
* EndpointRegistry.php: Fixed an @var syntax

Tag "var" with body "@var array(string => Endpoint)" has error "\Ibexa\Solr\Gateway\string =" is not a valid Fqsen.

* ResultExtractor.php: Fixed a @param syntax

* Regenerated phpstan-baseline.neon

* AggregationVisitor.php: Moved from @param to @phpstan-param

Tag "param" with body "@param array{languages: string[]} $languageFilter" has error "\Ibexa\Contracts\Solr\Query\array{languages: string" is not a valid Fqsen.

---------

Co-authored-by: Adrien Dupuis <[email protected]>
  • Loading branch information
adriendupuis and adriendupuis authored Apr 5, 2023
1 parent 4f07b02 commit 4f909ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
12 changes: 1 addition & 11 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ parameters:
path: src/lib/FieldMapper/ContentFieldMapper/ContentDocumentLocationFields.php

-
message: "#^Offset 'ancestors' does not exist on array\\{ancestors\\?\\: non\\-empty\\-array\\<int, mixed\\>, ids\\: non\\-empty\\-array\\<int, mixed\\>, parent_ids\\: non\\-empty\\-array\\<int, mixed\\>, path_strings\\: non\\-empty\\-array\\<int, string\\>, remote_ids\\: non\\-empty\\-array\\<int, mixed\\>\\}\\.$#"
message: "#^Offset 'ancestors' does not exist on array\\{ancestors\\?\\: non\\-empty\\-array\\<int\\<0, max\\>, mixed\\>, ids\\: non\\-empty\\-array\\<int\\<0, max\\>, mixed\\>, parent_ids\\: non\\-empty\\-array\\<int\\<0, max\\>, mixed\\>, path_strings\\: non\\-empty\\-array\\<int\\<0, max\\>, string\\>, remote_ids\\: non\\-empty\\-array\\<int\\<0, max\\>, mixed\\>\\}\\.$#"
count: 1
path: src/lib/FieldMapper/ContentFieldMapper/ContentDocumentLocationFields.php

Expand Down Expand Up @@ -505,11 +505,6 @@ parameters:
count: 1
path: src/lib/Gateway/EndpointRegistry.php

-
message: "#^Property Ibexa\\\\Solr\\\\Gateway\\\\EndpointRegistry\\:\\:\\$endpoint type has no value type specified in iterable type array\\.$#"
count: 1
path: src/lib/Gateway/EndpointRegistry.php

-
message: "#^Method Ibexa\\\\Solr\\\\Gateway\\\\EndpointResolver\\:\\:getSearchTargets\\(\\) has parameter \\$languageSettings with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1265,11 +1260,6 @@ parameters:
count: 1
path: src/lib/ResultExtractor.php

-
message: "#^Method Ibexa\\\\Solr\\\\ResultExtractor\\:\\:getMatchedLanguageCode\\(\\) has parameter \\$hit with no type specified\\.$#"
count: 1
path: src/lib/ResultExtractor.php

-
message: "#^Parameter \\#3 \\$facetBuilder of method Ibexa\\\\Solr\\\\Query\\\\FacetFieldVisitor\\:\\:mapField\\(\\) expects Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\FacetBuilder, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\FacetBuilder\\|null given\\.$#"
count: 1
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Query/AggregationVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ interface AggregationVisitor
/**
* Check if visitor is applicable to current aggreagtion.
*
* @param array{languages: string[]} $languageFilter
* @phpstan-param array{languages: string[]} $languageFilter
*/
public function canVisit(Aggregation $aggregation, array $languageFilter): bool;

/**
* @param array{languages: string[]} $languageFilter
* @phpstan-param array{languages: string[]} $languageFilter
*
* @return string[]
*/
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Gateway/EndpointRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EndpointRegistry
/**
* Registered endpoints.
*
* @var array(string => Endpoint)
* @var array<string, Endpoint>
*/
protected $endpoint = [];

Expand Down
2 changes: 1 addition & 1 deletion src/lib/ResultExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ abstract public function extractHit($hit);
/**
* Returns language code of the Content's translation of the matched document.
*
* @param $hit
* @param mixed $hit
*
* @return string
*/
Expand Down

0 comments on commit 4f909ec

Please sign in to comment.