Skip to content

Commit

Permalink
Update Content stub for new Site API
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Feb 20, 2024
1 parent 20f208c commit b60d438
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions tests/lib/Stubs/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,62 @@ public function filterFieldRelationLocations(
): Pagerfanta {
return new Pagerfanta(new Adapter());
}

public function getSudoFieldRelation(string $fieldDefinitionIdentifier): ?APIContent
{
return new self();
}

public function getSudoFieldRelations(string $fieldDefinitionIdentifier, int $limit = 25): array
{
return [];
}

/**
* @param array<mixed> $contentTypeIdentifiers
*
* @return \Pagerfanta\Pagerfanta<\Netgen\IbexaSiteApi\API\Values\Content>
*/
public function filterSudoFieldRelations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
int $currentPage = 1,
): Pagerfanta {
return new Pagerfanta(new Adapter());
}

public function getSudoFieldRelationLocation(string $fieldDefinitionIdentifier): ?Location
{
return null;
}

public function getSudoFieldRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array
{
return [];
}

/**
* @param array<mixed> $contentTypeIdentifiers
*
* @return \Pagerfanta\Pagerfanta<\Netgen\IbexaSiteApi\API\Values\Location>
*/
public function filterSudoFieldRelationLocations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
int $currentPage = 1,
): Pagerfanta {
return new Pagerfanta(new Adapter());
}

public function getPath(array $parameters = []): string

Check failure on line 165 in tests/lib/Stubs/Content.php

View workflow job for this annotation

GitHub Actions / phpstan-tests

Method Netgen\Layouts\Ibexa\SiteApi\Tests\Stubs\Content::getPath() has parameter $parameters with no value type specified in iterable type array.
{
return '/example';
}

public function getUrl(array $parameters = []): string

Check failure on line 170 in tests/lib/Stubs/Content.php

View workflow job for this annotation

GitHub Actions / phpstan-tests

Method Netgen\Layouts\Ibexa\SiteApi\Tests\Stubs\Content::getUrl() has parameter $parameters with no value type specified in iterable type array.
{
return 'https://netgen.io/example';
}
}

0 comments on commit b60d438

Please sign in to comment.