@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public function reset() |
24 | 24 | { |
25 | - $this->readers = []; |
|
25 | + $this->readers = []; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -78,7 +78,6 @@ |
||
78 | 78 | $this->eTag = $eTag; |
79 | 79 | $this->name = $name; |
80 | 80 | $this->srcLink = $srcLink; |
81 | - $this->rel = (null !== $rel) ? $rel : |
|
82 | - ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
81 | + $this->rel = (null !== $rel) ? $rel : ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
83 | 82 | } |
84 | 83 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | switch ($this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, null)) { |
24 | 24 | case ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE: |
25 | 25 | case ODataConstants::ODATA_RELATED_NAMESPACE . |
26 | - $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TITLE_ELELMET_NAME, ''): |
|
26 | + $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TITLE_ELELMET_NAME, ''): |
|
27 | 27 | $object = ODataLink::class; |
28 | 28 | break; |
29 | 29 | case ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE: |
@@ -43,14 +43,14 @@ |
||
43 | 43 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
44 | 44 | { |
45 | 45 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
46 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
46 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
47 | 47 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function handleEndNode($tagNamespace, $tagName) |
51 | 51 | { |
52 | 52 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
53 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
53 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
54 | 54 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
55 | 55 | } |
56 | 56 |
@@ -110,7 +110,7 @@ |
||
110 | 110 | break; |
111 | 111 | case strtolower(ODataConstants::ATOM_LINK_ELEMENT_NAME): |
112 | 112 | $this->handleLink($this->subProcessor->getObjetModelObject()); |
113 | - $this->subProcessor = null; |
|
113 | + $this->subProcessor = null; |
|
114 | 114 | break; |
115 | 115 | case strtolower(ODataConstants::ATOM_CATEGORY_ELEMENT_NAME): |
116 | 116 | $this->oDataEntry->type = $this->objectModelSubNode; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
39 | 39 | { |
40 | - if(strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)){ |
|
40 | + if (strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)) { |
|
41 | 41 | $this->subProcessor->handleStartNode($tagNamespace, $tagName, $attributes); |
42 | 42 | return; |
43 | 43 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | public function handleEndNode($tagNamespace, $tagName) |
92 | 92 | { |
93 | - if(strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)){ |
|
93 | + if (strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)) { |
|
94 | 94 | $this->subProcessor->handleEndNode($tagNamespace, $tagName); |
95 | 95 | return; |
96 | 96 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->subProcessor = null; |
114 | 114 | break; |
115 | 115 | case strtolower(ODataConstants::ATOM_CATEGORY_ELEMENT_NAME): |
116 | - $this->oDataEntry->type = $this->objectModelSubNode; |
|
116 | + $this->oDataEntry->type = $this->objectModelSubNode; |
|
117 | 117 | break; |
118 | 118 | case strtolower(ODataConstants::ATOM_CONTENT_ELEMENT_NAME): |
119 | 119 | $this->objectModelSubNode->properties = $this->subProcessor->getObjetModelObject(); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
39 | 39 | { |
40 | - if(strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)){ |
|
40 | + if(strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)) { |
|
41 | 41 | $this->subProcessor->handleStartNode($tagNamespace, $tagName, $attributes); |
42 | 42 | return; |
43 | 43 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | public function handleEndNode($tagNamespace, $tagName) |
92 | 92 | { |
93 | - if(strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)){ |
|
93 | + if(strtolower($tagNamespace) !== strtolower(ODataConstants::ATOM_NAMESPACE)) { |
|
94 | 94 | $this->subProcessor->handleEndNode($tagNamespace, $tagName); |
95 | 95 | return; |
96 | 96 | } |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
35 | 35 | { |
36 | - if( |
|
36 | + if ( |
|
37 | 37 | strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
38 | 38 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
39 | - ){ |
|
40 | - return ; |
|
39 | + ) { |
|
40 | + return; |
|
41 | 41 | } |
42 | 42 | //TODO: this will need to be expanded with opengis namespaces as well when supported |
43 | 43 | assert($tagNamespace === ODataConstants::ODATA_NAMESPACE || |
@@ -56,19 +56,19 @@ discard block |
||
56 | 56 | |
57 | 57 | public function handleEndNode($tagNamespace, $tagName) |
58 | 58 | { |
59 | - if( |
|
59 | + if ( |
|
60 | 60 | strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
61 | 61 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
62 | - ){ |
|
63 | - return ; |
|
62 | + ) { |
|
63 | + return; |
|
64 | 64 | } |
65 | 65 | $prop = $this->properties->pop(); |
66 | 66 | $propContent = $this->propertyContent->pop(); |
67 | 67 | $this->propertyContent->top()->properties[$prop->name] = $prop; |
68 | 68 | |
69 | - if(count($propContent->properties) == 0){ |
|
69 | + if (count($propContent->properties) == 0) { |
|
70 | 70 | $prop->value = $this->popCharData(); |
71 | - }else{ |
|
71 | + } else { |
|
72 | 72 | $prop->value = $propContent; |
73 | 73 | } |
74 | 74 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | if( |
37 | 37 | strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
38 | 38 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
39 | - ){ |
|
39 | + ) { |
|
40 | 40 | return ; |
41 | 41 | } |
42 | 42 | //TODO: this will need to be expanded with opengis namespaces as well when supported |
@@ -59,16 +59,16 @@ discard block |
||
59 | 59 | if( |
60 | 60 | strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
61 | 61 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
62 | - ){ |
|
62 | + ) { |
|
63 | 63 | return ; |
64 | 64 | } |
65 | 65 | $prop = $this->properties->pop(); |
66 | 66 | $propContent = $this->propertyContent->pop(); |
67 | 67 | $this->propertyContent->top()->properties[$prop->name] = $prop; |
68 | 68 | |
69 | - if(count($propContent->properties) == 0){ |
|
69 | + if(count($propContent->properties) == 0) { |
|
70 | 70 | $prop->value = $this->popCharData(); |
71 | - }else{ |
|
71 | + } else { |
|
72 | 72 | $prop->value = $propContent; |
73 | 73 | } |
74 | 74 | } |