@@ -160,7 +160,9 @@ |
||
| 160 | 160 | */ |
| 161 | 161 | protected function getPropertyValue($entity, ResourceType $resourceType, ResourceProperty $resourceProperty) |
| 162 | 162 | { |
| 163 | - if (is_array($entity)) return $entity[$resourceProperty->getName()]; |
|
| 163 | + if (is_array($entity)) { |
|
| 164 | + return $entity[$resourceProperty->getName()]; |
|
| 165 | + } |
|
| 164 | 166 | |
| 165 | 167 | return $entity->{$resourceProperty->getName()}; |
| 166 | 168 | } |
@@ -719,8 +719,11 @@ |
||
| 719 | 719 | $projectedProperty |
| 720 | 720 | ); |
| 721 | 721 | |
| 722 | - if (is_array($entry)) $entry[$expandedPropertyName] = $result1; |
|
| 723 | - else $expandedPropertyReflection->setValue($entry, $result1); |
|
| 722 | + if (is_array($entry)) { |
|
| 723 | + $entry[$expandedPropertyName] = $result1; |
|
| 724 | + } else { |
|
| 725 | + $expandedPropertyReflection->setValue($entry, $result1); |
|
| 726 | + } |
|
| 724 | 727 | |
| 725 | 728 | if (!is_null($result1)) { |
| 726 | 729 | $projectedProperty3 = $expandedProjectionNode->getResourceProperty(); |
@@ -101,7 +101,9 @@ |
||
| 101 | 101 | */ |
| 102 | 102 | public function convertToOData($value) |
| 103 | 103 | { |
| 104 | - if ($value instanceof DateTimeInterface) return 'datetime\'' . urlencode($value->format(DateTimeInterface::ATOM)) . '\''; |
|
| 104 | + if ($value instanceof DateTimeInterface) { |
|
| 105 | + return 'datetime\'' . urlencode($value->format(DateTimeInterface::ATOM)) . '\''; |
|
| 106 | + } |
|
| 105 | 107 | return 'datetime\'' . urlencode($value) . '\''; |
| 106 | 108 | } |
| 107 | 109 | |
@@ -91,7 +91,9 @@ |
||
| 91 | 91 | $resourceType = $resourceType->getResourceType(); |
| 92 | 92 | } |
| 93 | 93 | $resourceProperty = $resourceType->resolveProperty($property->getName()); |
| 94 | - if(is_null($resourceProperty)) continue; |
|
| 94 | + if(is_null($resourceProperty)) { |
|
| 95 | + continue; |
|
| 96 | + } |
|
| 95 | 97 | |
| 96 | 98 | $resourcePropertyType = $resourceProperty->getResourceType(); |
| 97 | 99 | $resourceKind = $resourcePropertyType->getResourceTypeKind(); |