Skip to content

Commit c0e2cf1

Browse files
author
Luca Cermenati
committed
Fixed getting name from null object, Avoided Id from check
1 parent e1b8a13 commit c0e2cf1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/LogicItLab/Salesforce/MapperBundle/WsdlValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public function validate($modelDirPath, string $wsdlPath): array
4040
$missingFields = [];
4141

4242
foreach ($this->getAllClassAnnotations() as $annotation) {
43-
$objectName = $annotation['object']->name;
43+
$objectName = isset($annotation['object']) ? $annotation['object']->name : null;
4444
$fieldNames = $this->getFieldNames($annotation['fields']);
4545

4646
if (!$objectName || !$fieldNames) {
4747
continue;
4848
}
4949

5050
foreach ($fieldNames as $fieldName) {
51-
if ($this->hasField($objectName, $fieldName) === false) {
51+
if ($fieldName !== 'Id' && $this->hasField($objectName, $fieldName) === false) {
5252
$missingFields[$objectName][] = $fieldName;
5353
}
5454
}

0 commit comments

Comments
 (0)