@@ -36,5 +36,5 @@ |
||
36 | 36 | /** |
37 | 37 | * @return IPropertyValueBinding[] gets the value annotations for the properties of the type |
38 | 38 | */ |
39 | - abstract public function getPropertyValueBindings(): array; |
|
39 | + abstract public function getPropertyValueBindings(): array; |
|
40 | 40 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** |
46 | 46 | * @var IModel $this |
47 | 47 | */ |
48 | - return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ??[]; |
|
48 | + return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ?? []; |
|
49 | 49 | } |
50 | 50 | /** |
51 | 51 | * Sets an annotation value for an EDM element. If the value is null, no annotation is added and an existing |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | /** |
281 | 281 | * @var IModel $this |
282 | 282 | */ |
283 | - return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation)??[]; |
|
283 | + return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation) ?? []; |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | $navigationPropertyMappings = $model->GetAnnotationValue(SplObjectStorage::class, $entitySet, EdmConstants::InternalUri, CsdlConstants::AssociationSetNameAnnotation); |
436 | 436 | assert($navigationPropertyMappings instanceof SplObjectStorage || $navigationPropertyMappings === null); |
437 | 437 | if ($navigationPropertyMappings !== null && $navigationPropertyMappings->offsetExists($property)) { |
438 | - $associationSetName = $navigationPropertyMappings->offsetGet($property) ; |
|
438 | + $associationSetName = $navigationPropertyMappings->offsetGet($property); |
|
439 | 439 | } else { |
440 | 440 | $associationSetName = $model->GetAssociationName($property) . 'Set'; |
441 | 441 | } |
@@ -48,21 +48,21 @@ |
||
48 | 48 | return $code; |
49 | 49 | } |
50 | 50 | } |
51 | -if(!function_exists('iterable_to_array')) { |
|
51 | +if (!function_exists('iterable_to_array')) { |
|
52 | 52 | function iterable_to_array(?iterable $it): array |
53 | 53 | { |
54 | - if(null === $it) return []; |
|
54 | + if (null === $it) return []; |
|
55 | 55 | if (is_array($it)) return $it; |
56 | 56 | $ret = []; |
57 | 57 | array_push($ret, ...$it); |
58 | 58 | return $ret; |
59 | 59 | } |
60 | 60 | } |
61 | -if(!function_exists('iterable_to_traversable')) { |
|
61 | +if (!function_exists('iterable_to_traversable')) { |
|
62 | 62 | |
63 | 63 | function iterable_to_traversable(?iterable $it): Traversable |
64 | 64 | { |
65 | - if(null === $it) $it = []; |
|
65 | + if (null === $it) $it = []; |
|
66 | 66 | yield from $it; |
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -51,8 +51,12 @@ discard block |
||
51 | 51 | if(!function_exists('iterable_to_array')) { |
52 | 52 | function iterable_to_array(?iterable $it): array |
53 | 53 | { |
54 | - if(null === $it) return []; |
|
55 | - if (is_array($it)) return $it; |
|
54 | + if(null === $it) { |
|
55 | + return []; |
|
56 | + } |
|
57 | + if (is_array($it)) { |
|
58 | + return $it; |
|
59 | + } |
|
56 | 60 | $ret = []; |
57 | 61 | array_push($ret, ...$it); |
58 | 62 | return $ret; |
@@ -62,7 +66,9 @@ discard block |
||
62 | 66 | |
63 | 67 | function iterable_to_traversable(?iterable $it): Traversable |
64 | 68 | { |
65 | - if(null === $it) $it = []; |
|
69 | + if(null === $it) { |
|
70 | + $it = []; |
|
71 | + } |
|
66 | 72 | yield from $it; |
67 | 73 | } |
68 | 74 | } |
69 | 75 | \ No newline at end of file |