Skip to content

Commit

Permalink
Merge pull request #4 from comsave/3.6.1
Browse files Browse the repository at this point in the history
Fixed getting name from null object, Avoided Id from check
  • Loading branch information
lucacermenati authored Mar 31, 2020
2 parents e1b8a13 + c0e2cf1 commit a4ab0e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LogicItLab/Salesforce/MapperBundle/WsdlValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public function validate($modelDirPath, string $wsdlPath): array
$missingFields = [];

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

if (!$objectName || !$fieldNames) {
continue;
}

foreach ($fieldNames as $fieldName) {
if ($this->hasField($objectName, $fieldName) === false) {
if ($fieldName !== 'Id' && $this->hasField($objectName, $fieldName) === false) {
$missingFields[$objectName][] = $fieldName;
}
}
Expand Down

0 comments on commit a4ab0e3

Please sign in to comment.