@@ -34,29 +34,33 @@ discard block |
||
| 34 | 34 | ); |
| 35 | 35 | parent::handleStartNode($tagNamespace, $tagName, $attributes); |
| 36 | 36 | } |
| 37 | - public function handleStartAtomId(){ |
|
| 38 | - $this->enqueueEnd(function (){ |
|
| 37 | + public function handleStartAtomId() |
|
| 38 | + { |
|
| 39 | + $this->enqueueEnd(function () { |
|
| 39 | 40 | $this->oDataFeed->id = $this->popCharData(); |
| 40 | 41 | }); |
| 41 | 42 | } |
| 42 | - public function handleStartAtomTitle($attributes){ |
|
| 43 | + public function handleStartAtomTitle($attributes) |
|
| 44 | + { |
|
| 43 | 45 | $this->titleType = $this->arrayKeyOrDefault( |
| 44 | 46 | $attributes, |
| 45 | 47 | ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME, |
| 46 | 48 | '' |
| 47 | 49 | ); |
| 48 | - $this->enqueueEnd(function (){ |
|
| 50 | + $this->enqueueEnd(function () { |
|
| 49 | 51 | $this->oDataFeed->title = new ODataTitle($this->popCharData(), $this->titleType); |
| 50 | 52 | $this->titleType = null; |
| 51 | 53 | }); |
| 52 | 54 | } |
| 53 | - public function handleStartAtomUpdated(){ |
|
| 54 | - $this->enqueueEnd(function(){ |
|
| 55 | + public function handleStartAtomUpdated() |
|
| 56 | + { |
|
| 57 | + $this->enqueueEnd(function() { |
|
| 55 | 58 | $this->oDataFeed->updated = $this->popCharData(); |
| 56 | 59 | }); |
| 57 | 60 | } |
| 58 | 61 | |
| 59 | - public function handleStartAtomLink($attributes){ |
|
| 62 | + public function handleStartAtomLink($attributes) |
|
| 63 | + { |
|
| 60 | 64 | $rel = $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, ''); |
| 61 | 65 | $prop = $rel === ODataConstants::ATOM_SELF_RELATION_ATTRIBUTE_VALUE ? 'selfLink' : 'nextPageLink'; |
| 62 | 66 | $this->oDataFeed->{$prop} = new ODataLink( |
@@ -68,8 +72,9 @@ discard block |
||
| 68 | 72 | $this->enqueueEnd($this->doNothing()); |
| 69 | 73 | } |
| 70 | 74 | |
| 71 | - public function handleStartMetadataCount(){ |
|
| 72 | - $this->enqueueEnd(function(){ |
|
| 75 | + public function handleStartMetadataCount() |
|
| 76 | + { |
|
| 77 | + $this->enqueueEnd(function() { |
|
| 73 | 78 | $this->oDataFeed->rowCount = (int)$this->popCharData(); |
| 74 | 79 | }); |
| 75 | 80 | } |
@@ -22,7 +22,8 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | private $tagEndQueue; |
| 24 | 24 | |
| 25 | - private function resolveNamespaceToMethodTag($tagNamespace){ |
|
| 25 | + private function resolveNamespaceToMethodTag($tagNamespace) |
|
| 26 | + { |
|
| 26 | 27 | $tags = [ |
| 27 | 28 | strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) => 'Metadata', |
| 28 | 29 | strtolower(ODataConstants::ATOM_NAMESPACE) => 'Atom', |
@@ -90,7 +91,7 @@ discard block |
||
| 90 | 91 | } |
| 91 | 92 | protected function enqueueEnd(Closure $closure) |
| 92 | 93 | { |
| 93 | - if(null === $this->tagEndQueue){ |
|
| 94 | + if(null === $this->tagEndQueue) { |
|
| 94 | 95 | $this->tagEndQueue = new SplStack(); |
| 95 | 96 | } |
| 96 | 97 | $this->tagEndQueue->push($this->bindHere($closure)); |