Skip to content

Commit bc5eed3

Browse files
committed
wip
1 parent 5b111ff commit bc5eed3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/MergesProps.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,12 @@ public function shouldAppend(): bool
111111
/**
112112
* Specify that the value should be appended, optionally providing a key to append and a property to match on.
113113
*/
114-
public function append(string|bool $key = true, ?string $matchOn = null): self
114+
public function append(bool|string|array $key = true, ?string $matchOn = null): self
115115
{
116116
match (true) {
117117
is_bool($key) => $this->append = $key,
118118
is_string($key) => $this->appendPaths[] = $key,
119+
is_array($key) => $this->appendPaths = array_merge($this->appendPaths, $key),
119120
};
120121

121122
if (is_string($key) && $matchOn) {
@@ -128,11 +129,12 @@ public function append(string|bool $key = true, ?string $matchOn = null): self
128129
/**
129130
* Specify that the value should be prepended, optionally providing a key to prepend and a property to match on.
130131
*/
131-
public function prepend(string|bool $key = true, ?string $matchOn = null): self
132+
public function prepend(bool|string|array $key = true, ?string $matchOn = null): self
132133
{
133134
match (true) {
134135
is_bool($key) => $this->append = ! $key,
135136
is_string($key) => $this->prependPaths[] = $key,
137+
is_array($key) => $this->prependPaths = array_merge($this->prependPaths, $key),
136138
};
137139

138140
if (is_string($key) && $matchOn) {

src/ScrollProp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function __construct($value, string $wrapper = 'data', callable|array|nul
6060
$this->value = $value;
6161
$this->metaResolver = is_array($meta) ? fn () => $meta : $meta;
6262
$this->wrapper = $wrapper;
63+
$this->merge = true;
6364
}
6465

6566
/**

0 commit comments

Comments
 (0)