Test Setup Failed
Pull Request — master (#140)
by Christopher
03:51
created
src/POData/Providers/Metadata/SimpleMetadataProvider.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
     public function getDerivedTypes(ResourceEntityType $resourceType)
196 196
     {
197 197
         $ret = [];
198
-        foreach($this->resourceTypes as $rType){
198
+        foreach ($this->resourceTypes as $rType) {
199 199
             $baseTEntityType = $this->oDataEntityMap[$resourceType->getFullName()];
200
-            if($rType->getBaseType() == $baseTEntityType->getName() ){
200
+            if ($rType->getBaseType() == $baseTEntityType->getName()) {
201 201
                 $ret[] = $rType;
202 202
             }
203 203
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function hasDerivedTypes(ResourceEntityType $resourceType)
213 213
     {
214
-        if(in_array($resourceType,$this->baseTypes)){
214
+        if (in_array($resourceType, $this->baseTypes)) {
215 215
             return true;
216 216
         }
217 217
         return false;
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      *
282 282
      * @internal param string $namespace namespace of the data source
283 283
      */
284
-    public function addEntityType(\ReflectionClass $refClass, $name,$isAbstract = false, $baseType = null)
284
+    public function addEntityType(\ReflectionClass $refClass, $name, $isAbstract = false, $baseType = null)
285 285
     {
286 286
         $result = $this->createResourceType($refClass, $name, ResourceTypeKind::ENTITY(), $isAbstract, $baseType);
287 287
         assert($result instanceof ResourceEntityType);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         if (array_key_exists($name, $this->resourceTypes)) {
308 308
             throw new InvalidOperationException('Type with same name already added');
309 309
         }
310
-        if(null !== $baseType){
310
+        if (null !== $baseType) {
311 311
             $baseTEntityType = $this->oDataEntityMap[$baseType->getFullName()];
312 312
             $this->baseTypes[] = $baseType;
313 313
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
     public function getDerivedTypes(ResourceEntityType $resourceType)
196 196
     {
197 197
         $ret = [];
198
-        foreach($this->resourceTypes as $rType){
198
+        foreach($this->resourceTypes as $rType) {
199 199
             $baseTEntityType = $this->oDataEntityMap[$resourceType->getFullName()];
200
-            if($rType->getBaseType() == $baseTEntityType->getName() ){
200
+            if($rType->getBaseType() == $baseTEntityType->getName() ) {
201 201
                 $ret[] = $rType;
202 202
             }
203 203
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function hasDerivedTypes(ResourceEntityType $resourceType)
213 213
     {
214
-        if(in_array($resourceType,$this->baseTypes)){
214
+        if(in_array($resourceType,$this->baseTypes)) {
215 215
             return true;
216 216
         }
217 217
         return false;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         if (array_key_exists($name, $this->resourceTypes)) {
308 308
             throw new InvalidOperationException('Type with same name already added');
309 309
         }
310
-        if(null !== $baseType){
310
+        if(null !== $baseType) {
311 311
             $baseTEntityType = $this->oDataEntityMap[$baseType->getFullName()];
312 312
             $this->baseTypes[] = $baseType;
313 313
         }
Please login to merge, or discard this patch.