Fix syntax

This commit is contained in:
Jake Barnby 2025-10-03 00:26:39 +13:00
parent 0aaa276f03
commit 44e7068a9a
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -127,12 +127,6 @@ class Operation extends Validator
}
// If action requires documentId, it must be present
- if (
- isset($this->requiresDocumentId[$value['action']]) &&
- !\array_key_exists($this->documentIdName, $value)
- ) {
- $this->description = "Key '$this->documentIdName' is required for action '{$value['action']}'";
- return false;
$actionRequiresDocumentId = ($this->requiresDocumentId[$value['action']] ?? false) === true;
if ($actionRequiresDocumentId && !\array_key_exists($this->documentIdName, $value)) {
$this->description = "Key '$this->documentIdName' is required for action '{$value['action']}'";