@@ -19,7 +19,6 @@ |
||
19 | 19 | * The following is an example of the Schema element: |
20 | 20 | * |
21 | 21 | * <Schema Alias="Model" Namespace="Test.Simple.Model" xmlns:edm="http://schemas.microsoft.com/ado/2009/11/edm" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"> |
22 | - |
|
23 | 22 | * The following rules apply to the Schema element. |
24 | 23 | * - The CSDL document MUST have the Schema element as its root element. |
25 | 24 | * - The Namespace attribute is defined for each Schema element. Namespace is of type QualifiedName. A namespace is a |
@@ -742,10 +742,10 @@ |
||
742 | 742 | { |
743 | 743 | return array_merge( |
744 | 744 | $this->getUsing(), //Edm:Using |
745 | - $this->getAssociation(),//Edm:Association |
|
746 | - $this->getComplexType(),//Edm:ComplexType |
|
747 | - $this->getEntityType(),//Edm:EntityType |
|
748 | - $this->getEntityContainer(),//Edm:EntityContainer |
|
745 | + $this->getAssociation(), //Edm:Association |
|
746 | + $this->getComplexType(), //Edm:ComplexType |
|
747 | + $this->getEntityType(), //Edm:EntityType |
|
748 | + $this->getEntityContainer(), //Edm:EntityContainer |
|
749 | 749 | $this->getFunction(), //Edm.Functions |
750 | 750 | $this->getAnnotations(), // Edm:Annotations |
751 | 751 | $this->getEnumType(), //Edm:EnumType |
@@ -152,8 +152,7 @@ |
||
152 | 152 | array $valueTerm = [], |
153 | 153 | array $function = [], |
154 | 154 | array $annotations = [] |
155 | - ) |
|
156 | - { |
|
155 | + ) { |
|
157 | 156 | $this |
158 | 157 | ->setNamespace($namespace) |
159 | 158 | ->setAlias($alias) |
@@ -130,7 +130,7 @@ |
||
130 | 130 | { |
131 | 131 | return [ |
132 | 132 | new AttributeContainer('Name', $this->getName()), |
133 | - new AttributeContainer('Value' , $this->getValue(), true) |
|
133 | + new AttributeContainer('Value', $this->getValue(), true) |
|
134 | 134 | ]; |
135 | 135 | } |
136 | 136 |
@@ -110,7 +110,7 @@ |
||
110 | 110 | public function __construct( |
111 | 111 | string $name, |
112 | 112 | bool $isDefaultEntityContainer = false, |
113 | - Documentation $documentation= null, |
|
113 | + Documentation $documentation = null, |
|
114 | 114 | bool $lazyLoadingEnabled = false) |
115 | 115 | { |
116 | 116 | $this->setName($name) |
@@ -182,7 +182,7 @@ |
||
182 | 182 | public function getAttributes(): array |
183 | 183 | { |
184 | 184 | return [ |
185 | - new AttributeContainer('Name',$this->getName()) |
|
185 | + new AttributeContainer('Name', $this->getName()) |
|
186 | 186 | ]; |
187 | 187 | } |
188 | 188 |
@@ -53,8 +53,8 @@ |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | public function getAttributesHasUnicode(): array{ |
56 | - if(method_exists($this, 'getType')){ |
|
57 | - if($this->getType() != 'String'){ |
|
56 | + if (method_exists($this, 'getType')) { |
|
57 | + if ($this->getType() != 'String') { |
|
58 | 58 | return []; |
59 | 59 | } |
60 | 60 | } |
@@ -53,8 +53,8 @@ |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | public function getAttributesHasUnicode(): array{ |
56 | - if(method_exists($this, 'getType')){ |
|
57 | - if($this->getType() != 'String'){ |
|
56 | + if(method_exists($this, 'getType')) { |
|
57 | + if($this->getType() != 'String') { |
|
58 | 58 | return []; |
59 | 59 | } |
60 | 60 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | public function XmlSerializeHasValueAnnotation(DOMElement $thisNode): void |
79 | 79 | { |
80 | 80 | //TODO: add conext version check |
81 | - foreach($this->getValueAnnotation() as $annotation){ |
|
81 | + foreach ($this->getValueAnnotation() as $annotation) { |
|
82 | 82 | $annotation->XmlSerialize($thisNode); |
83 | 83 | } |
84 | 84 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | public function XmlSerializeHasValueAnnotation(DOMElement $thisNode): void |
79 | 79 | { |
80 | 80 | //TODO: add conext version check |
81 | - foreach($this->getValueAnnotation() as $annotation){ |
|
81 | + foreach($this->getValueAnnotation() as $annotation) { |
|
82 | 82 | $annotation->XmlSerialize($thisNode); |
83 | 83 | } |
84 | 84 | } |
@@ -68,9 +68,9 @@ |
||
68 | 68 | return $this; |
69 | 69 | } |
70 | 70 | |
71 | - public function XmlSerializeHasAccessors(DOMElement $thisNode){ |
|
72 | - $this->XmlSerializeNullableAttribute($thisNode,'cg:SetterAccess', $this->getSetterAccess()); |
|
73 | - $this->XmlSerializeNullableAttribute($thisNode,'cg:GetterAccess', $this->getGetterAccess()); |
|
71 | + public function XmlSerializeHasAccessors(DOMElement $thisNode) { |
|
72 | + $this->XmlSerializeNullableAttribute($thisNode, 'cg:SetterAccess', $this->getSetterAccess()); |
|
73 | + $this->XmlSerializeNullableAttribute($thisNode, 'cg:GetterAccess', $this->getGetterAccess()); |
|
74 | 74 | } |
75 | 75 | public function getAttributesHasAccessors(): array{ |
76 | 76 | return [ |
@@ -68,7 +68,8 @@ |
||
68 | 68 | return $this; |
69 | 69 | } |
70 | 70 | |
71 | - public function XmlSerializeHasAccessors(DOMElement $thisNode){ |
|
71 | + public function XmlSerializeHasAccessors(DOMElement $thisNode) |
|
72 | + { |
|
72 | 73 | $this->XmlSerializeNullableAttribute($thisNode,'cg:SetterAccess', $this->getSetterAccess()); |
73 | 74 | $this->XmlSerializeNullableAttribute($thisNode,'cg:GetterAccess', $this->getGetterAccess()); |
74 | 75 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | public function XmlSerializeHasTypeAnnotation(DOMElement $thisNode): void |
74 | 74 | { |
75 | 75 | //TODO: add conext version check |
76 | - foreach($this->getTypeAnnotation() as $annotation){ |
|
76 | + foreach ($this->getTypeAnnotation() as $annotation) { |
|
77 | 77 | $annotation->XmlSerialize($thisNode); |
78 | 78 | } |
79 | 79 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | public function XmlSerializeHasTypeAnnotation(DOMElement $thisNode): void |
74 | 74 | { |
75 | 75 | //TODO: add conext version check |
76 | - foreach($this->getTypeAnnotation() as $annotation){ |
|
76 | + foreach($this->getTypeAnnotation() as $annotation) { |
|
77 | 77 | $annotation->XmlSerialize($thisNode); |
78 | 78 | } |
79 | 79 | } |
@@ -47,10 +47,10 @@ |
||
47 | 47 | { |
48 | 48 | $base = []; |
49 | 49 | $type = $this->getType(); |
50 | - if($type instanceof IScalarType){ |
|
50 | + if ($type instanceof IScalarType) { |
|
51 | 51 | $base = array_merge($base, $this->getAttributesHasFacets()); |
52 | 52 | } |
53 | - if($type instanceof INominalType){ |
|
53 | + if ($type instanceof INominalType) { |
|
54 | 54 | $base[] = New AttributeContainer("Type", $type->getName()); |
55 | 55 | } |
56 | 56 | return $base; |
@@ -47,10 +47,10 @@ |
||
47 | 47 | { |
48 | 48 | $base = []; |
49 | 49 | $type = $this->getType(); |
50 | - if($type instanceof IScalarType){ |
|
50 | + if($type instanceof IScalarType) { |
|
51 | 51 | $base = array_merge($base, $this->getAttributesHasFacets()); |
52 | 52 | } |
53 | - if($type instanceof INominalType){ |
|
53 | + if($type instanceof INominalType) { |
|
54 | 54 | $base[] = New AttributeContainer("Type", $type->getName()); |
55 | 55 | } |
56 | 56 | return $base; |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $base = array_merge($base, $this->getAttributesHasFacets()); |
52 | 52 | } |
53 | 53 | if($type instanceof INominalType){ |
54 | - $base[] = New AttributeContainer("Type", $type->getName()); |
|
54 | + $base[] = new AttributeContainer("Type", $type->getName()); |
|
55 | 55 | } |
56 | 56 | return $base; |
57 | 57 | } |