Skip to content

Commit d85e281

Browse files
committed
Merge branch 'master' into feat/ANWB-5192-update-tweakwise-modules-and-tests-for-multi-facet-value
2 parents a23e8da + eac4da9 commit d85e281

3 files changed

Lines changed: 104 additions & 35 deletions

File tree

src/Api/Data/FilterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface FilterInterface
1515
public function getFacet(): string;
1616

1717
/**
18-
* @return string
18+
* @return string[]
1919
*/
20-
public function getValue(): string;
20+
public function getValue(): array;
2121
}

src/Model/Filter.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,14 @@
1111

1212
class Filter implements FilterInterface
1313
{
14-
/**
15-
* @var string
16-
*/
17-
private $facet;
18-
19-
/**
20-
* @var string
21-
*/
22-
private $value;
23-
2414
/**
2515
* Filter constructor.
16+
*
2617
* @param string $facet
27-
* @param string $value
18+
* @param array $value
2819
*/
29-
public function __construct(string $facet, string $value)
20+
public function __construct(private readonly string $facet, private readonly array $value)
3021
{
31-
$this->facet = $facet;
32-
$this->value = $value;
3322
}
3423

3524
/**
@@ -41,9 +30,9 @@ public function getFacet(): string
4130
}
4231

4332
/**
44-
* @return string
33+
* @return array
4534
*/
46-
public function getValue(): string
35+
public function getValue(): array
4736
{
4837
return $this->value;
4938
}

0 commit comments

Comments
 (0)