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
6 changes: 0 additions & 6 deletions phpstan-baseline-lte-8.3.neon
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
parameters:
ignoreErrors:
-
message: '#^Call to new Ibexa\\Core\\Repository\\URLAliasService\(\) on a separate line has no effect\.$#'
identifier: new.resultUnused
count: 1
path: tests/lib/Repository/Service/Mock/UrlAliasTest.php

-
message: '#^Dead catch \- Ibexa\\Contracts\\Core\\Repository\\Exceptions\\NotFoundException is never thrown in the try block\.$#'
identifier: catch.neverThrown
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -31239,7 +31239,7 @@ parameters:
-
message: '#^Offset ''scheme'' might not exist on array\{scheme\?\: string, host\: string, port\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\.$#'
identifier: offsetAccess.notFound
count: 4
count: 2
path: tests/bundle/Core/Routing/DefaultRouterTest.php

-
Expand Down
2 changes: 1 addition & 1 deletion src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function match()
{
$elements = $this->getHostElements();

return isset($elements[$this->elementNumber - 1]) ? $elements[$this->elementNumber - 1] : false;
return $elements[$this->elementNumber - 1] ?? false;
}

public function getName()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@ public function getTypeName()
return 'ezdatetime';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
protected function supportsLikeWildcard($value): bool
{
parent::supportsLikeWildcard($value);

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,8 @@ public function getTypeName()
return 'ezdate';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
protected function supportsLikeWildcard($value): bool
{
parent::supportsLikeWildcard($value);

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ public function getTypeName()
return 'ezobjectrelation';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
protected function supportsLikeWildcard($value): bool
{
parent::supportsLikeWildcard($value);

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ public function getTypeName()
return 'ezobjectrelationlist';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
protected function supportsLikeWildcard($value): bool
{
parent::supportsLikeWildcard($value);

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ public function getTypeName()
*
* If Selection is improved to be able to index + search for string also with LegacySearch, then adapt this too.
*/
protected function supportsLikeWildcard($value)
protected function supportsLikeWildcard($value): bool
{
parent::supportsLikeWildcard($value);

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ public function getTypeName()
return 'eztime';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
protected function supportsLikeWildcard($value): bool
{
parent::supportsLikeWildcard($value);

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

final class HostElementNormalizerTest extends TestCase
{
/**
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface
*/
public function testNormalization(): void
{
$normalizer = new HostElementNormalizer();
Expand All @@ -25,9 +28,9 @@ public function testNormalization(): void
$matcher = new HostElement(2);
// Set request and invoke match to initialize HostElement::$hostElements
$matcher->setRequest(SimplifiedRequest::fromUrl('http://ibexa.dev/foo/bar'));
$matcher->match();
self::assertSame('dev', $matcher->match());

$this->assertEquals(
self::assertEquals(
[
'elementNumber' => 2,
'hostElements' => [
Expand All @@ -43,8 +46,8 @@ public function testSupportsNormalization(): void
{
$normalizer = new HostElementNormalizer();

$this->assertTrue($normalizer->supportsNormalization($this->createMock(HostElement::class)));
$this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class)));
self::assertTrue($normalizer->supportsNormalization($this->createMock(HostElement::class)));
self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class)));
}
}

Expand Down
1 change: 1 addition & 0 deletions tests/lib/Repository/Service/Mock/ContentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public function testConstructor(): void
'remove_archived_versions_on_publish' => true,
];

/** @phpstan-ignore new.resultUnused */
new ContentService(
$repositoryMock,
$persistenceHandlerMock,
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Repository/Service/Mock/UrlAliasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function testConstructor()
{
$repositoryMock = $this->getRepositoryMock();

/** @phpstan-ignore new.resultUnused */
new UrlALiasService(
$repositoryMock,
$this->urlAliasHandler,
Expand Down
Loading