Passed
Pull Request — master (#227)
by Alex
05:54
created
src/POData/Readers/Atom/Processors/EntryProcessor.php 1 patch
Braces   +15 added lines, -13 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.