Skip to content

Commit

Permalink
IBX-4929: Fix PhpDoc (#280)
Browse files Browse the repository at this point in the history
* ConfigurationDumper.php: Move to @phpstam-param

Avoid the following error:
Unable to parse file "vendor/ibexa/core/src/contracts/Container/Encore/ConfigurationDumper.php", an error was detected: Unexpected token ":", expected '}'

* phpDoc: Remove list bullets

phpDoc description is interpreted as Markdown. Those hyphens were generating one-item unordered lists.

* Update src/contracts/Container/Encore/ConfigurationDumper.php

* Update src/contracts/Container/Encore/ConfigurationDumper.php

* phpstan-baseline.neon: Remove fixed errors

* ConfigurationDumper.php: Back to @param

The syntax is accepted by phpDocumentor 3.3.1 and 3.4.1;
The syntax error was only due to question mark misplacement.

---------

Co-authored-by: Adrien Dupuis <[email protected]>
  • Loading branch information
adriendupuis and adriendupuis authored Oct 20, 2023
1 parent 3a2be98 commit 09972d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5005,11 +5005,6 @@ parameters:
count: 1
path: src/contracts/Container/Encore/ConfigurationDumper.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Container\\\\Encore\\\\ConfigurationDumper\\:\\:dumpCustomConfiguration\\(\\) has parameter \\$webpackConfigNames with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Container/Encore/ConfigurationDumper.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Container\\\\Encore\\\\ConfigurationDumper\\:\\:locateConfigurationFiles\\(\\) has parameter \\$bundlesMetadata with no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -5025,11 +5020,6 @@ parameters:
count: 1
path: src/contracts/Container/Encore/ConfigurationDumper.php

-
message: "#^PHPDoc tag @param has invalid value \\(array\\<string, array\\<string, array\\{\\?'deprecated'\\: bool, \\?'alternative'\\: string\\}\\>\\> \\$webpackConfigNames\\)\\: Unexpected token \"\\:\", expected '\\}' at offset 65$#"
count: 1
path: src/contracts/Container/Encore/ConfigurationDumper.php

-
message: "#^Parameter \\#1 \\$bundlesMetadata of method Ibexa\\\\Contracts\\\\Core\\\\Container\\\\Encore\\\\ConfigurationDumper\\:\\:locateConfigurationFiles\\(\\) expects array, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Container/Encore/ConfigurationDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $containerBuilder)
}

/**
* @param array<string, array<string, array{?'deprecated': bool, ?'alternative': string}>> $webpackConfigNames
* @param array<string, array<string, array{'deprecated'?: bool, 'alternative'?: string}>> $webpackConfigNames
*
* @throws \JsonException
*/
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Repository/LocationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ interface LocationService
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException If the current user user does not have read access to the whole source subtree
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if the target location is a sub location of the given location
*
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $subtree - the subtree denoted by the location to copy
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $targetParentLocation - the target parent location for the copy operation
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $subtree the subtree denoted by the location to copy
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $targetParentLocation the target parent location for the copy operation
*
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Location The newly created location of the copied subtree
*/
Expand Down
6 changes: 3 additions & 3 deletions src/contracts/Search/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Handler
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if Query criterion is not applicable to its target
*
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Query $query
* @param array $languageFilter - a map of language related filters specifying languages query will be performed on.
* @param array $languageFilter a map of language related filters specifying languages query will be performed on.
* Also used to define which field languages are loaded for the returned content.
* Currently supports: <code>array("languages" => array(<language1>,..), "useAlwaysAvailable" => bool)</code>
* useAlwaysAvailable defaults to true to avoid exceptions on missing translations
Expand All @@ -41,7 +41,7 @@ public function findContent(Query $query, array $languageFilter = []);
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if there is more than than one result matching the criterions
*
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $filter
* @param array $languageFilter - a map of language related filters specifying languages query will be performed on.
* @param array $languageFilter a map of language related filters specifying languages query will be performed on.
* Also used to define which field languages are loaded for the returned content.
* Currently supports: <code>array("languages" => array(<language1>,..), "useAlwaysAvailable" => bool)</code>
* useAlwaysAvailable defaults to true to avoid exceptions on missing translations
Expand All @@ -54,7 +54,7 @@ public function findSingle(Criterion $filter, array $languageFilter = []);
* Finds locations for the given $query.
*
* @param \Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery $query
* @param array $languageFilter - a map of language related filters specifying languages query will be performed on.
* @param array $languageFilter a map of language related filters specifying languages query will be performed on.
* Also used to define which field languages are loaded for the returned content.
* Currently supports: <code>array("languages" => array(<language1>,..), "useAlwaysAvailable" => bool)</code>
* useAlwaysAvailable defaults to true to avoid exceptions on missing translations
Expand Down

0 comments on commit 09972d4

Please sign in to comment.