@@ -110,6 +110,7 @@ public function getAll(): array
110110 public function getByNames (array $ names ): array
111111 {
112112 if (empty ($ names )) {
113+ /** @infection-ignore-all */
113114 return [];
114115 }
115116
@@ -167,6 +168,9 @@ public function update(string $name, Item $item): void
167168 $ this
168169 ->database
169170 ->transaction (static function (ConnectionInterface $ database ) use ($ itemsStorage , $ name , $ item ): void {
171+ /**
172+ * @var array[] $itemsChildren We assume that arrays are returned here, not objects.
173+ */
170174 $ itemsChildren = (new Query ($ database ))
171175 ->from ($ itemsStorage ->childrenTableName )
172176 ->where (['parent ' => $ name ])
@@ -198,7 +202,7 @@ static function (array $itemChild) use ($name, $item): array {
198202 );
199203 $ database
200204 ->createCommand ()
201- ->batchInsert ($ itemsStorage ->childrenTableName , ['parent ' , 'child ' ], $ itemsChildren )
205+ ->insertBatch ($ itemsStorage ->childrenTableName , $ itemsChildren , ['parent ' , 'child ' ])
202206 ->execute ();
203207 }
204208 });
@@ -224,6 +228,7 @@ public function getRoles(): array
224228 public function getRolesByNames (array $ names ): array
225229 {
226230 if (empty ($ names )) {
231+ /** @infection-ignore-all */
227232 return [];
228233 }
229234
@@ -255,6 +260,7 @@ public function getPermissions(): array
255260 public function getPermissionsByNames (array $ names ): array
256261 {
257262 if (empty ($ names )) {
263+ /** @infection-ignore-all */
258264 return [];
259265 }
260266
0 commit comments