Skip to content

Commit 47bf7f5

Browse files
committed
use php array_key_exists method.
1 parent 4dcdaa0 commit 47bf7f5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/Webkul/Attribute/src/Repositories/AttributeValueRepository.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Illuminate\Container\Container;
66
use Illuminate\Support\Facades\Storage;
7-
use Illuminate\Support\Arr;
87
use Webkul\Core\Eloquent\Repository;
98

109
class AttributeValueRepository extends Repository
@@ -65,7 +64,7 @@ public function save(array $data, $entityId)
6564
$data[$attribute->code] = isset($data[$attribute->code]) && $data[$attribute->code] ? 1 : 0;
6665
}
6766

68-
if (! Arr::exists($data, $attribute->code)) {
67+
if (! array_key_exists($attribute->code, $data)) {
6968
continue;
7069
}
7170

0 commit comments

Comments
 (0)