Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes PhpDoc #311

Merged
merged 7 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7410,11 +7410,6 @@ parameters:
count: 1
path: src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResultList.php

-
message: "#^PHPDoc tag @property\\-read has invalid value \\(string\\[\\] languageCodes the languages for which this alias is valid\\)\\: Unexpected token \"languageCodes\", expected variable at offset 451$#"
count: 1
path: src/contracts/Repository/Values/Content/URLAlias.php

adriendupuis marked this conversation as resolved.
Show resolved Hide resolved
-
message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLWildcard\\\\SearchResult implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#"
count: 1
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Collection/AbstractInMemoryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
*/
abstract class AbstractInMemoryCollection implements CollectionInterface, StreamableInterface
{
/** @var TValue[] */
/** @phpstan-var TValue[] */
protected array $items;

/**
* @param TValue[] $items
* @phpstan-param TValue[] $items
*/
public function __construct(array $items = [])
{
Expand Down
8 changes: 4 additions & 4 deletions src/contracts/Collection/ArrayList.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class ArrayList extends AbstractInMemoryCollection implements ListInterface
{
/**
* @param TValue[] $items
* @phpstan-param TValue[] $items
*/
public function __construct(array $items = [])
{
Expand All @@ -45,17 +45,17 @@ public function last()
}

/**
* @param TValue $value
* @phpstan-param TValue $value
*/
public function contains($value): bool
{
return in_array($value, $this->items, true);
}

/**
* @param TValue[] $items
* @phpstan-param TValue[] $items
*
* @return \Ibexa\Contracts\Core\Collection\ArrayList<TValue>
* @phpstan-return \Ibexa\Contracts\Core\Collection\ArrayList<TValue>
*/
protected function createFrom(array $items): self
{
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Collection/ArrayMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public function has($key): bool
}

/**
* @param TValue[] $items
* @phpstan-param TValue[] $items
*
* @return \Ibexa\Contracts\Core\Collection\ArrayMap<TKey,TValue>
* @phpstan-return \Ibexa\Contracts\Core\Collection\ArrayMap<TKey,TValue>
*/
protected function createFrom(array $items): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Repository/Values/Content/URLAlias.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @property-read int $type The type of the URL Alias i.e. one of URLAlias::LOCATION, URLAlias::RESOURCE, URLAlias::VIRTUAL
* @property-read mixed $destination If type = URLAlias::LOCATION it is a Location id otherwise a string (e.g. /content/search)
* @property-read string $path the alias path
* @property-read string[] languageCodes the languages for which this alias is valid
* @property-read string[] $languageCodes the languages for which this alias is valid
* @property-read bool $alwaysAvailable Fallback indicator for other languages
* @property-read bool $isHistory Indicates that this alias was autogenerated for an in the meanwhile archived version of the content
* @property-read bool $isCustom If false this alias was autogenerated otherwise manuel created
Expand Down
Loading