Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Sep 12, 2023
2 parents f8b5220 + 44b4649 commit f7941f4
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding_standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
with:
repository: netgen-layouts/layouts-coding-standard
path: vendor/netgen/layouts-coding-standard
- uses: OskarStark/php-cs-fixer-ga@master
- uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
4 changes: 1 addition & 3 deletions bundle/Controller/Admin/DeleteRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,5 @@ public function __invoke(Rule $rule, Request $request): Response
return new Response('', Response::HTTP_NO_CONTENT);
}

public function checkPermissions(): void
{
}
public function checkPermissions(): void {}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^8.1",
"netgen/layouts-core": "~1.4.5",
"netgen/layouts-core": "~1.4.6",
"netgen/content-browser-ibexa": "^1.4",
"ibexa/core": "^4.4",
"ibexa/admin-ui": "^4.4",
Expand Down
2 changes: 1 addition & 1 deletion phpstan.tests.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parameters:
- '#Unreachable statement - code above always terminates.#'

# Disable errors about missing value types in PHPUnit data providers
- '#Method .+Test(Base)?::\w+DataProvider\(\) return type has no value type specified in iterable type array.#'
- '#Method .+Test(Base)?::\w+DataProvider\(\) return type has no value type specified in iterable type iterable.#'

# Disable errors for various tests that verify the instance of the value
- '#Call to static method PHPUnit\\Framework\\Assert::assertInstanceOf\(\)#'
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testProcessWithNoSupportedClient(): void
$this->assertContainerBuilderNotHasAlias('netgen_layouts.http_cache.client');
}

public static function processDataProvider(): array
public static function processDataProvider(): iterable
{
return [
[VarnishPurgeClient::class, true],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

abstract class ComponentTestBase extends BlockTestCase
{
public static function parametersDataProvider(): array
public static function parametersDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -60,7 +60,7 @@ public static function parametersDataProvider(): array
];
}

public static function invalidParametersDataProvider(): array
public static function invalidParametersDataProvider(): iterable
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

abstract class ContentFieldTestBase extends BlockTestCase
{
public static function parametersDataProvider(): array
public static function parametersDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -53,7 +53,7 @@ public static function parametersDataProvider(): array
];
}

public static function invalidParametersDataProvider(): array
public static function invalidParametersDataProvider(): iterable
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function testMatchesWithNoContent(): void
self::assertFalse($this->conditionType->matches($request, ['article']));
}

