1
0
mirror of synced 2024-11-28 00:06:06 +03:00

Update CustomFields.php

This commit is contained in:
Alex Lushpai 2017-07-28 10:11:47 +03:00 committed by GitHub
parent 9aab02c189
commit 3dd663e7a6

View File

@ -77,7 +77,7 @@ trait CustomFields
);
}
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
throw new \InvalidArgumentException(
'Parameter `entity` must contain a data & value must be `order` or `customer`'
);
@ -106,7 +106,7 @@ trait CustomFields
);
}
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
throw new \InvalidArgumentException(
'Parameter `entity` must contain a data & value must be `order` or `customer`'
);
@ -135,7 +135,7 @@ trait CustomFields
);
}
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
throw new \InvalidArgumentException(
'Parameter `entity` must contain a data & value must be `order` or `customer`'
);