@@ -60,10 +60,10 @@ |
||
60 | 60 | ]; |
61 | 61 | $usingArray = UsingTest::usingTestDataProvider(); |
62 | 62 | $data = []; |
63 | - foreach($usingArray as $usingItem){ |
|
63 | + foreach($usingArray as $usingItem) { |
|
64 | 64 | $expected = $usingItem[0]; |
65 | 65 | $using = new Using($usingItem[1],$usingItem[2],$usingItem[3]); |
66 | - foreach($base as $baseItem){ |
|
66 | + foreach($base as $baseItem) { |
|
67 | 67 | $data[] = [sprintf($baseItem[0],$expected), $baseItem[1], $baseItem[2], [$using]]; |
68 | 68 | } |
69 | 69 |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | * @param $alias |
15 | 15 | * @dataProvider SchemaWithUsingSerializerProvider |
16 | 16 | */ |
17 | - public function testSchemaXmlSerialize($expected, $namespace,$alias, $using) |
|
17 | + public function testSchemaXmlSerialize($expected, $namespace, $alias, $using) |
|
18 | 18 | { |
19 | - $schema = new Schema($namespace,$alias,[],[],[],[],$using); |
|
19 | + $schema = new Schema($namespace, $alias, [], [], [], [], $using); |
|
20 | 20 | |
21 | 21 | $domNode = $this->writerContext->write($schema, false); |
22 | 22 | $this->TESTNODE->appendChild($domNode); |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | '<Schema/>', null, null, [] |
32 | 32 | ], |
33 | 33 | [ |
34 | - '<Schema Namespace="DummyNameSpace"/>', "DummyNameSpace", null,[] |
|
34 | + '<Schema Namespace="DummyNameSpace"/>', "DummyNameSpace", null, [] |
|
35 | 35 | ], |
36 | 36 | [ |
37 | - '<Schema Alias="DummyAlias"/>', null, "DummyAlias",[] |
|
37 | + '<Schema Alias="DummyAlias"/>', null, "DummyAlias", [] |
|
38 | 38 | ], |
39 | 39 | [ |
40 | - '<Schema Namespace="DummyNameSpace" Alias="DummyAlias"/>', 'DummyNameSpace', "DummyAlias",[] |
|
40 | + '<Schema Namespace="DummyNameSpace" Alias="DummyAlias"/>', 'DummyNameSpace', "DummyAlias", [] |
|
41 | 41 | ] |
42 | 42 | ]; |
43 | 43 | } |
@@ -45,26 +45,26 @@ discard block |
||
45 | 45 | { |
46 | 46 | $base = [ |
47 | 47 | [ |
48 | - '<Schema>%s</Schema>', null,null |
|
48 | + '<Schema>%s</Schema>', null, null |
|
49 | 49 | |
50 | 50 | ], |
51 | 51 | [ |
52 | 52 | '<Schema Namespace="DummyNameSpace">%s</Schema>', "DummyNameSpace", null |
53 | 53 | ], |
54 | 54 | [ |
55 | - '<Schema Alias="DummyAlias">%s</Schema>',null, "DummyAlias" |
|
55 | + '<Schema Alias="DummyAlias">%s</Schema>', null, "DummyAlias" |
|
56 | 56 | ], |
57 | 57 | [ |
58 | - '<Schema Namespace="DummyNameSpace" Alias="DummyAlias">%s</Schema>','DummyNameSpace', "DummyAlias" |
|
58 | + '<Schema Namespace="DummyNameSpace" Alias="DummyAlias">%s</Schema>', 'DummyNameSpace', "DummyAlias" |
|
59 | 59 | ] |
60 | 60 | ]; |
61 | 61 | $usingArray = UsingTest::usingTestDataProvider(); |
62 | 62 | $data = []; |
63 | - foreach($usingArray as $usingItem){ |
|
63 | + foreach ($usingArray as $usingItem) { |
|
64 | 64 | $expected = $usingItem[0]; |
65 | - $using = new Using($usingItem[1],$usingItem[2],$usingItem[3]); |
|
66 | - foreach($base as $baseItem){ |
|
67 | - $data[] = [sprintf($baseItem[0],$expected), $baseItem[1], $baseItem[2], [$using]]; |
|
65 | + $using = new Using($usingItem[1], $usingItem[2], $usingItem[3]); |
|
66 | + foreach ($base as $baseItem) { |
|
67 | + $data[] = [sprintf($baseItem[0], $expected), $baseItem[1], $baseItem[2], [$using]]; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | } |
@@ -25,7 +25,8 @@ |
||
25 | 25 | $this->assertEquals($expected, $xml); |
26 | 26 | } |
27 | 27 | |
28 | - public static function documentationTestProvider(){ |
|
28 | + public static function documentationTestProvider() |
|
29 | + { |
|
29 | 30 | return [ |
30 | 31 | [ |
31 | 32 | '<Documentation><Summary>Short Summery</Summary></Documentation>', 'Short Summery', null |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function testDocumentationTestXmlSerialize($expected, $summery, $description) |
18 | 18 | { |
19 | - $domNode = $this->TESTNODE; |
|
19 | + $domNode = $this->TESTNODE; |
|
20 | 20 | |
21 | 21 | $dataService = new Documentation($summery, $description); |
22 | 22 | $domNode = $this->writerContext->write($dataService, false); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $this->assertEquals($expected, $xml); |
26 | 26 | } |
27 | 27 | |
28 | - public static function documentationTestProvider(){ |
|
28 | + public static function documentationTestProvider() { |
|
29 | 29 | return [ |
30 | 30 | [ |
31 | 31 | '<Documentation><Summary>Short Summery</Summary></Documentation>', 'Short Summery', null |
@@ -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 |
@@ -28,7 +28,6 @@ |
||
28 | 28 | * by the related EntitySet. An End element can contain a maximum of one Documentation element. |
29 | 29 | * - End can contain any number of AnnotationElement elements. |
30 | 30 | * - The child elements of End are to appear in this sequence: Documentation, AnnotationElement. |
31 | - |
|
32 | 31 | * @link https://www.odata.org/documentation/odata-version-3-0/common-schema-definition-language-csdl/#csdl12.3.1 |
33 | 32 | */ |
34 | 33 | class End extends EdmBase |
@@ -35,8 +35,6 @@ |
||
35 | 35 | { |
36 | 36 | /** |
37 | 37 | * End can contain a maximum of one Documentation element. |
38 | - |
|
39 | - |
|
40 | 38 | */ |
41 | 39 | use HasDocumentation; |
42 | 40 | /** |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * @var PropertyRef $propertyRef |
84 | 84 | */ |
85 | - private $propertyRef ; |
|
85 | + private $propertyRef; |
|
86 | 86 | |
87 | 87 | public function __construct(string $role, PropertyRef $propertyRef) |
88 | 88 | { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public function getDomName(): string |
150 | 150 | { |
151 | - return $this->isPrincipal ? 'Principal' :'Dependent'; |
|
151 | + return $this->isPrincipal ? 'Principal' : 'Dependent'; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function getAttributeValue(): ?string; |
13 | 13 | |
14 | - public function getAttributeNullCheck():bool ; |
|
14 | + public function getAttributeNullCheck():bool; |
|
15 | 15 | |
16 | 16 | public function getAttributeForVersion(): OdataVersions; |
17 | 17 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | public function testEdmxTestXmlSerialize() |
16 | 16 | { |
17 | - $writterContext = new WriterContext(OdataVersions::THREE()); |
|
17 | + $writterContext = new WriterContext(OdataVersions::THREE()); |
|
18 | 18 | |
19 | 19 | $edmx = new Edmx(); |
20 | 20 | $domNode = $writterContext->write($edmx); |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | $this->assertXmlStringEqualsXmlString('<edmx:Edmx xmlns="http://schemas.microsoft.com/ado/2009/11/edm" xmlns:annotations="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:metadata="http://schemas.microsoft.com/ado/2007/08/DataServices/Metadata" Version="1.0"><edmx:DataServices metadata:DataServiceVersion="3.0"><Schema /></edmx:DataServices></edmx:Edmx>', $xml); |
24 | 24 | } |
25 | 25 | |
26 | - public function testEdmxSerializePartialSchema(){ |
|
27 | - $writterContext = new WriterContext(OdataVersions::THREE()); |
|
26 | + public function testEdmxSerializePartialSchema() { |
|
27 | + $writterContext = new WriterContext(OdataVersions::THREE()); |
|
28 | 28 | $edmx = new Edmx(); |
29 | 29 | $schema = new Schema('ODataWebV3.Northwind.Model'); |
30 | 30 | $edmx->addToDataServices($schema); |
@@ -23,7 +23,8 @@ |
||
23 | 23 | $this->assertXmlStringEqualsXmlString('<edmx:Edmx xmlns="http://schemas.microsoft.com/ado/2009/11/edm" xmlns:annotations="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:metadata="http://schemas.microsoft.com/ado/2007/08/DataServices/Metadata" Version="1.0"><edmx:DataServices metadata:DataServiceVersion="3.0"><Schema /></edmx:DataServices></edmx:Edmx>', $xml); |
24 | 24 | } |
25 | 25 | |
26 | - public function testEdmxSerializePartialSchema(){ |
|
26 | + public function testEdmxSerializePartialSchema() |
|
27 | + { |
|
27 | 28 | $writterContext = new WriterContext(OdataVersions::THREE()); |
28 | 29 | $edmx = new Edmx(); |
29 | 30 | $schema = new Schema('ODataWebV3.Northwind.Model'); |
@@ -15,9 +15,9 @@ |
||
15 | 15 | * @param $documentation |
16 | 16 | * @dataProvider usingTestDataProvider |
17 | 17 | */ |
18 | - public function testUsingTestXmlSerialize($expected,$namespace,$alias, $documentation) |
|
18 | + public function testUsingTestXmlSerialize($expected, $namespace, $alias, $documentation) |
|
19 | 19 | { |
20 | - $using = new Using($namespace,$alias,$documentation); |
|
20 | + $using = new Using($namespace, $alias, $documentation); |
|
21 | 21 | |
22 | 22 | $domNode = $this->writerContext->write($using, false); |
23 | 23 | $this->TESTNODE->appendChild($domNode); |