@@ -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: |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | return; |
| 68 | 68 | } |
| 69 | 69 | $method = 'handle' . $methodType . 'Atom' . ucfirst(strtolower($tagName)); |
| 70 | - if(!method_exists($this, $method)){ |
|
| 70 | + if(!method_exists($this, $method)) { |
|
| 71 | 71 | $this->onParseError('Atom', $methodType, $tagName); |
| 72 | 72 | } |
| 73 | 73 | $this->{$method}($attributes); |
@@ -83,12 +83,13 @@ discard block |
||
| 83 | 83 | { |
| 84 | 84 | return $closure->bindTo($this, get_class($this)); |
| 85 | 85 | } |
| 86 | - private function enqueueEnd(Closure $closure){ |
|
| 86 | + private function enqueueEnd(Closure $closure) |
|
| 87 | + { |
|
| 87 | 88 | $this->tagEndQueue->push($this->bindHere($closure)); |
| 88 | 89 | } |
| 89 | 90 | protected function handleStartAtomId() |
| 90 | 91 | { |
| 91 | - $this->enqueueEnd(function(){ |
|
| 92 | + $this->enqueueEnd(function() { |
|
| 92 | 93 | $this->oDataEntry->id = $this->popCharData(); |
| 93 | 94 | }); |
| 94 | 95 | } |
@@ -99,7 +100,7 @@ discard block |
||
| 99 | 100 | ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME, |
| 100 | 101 | '' |
| 101 | 102 | ); |
| 102 | - $this->enqueueEnd(function(){ |
|
| 103 | + $this->enqueueEnd(function() { |
|
| 103 | 104 | $this->oDataEntry->title = new ODataTitle($this->popCharData(), $this->titleType); |
| 104 | 105 | $this->titleType = null; |
| 105 | 106 | }); |
@@ -111,14 +112,14 @@ discard block |
||
| 111 | 112 | } |
| 112 | 113 | protected function handleStartAtomUpdated() |
| 113 | 114 | { |
| 114 | - $this->enqueueEnd(function(){ |
|
| 115 | + $this->enqueueEnd(function() { |
|
| 115 | 116 | $this->oDataEntry->updated = $this->popCharData(); |
| 116 | 117 | }); |
| 117 | 118 | } |
| 118 | 119 | protected function handleStartAtomLink($attributes) |
| 119 | 120 | { |
| 120 | 121 | $this->subProcessor = new LinkProcessor($attributes); |
| 121 | - $this->enqueueEnd(function(){ |
|
| 122 | + $this->enqueueEnd(function() { |
|
| 122 | 123 | assert($this->subProcessor instanceof LinkProcessor); |
| 123 | 124 | $this->handleLink($this->subProcessor->getObjetModelObject()); |
| 124 | 125 | $this->subProcessor = null; |
@@ -134,7 +135,7 @@ discard block |
||
| 134 | 135 | 'http://schemas.microsoft.com/ado/2007/08/dataservices/scheme' |
| 135 | 136 | ) |
| 136 | 137 | ); |
| 137 | - $this->enqueueEnd(function(){ |
|
| 138 | + $this->enqueueEnd(function() { |
|
| 138 | 139 | assert($this->objectModelSubNode instanceof ODataCategory); |
| 139 | 140 | $this->oDataEntry->setType($this->objectModelSubNode); |
| 140 | 141 | }); |
@@ -145,7 +146,7 @@ discard block |
||
| 145 | 146 | $this->objectModelSubNode = new AtomContent( |
| 146 | 147 | $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME, 'application/xml') |
| 147 | 148 | ); |
| 148 | - $this->enqueueEnd(function(){ |
|
| 149 | + $this->enqueueEnd(function() { |
|
| 149 | 150 | assert($this->objectModelSubNode instanceof AtomContent); |
| 150 | 151 | $this->objectModelSubNode->properties = $this->subProcessor->getObjetModelObject(); |
| 151 | 152 | $this->oDataEntry->setAtomContent($this->objectModelSubNode); |
@@ -197,19 +198,20 @@ discard block |
||
| 197 | 198 | break; |
| 198 | 199 | } |
| 199 | 200 | } |
| 200 | - private function handleODataLink(ODataLink $link ){ |
|
| 201 | - if($link->name === ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE){ |
|
| 201 | + private function handleODataLink(ODataLink $link ) |
|
| 202 | + { |
|
| 203 | + if($link->name === ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE) { |
|
| 202 | 204 | $this->oDataEntry->editLink = $link; |
| 203 | - }else{ |
|
| 205 | + } else { |
|
| 204 | 206 | $this->oDataEntry->links[] = $link; |
| 205 | 207 | } |
| 206 | 208 | } |
| 207 | 209 | private function handleODataMediaLink(ODataMediaLink $link) |
| 208 | 210 | { |
| 209 | - if($link->name === ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE){ |
|
| 211 | + if($link->name === ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE) { |
|
| 210 | 212 | $this->oDataEntry->mediaLink = $link; |
| 211 | 213 | $this->oDataEntry->isMediaLinkEntry = true; |
| 212 | - }else{ |
|
| 214 | + } else { |
|
| 213 | 215 | $this->oDataEntry->mediaLinks[] = $link; |
| 214 | 216 | } |
| 215 | 217 | } |