@@ -118,11 +118,9 @@ public function getActions(): array
118
118
}
119
119
120
120
/**
121
- * @param string $opType
122
- *
123
121
* @return $this
124
122
*/
125
- public function addDocument (Document $ document , string $ opType = null ): self
123
+ public function addDocument (Document $ document , ? string $ opType = null ): self
126
124
{
127
125
$ action = AbstractDocumentAction::create ($ document , $ opType );
128
126
@@ -131,11 +129,10 @@ public function addDocument(Document $document, string $opType = null): self
131
129
132
130
/**
133
131
* @param Document[] $documents
134
- * @param string $opType
135
132
*
136
133
* @return $this
137
134
*/
138
- public function addDocuments (array $ documents , string $ opType = null ): self
135
+ public function addDocuments (array $ documents , ? string $ opType = null ): self
139
136
{
140
137
foreach ($ documents as $ document ) {
141
138
$ this ->addDocument ($ document , $ opType );
@@ -145,11 +142,9 @@ public function addDocuments(array $documents, string $opType = null): self
145
142
}
146
143
147
144
/**
148
- * @param string $opType
149
- *
150
145
* @return $this
151
146
*/
152
- public function addScript (AbstractScript $ script , string $ opType = null ): self
147
+ public function addScript (AbstractScript $ script , ? string $ opType = null ): self
153
148
{
154
149
$ action = AbstractDocumentAction::create ($ script , $ opType );
155
150
@@ -158,7 +153,6 @@ public function addScript(AbstractScript $script, string $opType = null): self
158
153
159
154
/**
160
155
* @param Document[] $scripts
161
- * @param string $opType
162
156
*
163
157
* @return $this
164
158
*/
@@ -173,11 +167,10 @@ public function addScripts(array $scripts, $opType = null): self
173
167
174
168
/**
175
169
* @param \Elastica\Script\AbstractScript|\Elastica\Document|array $data
176
- * @param string $opType
177
170
*
178
171
* @return $this
179
172
*/
180
- public function addData ($ data , string $ opType = null )
173
+ public function addData ($ data , ? string $ opType = null )
181
174
{
182
175
if (!\is_array ($ data )) {
183
176
$ data = [$ data ];
0 commit comments