We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb4a933 commit dfaa867Copy full SHA for dfaa867
src/ArrayPush.php
@@ -5,19 +5,19 @@
5
class ArrayPush implements SpecialFunction
6
{
7
protected $name;
8
- protected $value;
+ protected $values;
9
10
- public function __construct(string $property, $value)
+ public function __construct(string $property, ...$values)
11
12
$this->name = $property;
13
- $this->value = $value;
+ $this->values = $values;
14
}
15
16
public function asArray(): array
17
18
return [
19
"\$push" => [
20
- $this->name => $this->value
+ $this->name => ["\$each" => $this->values]
21
]
22
];
23
0 commit comments