Completed
Pull Request — master (#227)
by Christopher
08:42
created
src/POData/Common/Messages/queryProcessor.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public static function queryProcessorNoQueryOptionsApplicable()
32 32
     {
33 33
         return 'Query options $select, $expand, $filter, $orderby, $inlinecount, $skip, $skiptoken and $top are not' .
34
-               ' supported by this request method or cannot be applied to the requested resource.';
34
+                ' supported by this request method or cannot be applied to the requested resource.';
35 35
     }
36 36
 
37 37
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public static function queryProcessorSkipTokenCannotBeAppliedForNonPagedResourceSet($resourceSetName)
129 129
     {
130 130
         return '$skiptoken cannot be applied to the resource set \'' . $resourceSetName
131
-               . '\', since paging is not enabled for this resource set';
131
+                . '\', since paging is not enabled for this resource set';
132 132
     }
133 133
 
134 134
     /**
Please login to merge, or discard this patch.
src/POData/Common/Messages/request.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public static function requestVersionTooLow($requestedVersion, $requiredVersion)
24 24
     {
25 25
         return 'Request version \'' . $requestedVersion . '\' is not supported for the request payload. The only'
26
-               . ' supported version is \'' . $requiredVersion . '\'.';
26
+                . ' supported version is \'' . $requiredVersion . '\'.';
27 27
     }
28 28
 
29 29
     /**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion)
39 39
     {
40 40
         return 'The response requires that version ' . $requiredVersion . ' of the protocol be used, but the'
41
-               . ' MaxProtocolVersion of the data service is set to ' . $configuredVersion . '.';
41
+                . ' MaxProtocolVersion of the data service is set to ' . $configuredVersion . '.';
42 42
     }
43 43
 
44 44
     /**
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
         $availableVersions
72 72
     ) {
73 73
         return 'The version value ' . $requestedVersion . ' in the header ' . $requestHeaderName . ' is not'
74
-               . ' supported, available versions are ' . $availableVersions;
74
+                . ' supported, available versions are ' . $availableVersions;
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
src/POData/Common/Messages/resourceProperty.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public static function resourcePropertyInvalidKindParameter($argumentName)
21 21
     {
22 22
         return 'The argument \'' . $argumentName . '\' is not a valid ResourcePropertyKind enum value or'
23
-               . ' valid combination of ResourcePropertyKind enum values';
23
+                . ' valid combination of ResourcePropertyKind enum values';
24 24
     }
25 25
 
26 26
     /**
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
         $resourceTypeArgName
37 37
     ) {
38 38
         return 'The \'' . $resourcePropertyKindArgName . '\' parameter does not match with the type of the resource'
39
-               . ' type in parameter \'' . $resourceTypeArgName . '\'';
39
+                . ' type in parameter \'' . $resourceTypeArgName . '\'';
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/POData/Common/ErrorHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public static function handleException(\Exception $exception, IService $service)
26 26
     {
27
-        $acceptTypesText     = $service->getHost()->getRequestAccept();
27
+        $acceptTypesText = $service->getHost()->getRequestAccept();
28 28
         try {
29 29
             $responseContentType = HttpProcessUtility::selectMimeType(
30 30
                 $acceptTypesText,
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataMediaLink.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/POData/Readers/Atom/Processors/Entry/LinkProcessor.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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:
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/POData/Readers/Atom/Processors/Entry/PropertyProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) &&
38 38
             strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME))
39 39
         ) {
40
-            return ;
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 ||
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) &&
61 61
             strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME))
62 62
         ) {
63
-            return ;
63
+            return;
64 64
         }
65 65
         $prop                                                  = $this->properties->pop();
66 66
         $propContent                                           = $this->propertyContent->pop();
Please login to merge, or discard this patch.
src/POData/Readers/Atom/Processors/FeedProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
     {
117 117
         switch (strtolower($tagName)) {
118 118
             case strtolower(ODataConstants::ROWCOUNT_ELEMENT):
119
-                $this->oDataFeed->rowCount =  (int)$this->popCharData();
119
+                $this->oDataFeed->rowCount = (int) $this->popCharData();
120 120
                 break;
121 121
             default:
122 122
                 $this->onParseError('Metadata', 'End', $tagName);
Please login to merge, or discard this patch.
src/POData/Readers/Atom/Processors/EntryProcessor.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,8 +107,8 @@
 block discarded – undo
107 107
                 break;
108 108
             case strtolower(ODataConstants::ATOM_LINK_ELEMENT_NAME):
109 109
                 assert($this->subProcessor instanceof LinkProcessor);
110
-                 $this->handleLink($this->subProcessor->getObjetModelObject());
111
-                 $this->subProcessor = null;
110
+                    $this->handleLink($this->subProcessor->getObjetModelObject());
111
+                    $this->subProcessor = null;
112 112
                 break;
113 113
             case strtolower(ODataConstants::ATOM_CATEGORY_ELEMENT_NAME):
114 114
                 assert($this->objectModelSubNode instanceof ODataCategory);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -163,19 +163,19 @@
 block discarded – undo
163 163
                 break;
164 164
         }
165 165
     }
166
-    private function handleODataLink(ODataLink $link ){
167
-        if($link->name === ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE){
166
+    private function handleODataLink(ODataLink $link) {
167
+        if ($link->name === ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE) {
168 168
             $this->oDataEntry->editLink = $link;
169
-        }else{
169
+        } else {
170 170
             $this->oDataEntry->links[] = $link;
171 171
         }
172 172
     }
173 173
     private function handleODataMediaLink(ODataMediaLink $link)
174 174
     {
175
-        if($link->name === ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE){
175
+        if ($link->name === ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE) {
176 176
             $this->oDataEntry->mediaLink        = $link;
177 177
             $this->oDataEntry->isMediaLinkEntry = true;
178
-        }else{
178
+        } else {
179 179
             $this->oDataEntry->mediaLinks[] = $link;
180 180
         }
181 181
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -163,19 +163,20 @@
 block discarded – undo
163 163
                 break;
164 164
         }
165 165
     }
166
-    private function handleODataLink(ODataLink $link ){
167
-        if($link->name === ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE){
166
+    private function handleODataLink(ODataLink $link )
167
+    {
168
+        if($link->name === ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE) {
168 169
             $this->oDataEntry->editLink = $link;
169
-        }else{
170
+        } else {
170 171
             $this->oDataEntry->links[] = $link;
171 172
         }
172 173
     }
173 174
     private function handleODataMediaLink(ODataMediaLink $link)
174 175
     {
175
-        if($link->name === ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE){
176
+        if($link->name === ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE) {
176 177
             $this->oDataEntry->mediaLink        = $link;
177 178
             $this->oDataEntry->isMediaLinkEntry = true;
178
-        }else{
179
+        } else {
179 180
             $this->oDataEntry->mediaLinks[] = $link;
180 181
         }
181 182
     }
Please login to merge, or discard this patch.