Skip to content

Commit

Permalink
Merged branch '4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Apr 18, 2024
2 parents 6b9e4de + 6403884 commit 20cf5e1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 70 deletions.
45 changes: 0 additions & 45 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4155,11 +4155,6 @@ parameters:
count: 1
path: src/bundle/Debug/IbexaDebugBundle.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:display\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:display\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -4170,11 +4165,6 @@ parameters:
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:doDisplay\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:doDisplay\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -4185,16 +4175,6 @@ parameters:
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:getDebugInfo\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:getSourceContext\\(\\) should return Twig\\\\Source but returns string\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#1 \\$haystack of function stripos expects string, string\\|false\\|null given\\.$#"
count: 1
Expand Down Expand Up @@ -7375,11 +7355,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

-
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 Expand Up @@ -21215,11 +21190,6 @@ parameters:
count: 1
path: src/lib/Repository/TrashService.php

-
message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias\\:\\:\\$languageCodes\\.$#"
count: 2
path: src/lib/Repository/URLAliasService.php

-
message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\UrlAlias referenced with incorrect case\\: Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\URLAlias\\.$#"
count: 7
Expand Down Expand Up @@ -27370,11 +27340,6 @@ parameters:
count: 9
path: tests/integration/Core/Repository/ContentServiceTest.php

-
message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias\\:\\:\\$languageCodes\\.$#"
count: 2
path: tests/integration/Core/Repository/ContentServiceTest.php

-
message: "#^Argument of an invalid type Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\ContentMetadataUpdateStruct supplied for foreach, only iterables are supported\\.$#"
count: 1
Expand Down Expand Up @@ -38810,11 +38775,6 @@ parameters:
count: 1
path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php

-
message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias\\:\\:\\$languageCodes\\.$#"
count: 1
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: "#^Cannot access offset 0 on iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias\\>\\.$#"
count: 1
Expand Down Expand Up @@ -59800,11 +59760,6 @@ parameters:
count: 1
path: tests/lib/Repository/Service/Mock/SearchTest.php

-
message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias\\:\\:\\$languageCodes\\.$#"
count: 3
path: tests/lib/Repository/Service/Mock/UrlAliasTest.php

-
message: "#^Cannot access offset 0 on iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias\\>\\.$#"
count: 3
Expand Down
24 changes: 8 additions & 16 deletions src/bundle/Debug/Twig/DebugTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Ibexa\Bundle\Debug\Twig;

use Symfony\Component\Filesystem\Filesystem;
use Twig\Source;
use Twig\Template;

/**
Expand All @@ -19,7 +20,7 @@ class DebugTemplate extends Template
{
private $fileSystem;

public function display(array $context, array $blocks = [])
public function display(array $context, array $blocks = []): void
{
$this->fileSystem = $this->fileSystem ?: new Filesystem();

Expand Down Expand Up @@ -65,34 +66,25 @@ public function display(array $context, array $blocks = [])
}
}

/**
* {@inheritdoc}
*/
public function getTemplateName()
public function getTemplateName(): string
{
return '';
}

/**
* {@inheritdoc}
*/
public function getSourceContext()
public function getSourceContext(): Source
{
return '';
return new Source('', '');
}

/**
* {@inheritdoc}
*/
protected function doDisplay(array $context, array $blocks = [])
protected function doDisplay(array $context, array $blocks = []): string
{
return '';
}

/**
* {@inheritdoc}
* @return array<mixed>
*/
public function getDebugInfo()
public function getDebugInfo(): array
{
return [];
}
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

0 comments on commit 20cf5e1

Please sign in to comment.