public static function matchesDataProvider(): array
public static function matchesDataProvider(): iterable
{
return [
['not_array', false],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testMatchesWithNoSiteAccess(): void
/**
* Provider for testing condition type validation.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
[['frontend'], true],
Expand All @@ -88,7 +88,7 @@ public static function validationDataProvider(): array
];
}

public static function matchesDataProvider(): array
public static function matchesDataProvider(): iterable
{
return [
['not_array', false],
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/Layout/Resolver/ConditionType/SiteAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testMatchesWithNoSiteAccess(): void
/**
* Provider for testing condition type validation.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
[['cro'], true],
Expand All @@ -71,7 +71,7 @@ public static function validationDataProvider(): array
];
}

public static function matchesDataProvider(): array
public static function matchesDataProvider(): iterable
{
return [
['not_array', false],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testProvideValueWithNoSemanticPathInfo(): void
/**
* Provider for testing target type validation.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
['/some/route', true],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testProvideValueWithNoSemanticPathInfo(): void
/**
* Provider for testing target type validation.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
['/some/route', true],
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/Parameters/ParameterType/ContentTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function testInvalidOptions(array $options): void
/**
* Provider for testing valid parameter attributes.
*/
public static function validOptionsDataProvider(): array
public static function validOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -156,7 +156,7 @@ public static function validOptionsDataProvider(): array
/**
* Provider for testing invalid parameter attributes.
*/
public static function invalidOptionsDataProvider(): array
public static function invalidOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -257,7 +257,7 @@ public function testValidation(mixed $value, int $type, bool $required, bool $is
/**
* Provider for testing valid parameter values.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
[12, 24, false, true],
Expand Down Expand Up @@ -291,7 +291,7 @@ public function testFromHash(mixed $value, mixed $convertedValue): void
);
}

public static function fromHashDataProvider(): array
public static function fromHashDataProvider(): iterable
{
return [
[
Expand All @@ -318,7 +318,7 @@ public function testIsValueEmpty(mixed $value, bool $isEmpty): void
/**
* Provider for testing if the value is empty.
*/
public static function emptyDataProvider(): array
public static function emptyDataProvider(): iterable
{
return [
[null, true],
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/Parameters/ParameterType/ContentTypeTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testInvalidOptions(array $options): void
/**
* Provider for testing valid parameter attributes.
*/
public static function validOptionsDataProvider(): array
public static function validOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -131,7 +131,7 @@ public static function validOptionsDataProvider(): array
/**
* Provider for testing invalid parameter attributes.
*/
public static function invalidOptionsDataProvider(): array
public static function invalidOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -175,7 +175,7 @@ public function testValidation(mixed $value, bool $required, bool $isValid): voi
/**
* Provider for testing valid parameter values.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
['news', false, true],
Expand Down Expand Up @@ -211,7 +211,7 @@ public function testFromHash(mixed $value, mixed $convertedValue, bool $multiple
);
}

public static function fromHashDataProvider(): array
public static function fromHashDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -266,7 +266,7 @@ public function testIsValueEmpty(mixed $value, bool $isEmpty): void
/**
* Provider for testing if the value is empty.
*/
public static function emptyDataProvider(): array
public static function emptyDataProvider(): iterable
{
return [
[null, true],
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/Parameters/ParameterType/LocationTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function testInvalidOptions(array $options): void
/**
* Provider for testing valid parameter attributes.
*/
public static function validOptionsDataProvider(): array
public static function validOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -138,7 +138,7 @@ public static function validOptionsDataProvider(): array
/**
* Provider for testing invalid parameter attributes.
*/
public static function invalidOptionsDataProvider(): array
public static function invalidOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -248,7 +248,7 @@ public function testValidation(mixed $value, string $type, bool $required, bool
/**
* Provider for testing valid parameter values.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
[12, 'user', false, true],
Expand Down Expand Up @@ -282,7 +282,7 @@ public function testFromHash(mixed $value, mixed $convertedValue): void
);
}

public static function fromHashDataProvider(): array
public static function fromHashDataProvider(): iterable
{
return [
[
Expand All @@ -309,7 +309,7 @@ public function testIsValueEmpty(mixed $value, bool $isEmpty): void
/**
* Provider for testing if the value is empty.
*/
public static function emptyDataProvider(): array
public static function emptyDataProvider(): iterable
{
return [
[null, true],
Expand Down
12 changes: 6 additions & 6 deletions tests/lib/Parameters/ParameterType/ObjectStateTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testInvalidOptions(array $options): void
/**
* Provider for testing valid parameter attributes.
*/
public static function validOptionsDataProvider(): array
public static function validOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -131,7 +131,7 @@ public static function validOptionsDataProvider(): array
/**
* Provider for testing invalid parameter attributes.
*/
public static function invalidOptionsDataProvider(): array
public static function invalidOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -214,7 +214,7 @@ public function testValidationWithEmptyValues(mixed $value, bool $required, bool
self::assertSame($isValid, $errors->count() === 0);
}

public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
['group1|state2', false, true],
Expand All @@ -234,7 +234,7 @@ public static function validationDataProvider(): array
];
}

public static function validationWithEmptyValuesDataProvider(): array
public static function validationWithEmptyValuesDataProvider(): iterable
{
return [
[[], false, true],
Expand All @@ -260,7 +260,7 @@ public function testFromHash(mixed $value, mixed $convertedValue, bool $multiple
);
}

public static function fromHashDataProvider(): array
public static function fromHashDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -315,7 +315,7 @@ public function testIsValueEmpty(mixed $value, bool $isEmpty): void
/**
* Provider for testing if the value is empty.
*/
public static function emptyDataProvider(): array
public static function emptyDataProvider(): iterable
{
return [
[null, true],
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/Parameters/ParameterType/SectionTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testInvalidOptions(array $options): void
/**
* Provider for testing valid parameter attributes.
*/
public static function validOptionsDataProvider(): array
public static function validOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -131,7 +131,7 @@ public static function validOptionsDataProvider(): array
/**
* Provider for testing invalid parameter attributes.
*/
public static function invalidOptionsDataProvider(): array
public static function invalidOptionsDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -181,7 +181,7 @@ public function testValidation(mixed $value, bool $required, bool $isValid): voi
/**
* Provider for testing valid parameter values.
*/
public static function validationDataProvider(): array
public static function validationDataProvider(): iterable
{
return [
['standard', false, true],
Expand Down Expand Up @@ -217,7 +217,7 @@ public function testFromHash(mixed $value, mixed $convertedValue, bool $multiple
);
}

public static function fromHashDataProvider(): array
public static function fromHashDataProvider(): iterable
{
return [
[
Expand Down Expand Up @@ -272,7 +272,7 @@ public function testIsValueEmpty(mixed $value, bool $isEmpty): void
/**
* Provider for testing if the value is empty.
*/
public static function emptyDataProvider(): array
public static function emptyDataProvider(): iterable
{
return [
[null, true],
Expand Down
Loading

0 comments on commit f7941f4

Please sign in to comment.