Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebb1a8d

Browse files
committed
Replace variadic NormalizerInterface parameters with array in Contract::create() methods
1 parent a82e445 commit ebb1a8d

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
0.8
5+
---
6+
7+
* [BC BREAK] `PerplexityContract::create()` no longer accepts variadic `NormalizerInterface` arguments; pass an array instead
8+
49
0.7
510
---
611

Contract/PerplexityContract.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@
1919
*/
2020
final class PerplexityContract extends Contract
2121
{
22-
public static function create(NormalizerInterface ...$normalizer): Contract
22+
/**
23+
* @param NormalizerInterface[] $normalizers
24+
*/
25+
public static function create(array $normalizers = []): Contract
2326
{
24-
return parent::create(
27+
return parent::create([
2528
new FileUrlNormalizer(),
26-
...$normalizer
27-
);
29+
...$normalizers,
30+
]);
2831
}
2932
}

0 commit comments

Comments
 (0)