Completed
Push — master ( 6f5720...a297dc )
by Nikolay
07:30
created
src/POData/Writers/Metadata/MetadataWriter.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
      * 
186 186
      * @param ResourceType[] $resourceTypes resource types array
187 187
 
188
-     * @param array $associationTypesInResourceTypesNamespace collection of 
188
+     * @param ResourceAssociationType[] $associationTypesInResourceTypesNamespace collection of 
189 189
      * association types for the given resource types
190 190
      * array(string, AssociationType)
191 191
      * 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use POData\Providers\Metadata\ResourceAssociationSet;
6 6
 use POData\Providers\Metadata\ResourceAssociationTypeEnd;
7
-use POData\Providers\Metadata\ResourceAssociationSetEnd;
8 7
 use POData\Providers\Metadata\ResourcePropertyKind;
9 8
 use POData\Providers\Metadata\ResourceProperty;
10 9
 use POData\Providers\Metadata\ResourceType;
Please login to merge, or discard this patch.
Indentation   +16 added lines, -17 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function writeMetadata()
89 89
     {   
90
-       $this->_metadataManager = MetadataManager::create($this->providersWrapper);
90
+        $this->_metadataManager = MetadataManager::create($this->providersWrapper);
91 91
 
92 92
         $this->_dataServiceVersion = new Version(1, 0);
93 93
         $edmSchemaVersion = $this->providersWrapper->getEdmSchemaVersion();
@@ -184,7 +184,6 @@  discard block
 block discarded – undo
184 184
      * Write all resource types (entity and complex types)
185 185
      * 
186 186
      * @param ResourceType[] $resourceTypes resource types array
187
-
188 187
      * @param array $associationTypesInResourceTypesNamespace collection of 
189 188
      * association types for the given resource types
190 189
      * array(string, AssociationType)
@@ -286,10 +285,10 @@  discard block
 block discarded – undo
286 285
             } else if ($resourceProperty->isKindOf(ResourcePropertyKind::RESOURCE_REFERENCE) 
287 286
                 || $resourceProperty->isKindOf(ResourcePropertyKind::RESOURCESET_REFERENCE)
288 287
             ) {
289
-                 $this->_writeNavigationProperty($resourceType, $associationTypesInResourceTypeNamespace, $resourceProperty);
288
+                    $this->_writeNavigationProperty($resourceType, $associationTypesInResourceTypeNamespace, $resourceProperty);
290 289
             } else {
291
-                 //Unexpected ResourceProperty, expected 
292
-                 //Bag/Primitive/Complex/Navigation Property   
290
+                    //Unexpected ResourceProperty, expected 
291
+                    //Bag/Primitive/Complex/Navigation Property   
293 292
             }            
294 293
         }
295 294
     }
@@ -526,23 +525,23 @@  discard block
 block discarded – undo
526 525
     private function _getSchemaNamespaceUri($edmSchemaVersion)
527 526
     {
528 527
         switch ($edmSchemaVersion) {
529
-	        case EdmSchemaVersion::VERSION_1_DOT_0:
530
-	            return ODataConstants::CSDL_VERSION_1_0;
528
+            case EdmSchemaVersion::VERSION_1_DOT_0:
529
+                return ODataConstants::CSDL_VERSION_1_0;
531 530
 
532
-	        case EdmSchemaVersion::VERSION_1_DOT_1:
533
-	            return ODataConstants::CSDL_VERSION_1_1;
531
+            case EdmSchemaVersion::VERSION_1_DOT_1:
532
+                return ODataConstants::CSDL_VERSION_1_1;
534 533
 
535
-	        case EdmSchemaVersion::VERSION_1_DOT_2:
536
-	            return ODataConstants::CSDL_VERSION_1_2;
534
+            case EdmSchemaVersion::VERSION_1_DOT_2:
535
+                return ODataConstants::CSDL_VERSION_1_2;
537 536
 
538
-	        case EdmSchemaVersion::VERSION_2_DOT_0:
539
-	            return ODataConstants::CSDL_VERSION_2_0;
537
+            case EdmSchemaVersion::VERSION_2_DOT_0:
538
+                return ODataConstants::CSDL_VERSION_2_0;
540 539
 
541
-	        case EdmSchemaVersion::VERSION_2_DOT_2:
542
-	            return ODataConstants::CSDL_VERSION_2_2;
540
+            case EdmSchemaVersion::VERSION_2_DOT_2:
541
+                return ODataConstants::CSDL_VERSION_2_2;
543 542
 
544
-	        default:
545
-	            return ODataConstants::CSDL_VERSION_2_2;
543
+            default:
544
+                return ODataConstants::CSDL_VERSION_2_2;
546 545
         }
547 546
     }
548 547
 }
549 548
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
      */
367 367
     private function _writeNavigationProperty(ResourceType $resourceType, $associationTypesInResourceTypeNamespace, ResourceProperty $navigationProperty)
368 368
     {
369
-        $associationTypeLookupName = $resourceType->getName() . '_' . $navigationProperty->getName();
369
+        $associationTypeLookupName = $resourceType->getName().'_'.$navigationProperty->getName();
370 370
         if (!array_key_exists($associationTypeLookupName, $associationTypesInResourceTypeNamespace)) {
371 371
             throw new InvalidOperationException(Messages::metadataWriterNoResourceAssociationSetForNavigationProperty($navigationProperty->getName(), $resourceType->getName()));
372 372
         }
@@ -503,8 +503,8 @@  discard block
 block discarded – undo
503 503
      */
504 504
     private function _writeAssocationSetEnds(ResourceAssociationSet $associationSet)
505 505
     {
506
-        $associationTypeEnd1 =  $associationSet->resourceAssociationType->getResourceAssociationTypeEnd($associationSet->getEnd1()->getResourceType(), $associationSet->getEnd1()->getResourceProperty());
507
-        $associationTypeEnd2 =  $associationSet->resourceAssociationType->getResourceAssociationTypeEnd($associationSet->getEnd2()->getResourceType(), $associationSet->getEnd2()->getResourceProperty());
506
+        $associationTypeEnd1 = $associationSet->resourceAssociationType->getResourceAssociationTypeEnd($associationSet->getEnd1()->getResourceType(), $associationSet->getEnd1()->getResourceProperty());
507
+        $associationTypeEnd2 = $associationSet->resourceAssociationType->getResourceAssociationTypeEnd($associationSet->getEnd2()->getResourceType(), $associationSet->getEnd2()->getResourceProperty());
508 508
         $this->_xmlWriter->startElement(ODataConstants::END);
509 509
         $this->_xmlWriter->writeAttribute(ODataConstants::ROLE, $associationTypeEnd1->getName());
510 510
         $this->_xmlWriter->writeAttribute(ODataConstants::ENTITY_SET, $associationSet->getEnd1()->getResourceSet()->getName());
Please login to merge, or discard this patch.
src/POData/Common/HttpStatus.php 1 patch
Switch Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -60,88 +60,88 @@
 block discarded – undo
60 60
     public static function getStatusDescription($statusCode)
61 61
     {
62 62
         switch ($statusCode) {
63
-        case self::CODE_CONTINUE:
64
-                return 'Continue';
65
-        case self::CODE_SWITCHING_PROTOCOLS:
66
-                return  'SwitchingProtocols';
67
-        case self::CODE_OK:
68
-                return  'OK';
69
-        case self::CODE_CREATED;
70
-                return  'Created';
71
-        case self::CODE_ACCEPTED;
72
-                return  'Accepted';
73
-        case self::CODE_NON_AUTHRATIVE_INFORMATION;
74
-                return  'Non-Authrative Information';
75
-        case self::CODE_NOCONTENT;
76
-                return  'No Content';
77
-        case self::CODE_RESET_CONTENT;
78
-                return 'ResetContent';
79
-        case self::CODE_PARTIAL_CONTENT;
80
-                return 'Partial Content';
81
-        case self::CODE_MULTIPLE_CHOICE;
82
-                return 'Multiple Choices';
83
-        case self::CODE_MOVED_PERMANENTLY;
84
-                return 'Moved Permanently';
85
-        case self::CODE_FOUND;
86
-                return 'Found';
87
-        case self::CODE_SEE_OTHER;
88
-                return 'See Other';
89
-        case self::CODE_NOT_MODIFIED;
90
-                return 'Not Modified';
91
-        case self::CODE_USE_PROXY;
92
-                return 'Use Proxy';
93
-        case self::CODE_UNUSED;
94
-                return 'Unused';    
95
-        case self::CODE_TEMP_REDIRECT;
96
-                return 'Temporary Redirect';
97
-        case self::CODE_BAD_REQUEST;
98
-                return 'Bad Request';
99
-        case self::CODE_UNAUTHORIZED;
100
-                return 'Unauthorized';
101
-        case self::CODE_PAYMENT_REQ;
102
-                return 'Payment Required';
103
-        case self::CODE_FORBIDDEN;
104
-                return 'Forbidden';
105
-        case self::CODE_NOT_FOUND;
106
-                return 'Not Found';
107
-        case self::CODE_METHOD_NOT_ALLOWED;
108
-                return 'Method Not Allowed';
109
-        case self::CODE_NOT_ACCEPTABLE;
110
-                return 'Not Acceptable';
111
-        case self::CODE_PROXY_AUTHENTICATION_REQUIRED;
112
-                return 'Proxy Authentication Required';
113
-        case self::CODE_REQUEST_TIMEOUT;
114
-                return 'Request Timeout';
115
-        case self::CODE_CONFLICT;
116
-                return 'Conflict';
117
-        case self::CODE_GONE;
118
-                return 'Gone';
119
-        case self::CODE_LENGTH_REQUIRED;
120
-                return 'Length Required';
121
-        case self::CODE_PRECONDITION_FAILED;
122
-                return 'Precondition Failed';
123
-        case self::CODE_REQUEST_ENTITY_TOOLONG;
124
-                return 'Request Entity Too Large';
125
-        case self::CODE_REQUEST_URI_TOOLONG;
126
-                return 'Request-URI Too Large';
127
-        case self::CODE_UNSUPPORTED_MEDIATYPE;
128
-                return 'Unsupported Media Type';
129
-        case self::CODE_REQUESTED_RANGE_NOT_SATISFIABLE;
130
-                return 'Requested Range NotSatisfiable';
131
-        case self::CODE_EXPECTATION_FAILED;
132
-                return 'Expectation Failed';
133
-        case self::CODE_INTERNAL_SERVER_ERROR;
134
-                return 'Internal Server Error';
135
-        case self::CODE_NOT_IMPLEMENTED;
136
-                return 'Not Implemented';
137
-        case self::CODE_BAD_GATEWAY;
138
-                return 'Bad Gateway';
139
-        case self::CODE_SERVICE_UNAVAILABLE;
140
-                return 'Service Unavailable';
141
-        case self::CODE_GATEWAY_TIMEOUT;
142
-                return 'Gateway Timeout';
143
-        case self::CODE_HTTP_VERSION_NOT_SUPPORTED;
144
-                return 'HTTP Version Not Suppoted';
63
+            case self::CODE_CONTINUE:
64
+                    return 'Continue';
65
+            case self::CODE_SWITCHING_PROTOCOLS:
66
+                    return  'SwitchingProtocols';
67
+            case self::CODE_OK:
68
+                    return  'OK';
69
+            case self::CODE_CREATED;
70
+                    return  'Created';
71
+            case self::CODE_ACCEPTED;
72
+                    return  'Accepted';
73
+            case self::CODE_NON_AUTHRATIVE_INFORMATION;
74
+                    return  'Non-Authrative Information';
75
+            case self::CODE_NOCONTENT;
76
+                    return  'No Content';
77
+            case self::CODE_RESET_CONTENT;
78
+                    return 'ResetContent';
79
+            case self::CODE_PARTIAL_CONTENT;
80
+                    return 'Partial Content';
81
+            case self::CODE_MULTIPLE_CHOICE;
82
+                    return 'Multiple Choices';
83
+            case self::CODE_MOVED_PERMANENTLY;
84
+                    return 'Moved Permanently';
85
+            case self::CODE_FOUND;
86
+                    return 'Found';
87
+            case self::CODE_SEE_OTHER;
88
+                    return 'See Other';
89
+            case self::CODE_NOT_MODIFIED;
90
+                    return 'Not Modified';
91
+            case self::CODE_USE_PROXY;
92
+                    return 'Use Proxy';
93
+            case self::CODE_UNUSED;
94
+                    return 'Unused';    
95
+            case self::CODE_TEMP_REDIRECT;
96
+                    return 'Temporary Redirect';
97
+            case self::CODE_BAD_REQUEST;
98
+                    return 'Bad Request';
99
+            case self::CODE_UNAUTHORIZED;
100
+                    return 'Unauthorized';
101
+            case self::CODE_PAYMENT_REQ;
102
+                    return 'Payment Required';
103
+            case self::CODE_FORBIDDEN;
104
+                    return 'Forbidden';
105
+            case self::CODE_NOT_FOUND;
106
+                    return 'Not Found';
107
+            case self::CODE_METHOD_NOT_ALLOWED;
108
+                    return 'Method Not Allowed';
109
+            case self::CODE_NOT_ACCEPTABLE;
110
+                    return 'Not Acceptable';
111
+            case self::CODE_PROXY_AUTHENTICATION_REQUIRED;
112
+                    return 'Proxy Authentication Required';
113
+            case self::CODE_REQUEST_TIMEOUT;
114
+                    return 'Request Timeout';
115
+            case self::CODE_CONFLICT;
116
+                    return 'Conflict';
117
+            case self::CODE_GONE;
118
+                    return 'Gone';
119
+            case self::CODE_LENGTH_REQUIRED;
120
+                    return 'Length Required';
121
+            case self::CODE_PRECONDITION_FAILED;
122
+                    return 'Precondition Failed';
123
+            case self::CODE_REQUEST_ENTITY_TOOLONG;
124
+                    return 'Request Entity Too Large';
125
+            case self::CODE_REQUEST_URI_TOOLONG;
126
+                    return 'Request-URI Too Large';
127
+            case self::CODE_UNSUPPORTED_MEDIATYPE;
128
+                    return 'Unsupported Media Type';
129
+            case self::CODE_REQUESTED_RANGE_NOT_SATISFIABLE;
130
+                    return 'Requested Range NotSatisfiable';
131
+            case self::CODE_EXPECTATION_FAILED;
132
+                    return 'Expectation Failed';
133
+            case self::CODE_INTERNAL_SERVER_ERROR;
134
+                    return 'Internal Server Error';
135
+            case self::CODE_NOT_IMPLEMENTED;
136
+                    return 'Not Implemented';
137
+            case self::CODE_BAD_GATEWAY;
138
+                    return 'Bad Gateway';
139
+            case self::CODE_SERVICE_UNAVAILABLE;
140
+                    return 'Service Unavailable';
141
+            case self::CODE_GATEWAY_TIMEOUT;
142
+                    return 'Gateway Timeout';
143
+            case self::CODE_HTTP_VERSION_NOT_SUPPORTED;
144
+                    return 'HTTP Version Not Suppoted';
145 145
         }
146 146
 
147 147
         return null;
Please login to merge, or discard this patch.
src/POData/Common/Messages.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public static function expressionParser2NonPrimitivePropertyNotAllowed()
173 173
     {
174
-    	return 'This data service does not support non-primitive types in the expression';
174
+        return 'This data service does not support non-primitive types in the expression';
175 175
     }
176 176
 
177 177
     /** 
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
      */
605 605
     public static function providersWrapperInvalidExpressionProviderInstance()
606 606
     {
607
-    	return 'The value returned by IQueryProvider::getExpressionProvider method must be an implementation of IExpressionProvider';
607
+        return 'The value returned by IQueryProvider::getExpressionProvider method must be an implementation of IExpressionProvider';
608 608
     }
609 609
 
610 610
     /**
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public static function expressionLexerUnterminatedStringLiteral($pos, $text)
23 23
     {
24
-        return 'Unterminated string literal at position ' . $pos . ' in ' . $text;
24
+        return 'Unterminated string literal at position '.$pos.' in '.$text;
25 25
     }
26 26
     
27 27
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public static function expressionLexerDigitExpected($pos)
35 35
     {
36
-        return 'Digit expected at position ' . $pos;
36
+        return 'Digit expected at position '.$pos;
37 37
     }
38 38
 
39 39
     /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public static function expressionLexerSyntaxError($pos)
47 47
     {
48
-        return 'Syntax Error at position ' . $pos;
48
+        return 'Syntax Error at position '.$pos;
49 49
     }
50 50
 
51 51
     /**
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
      */
720 720
     public static function providersWrapperIDSQPMethodReturnsUnExpectedType($entityTypeName, $methodName)
721 721
     {
722
-        return 'The implementation of the method ' . $methodName . ' must return an instance of type described by resource set\'s type(' . $entityTypeName .') or null if resource does not exists';
722
+        return 'The implementation of the method '.$methodName.' must return an instance of type described by resource set\'s type('.$entityTypeName.') or null if resource does not exists';
723 723
     }
724 724
 
725 725
     /**
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
      */
733 733
     public static function providersWrapperIDSQPMethodReturnsInstanceWithNullKeyProperties($methodName)
734 734
     {
735
-        return 'The ' . $methodName . ' implementation returns an entity with null key propert(y|ies)';
735
+        return 'The '.$methodName.' implementation returns an entity with null key propert(y|ies)';
736 736
     }
737 737
 
738 738
     /**
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
      */
747 747
     public static function providersWrapperIDSQPMethodReturnsInstanceWithNonMatchingKeys($methodName)
748 748
     {
749
-        return 'The ' . $methodName . ' implementation returns an instance with non-matching key';
749
+        return 'The '.$methodName.' implementation returns an instance with non-matching key';
750 750
     }
751 751
     
752 752
     /**
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
      */
802 802
     public static function keyDescriptorInCompatibleKeyType($segment, $keyProperty, $expectedType, $actualType)
803 803
     {
804
-        return "Syntax error in the segment '$segment'. The value of key property '$keyProperty' should be of type " . $expectedType . ", given " . $actualType;
804
+        return "Syntax error in the segment '$segment'. The value of key property '$keyProperty' should be of type ".$expectedType.", given ".$actualType;
805 805
     }
806 806
 
807 807
     /**
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
      */
819 819
     public static function keyDescriptorInCompatibleKeyTypeAtPosition($segment, $keyProperty, $position, $expectedType, $actualType)
820 820
     {
821
-        return "Syntax error in the segment '$segment'. The value of key property '$keyProperty' at position $position should be of type " . $expectedType . ", given " . $actualType;
821
+        return "Syntax error in the segment '$segment'. The value of key property '$keyProperty' at position $position should be of type ".$expectedType.", given ".$actualType;
822 822
     }
823 823
 
824 824
     /**
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
      */
1235 1235
     public static function expandProjectionParserPropertyWithoutMatchingExpand($propertyName)
1236 1236
     {
1237
-        return 'Only navigation properties specified in expand option can be travered in select option,In order to treaverse the navigation property \'' . $propertyName . '\', it should be first expanded';
1237
+        return 'Only navigation properties specified in expand option can be travered in select option,In order to treaverse the navigation property \''.$propertyName.'\', it should be first expanded';
1238 1238
     }
1239 1239
 
1240 1240
     /**
@@ -1976,7 +1976,7 @@  discard block
 block discarded – undo
1976 1976
      */
1977 1977
     public static function objectModelSerializerLoopsNotAllowedInComplexTypes($complexPropertyName)
1978 1978
     {
1979
-        return 'A circular loop was detected while serializing the property \''. $complexPropertyName . '\'. You must make sure that loops are not present in properties that return a bag or complex type.';
1979
+        return 'A circular loop was detected while serializing the property \''.$complexPropertyName.'\'. You must make sure that loops are not present in properties that return a bag or complex type.';
1980 1980
     }
1981 1981
 
1982 1982
     /**
@@ -2237,7 +2237,7 @@  discard block
 block discarded – undo
2237 2237
      */
2238 2238
     public static function hostRequestUriIsNotBasedOnRelativeUriInConfig($requestUri, $relativeUri)
2239 2239
     {
2240
-        return 'The request uri ' . $requestUri . ' is not valid as it is not based on the configured relative uri ' . $relativeUri;
2240
+        return 'The request uri '.$requestUri.' is not valid as it is not based on the configured relative uri '.$relativeUri;
2241 2241
     }
2242 2242
 
2243 2243
 
Please login to merge, or discard this patch.
src/POData/Common/MimeTypes.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
 
16 16
     const MIME_APPLICATION_JSON_MINIMAL_META = 'application/json;odata=minimalmetadata';
17 17
 
18
-	const MIME_APPLICATION_JSON_NO_META = 'application/json;odata=nometadata';
18
+    const MIME_APPLICATION_JSON_NO_META = 'application/json;odata=nometadata';
19 19
 
20
-	const MIME_APPLICATION_JSON_FULL_META = 'application/json;odata=fullmetadata';
20
+    const MIME_APPLICATION_JSON_FULL_META = 'application/json;odata=fullmetadata';
21 21
 
22 22
     const MIME_APPLICATION_JSON_VERBOSE = 'application/json;odata=verbose';
23 23
 
Please login to merge, or discard this patch.
src/POData/Common/ODataConstants.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     // Value for $format option for response atom format
31 31
     const FORMAT_ATOM = 'atom';
32 32
 
33
-	// Value for $format option for response atom format
34
-	const FORMAT_XML = 'xml';
33
+    // Value for $format option for response atom format
34
+    const FORMAT_XML = 'xml';
35 35
 
36 36
     //HTTP name for Accept header
37 37
     const HTTP_REQUEST_ACCEPT = 'Accept';
@@ -198,26 +198,26 @@  discard block
 block discarded – undo
198 198
     //metadata element name in json payload.
199 199
     const JSON_METADATA_STRING = '__metadata';
200 200
 
201
-	//metadata element name in json payload.
202
-	const JSON_LIGHT_METADATA_STRING = 'odata.metadata';
201
+    //metadata element name in json payload.
202
+    const JSON_LIGHT_METADATA_STRING = 'odata.metadata';
203 203
 
204 204
     //uri element name in json payload.
205 205
     const JSON_URI_STRING = 'uri';
206 206
 
207
-	//uri element name in json payload.
208
-	const JSON_URL_STRING = 'url';
207
+    //uri element name in json payload.
208
+    const JSON_URL_STRING = 'url';
209 209
 
210 210
     //type element name in json payload.
211 211
     const JSON_TYPE_STRING = 'type';
212 212
 
213
-	const JSON_LIGHT_METADATA_TYPE_STRING = 'odata.type';
214
-	const JSON_LIGHT_METADATA_ID_STRING = 'odata.id';
215
-	const JSON_LIGHT_METADATA_ETAG_STRING = 'odata.etag';
216
-	const JSON_LIGHT_METADATA_EDIT_LINK_STRING = 'odata.editLink';
217
-	const JSON_LIGHT_METADATA_PROPERTY_TYPE_SUFFIX_STRING = '@odata.type';
218
-	const JSON_LIGHT_METADATA_LINK_NAVIGATION_SUFFIX_STRING = '@odata.navigationLinkUrl';
213
+    const JSON_LIGHT_METADATA_TYPE_STRING = 'odata.type';
214
+    const JSON_LIGHT_METADATA_ID_STRING = 'odata.id';
215
+    const JSON_LIGHT_METADATA_ETAG_STRING = 'odata.etag';
216
+    const JSON_LIGHT_METADATA_EDIT_LINK_STRING = 'odata.editLink';
217
+    const JSON_LIGHT_METADATA_PROPERTY_TYPE_SUFFIX_STRING = '@odata.type';
218
+    const JSON_LIGHT_METADATA_LINK_NAVIGATION_SUFFIX_STRING = '@odata.navigationLinkUrl';
219 219
 
220
-	//edit_media element name in json payload.
220
+    //edit_media element name in json payload.
221 221
     const JSON_EDITMEDIA_STRING = 'edit_media';
222 222
 
223 223
     //media_src element name in json payload.
@@ -238,19 +238,19 @@  discard block
 block discarded – undo
238 238
     //row count element name in json payload
239 239
     const JSON_ROWCOUNT_STRING = '__count';
240 240
 
241
-	//row count element name in json payload
242
-	const JSON_LIGHT_ROWCOUNT_STRING = 'odata.count';
241
+    //row count element name in json payload
242
+    const JSON_LIGHT_ROWCOUNT_STRING = 'odata.count';
243 243
 
244 244
     //next page link element name in json payload
245 245
     const JSON_NEXT_STRING = '__next';
246 246
 
247
-	const JSON_LIGHT_NEXT_STRING = 'odata.next';
247
+    const JSON_LIGHT_NEXT_STRING = 'odata.next';
248 248
 
249 249
     //'results' header for Json data array
250 250
     const JSON_RESULT_NAME = 'results';
251 251
 
252
-	//'results' header for Json data array
253
-	const JSON_LIGHT_VALUE_NAME = 'value';
252
+    //'results' header for Json data array
253
+    const JSON_LIGHT_VALUE_NAME = 'value';
254 254
 
255 255
     const JSON_DATAWRAPPER_ELEMENT_NAME = 'd';
256 256
 
@@ -826,8 +826,8 @@  discard block
 block discarded – undo
826 826
     const HTTPREQUEST_HEADER_IF_NONE         = 'IF_NONE_MATCH';
827 827
     const HTTPREQUEST_HEADER_IF_UNMODIFIED   = 'IF_UNMODIFIED_SINCE';
828 828
 
829
-	const HTTPREQUEST_HEADER_DATA_SERVICE_VERSION       = 'DATASERVICEVERSION';
830
-	const HTTPREQUEST_HEADER_MAX_DATA_SERVICE_VERSION   = 'MAXDATASERVICEVERSION';
829
+    const HTTPREQUEST_HEADER_DATA_SERVICE_VERSION       = 'DATASERVICEVERSION';
830
+    const HTTPREQUEST_HEADER_MAX_DATA_SERVICE_VERSION   = 'MAXDATASERVICEVERSION';
831 831
 
832 832
     // Headers for HTTPResponse
833 833
     // We need to use these string with header() for setting-up these headers
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -772,7 +772,7 @@
 block discarded – undo
772 772
     const XML_DECIMAL_LITERAL_SUFFIX = 'M';
773 773
 
774 774
     //'L': Suffix for long (int64) type's representation
775
-    const XML_INT64_LITERAL_SUFFIX  = 'L';
775
+    const XML_INT64_LITERAL_SUFFIX = 'L';
776 776
 
777 777
     //'f': Suffix for float (single) type's representation
778 778
     const XML_SINGLE_LITERAL_SUFFIX  = 'f';
Please login to merge, or discard this patch.
src/POData/Common/Url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     public function getPort()
95 95
     {        
96
-        $port = isset ($this->_parts['port'])? $this->_parts['port'] : null;
96
+        $port = isset ($this->_parts['port']) ? $this->_parts['port'] : null;
97 97
         if ($port != null) {
98 98
             return $port;
99 99
         }
Please login to merge, or discard this patch.
src/POData/Common/Version.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
         if ($major > $this->major) {
71 71
             $this->major = $major;
72 72
             $this->minor = $minor;
73
-	        return true;
73
+            return true;
74 74
         } else if ($major == $this->major && $minor > $this->minor) {
75 75
             $this->minor = $minor;
76
-	        return true;
76
+            return true;
77 77
         }
78 78
 
79
-	    return false;
79
+        return false;
80 80
     }
81 81
 
82 82
     /**
@@ -117,37 +117,37 @@  discard block
 block discarded – undo
117 117
         return $this->major . '.' . $this->minor;
118 118
     }
119 119
 
120
-	//Is there a better way to do static const of complex type?
120
+    //Is there a better way to do static const of complex type?
121 121
 
122
-	/** @var Version[] */
123
-	private static $fixedVersion;
122
+    /** @var Version[] */
123
+    private static $fixedVersion;
124 124
 
125
-	private static function fillVersions(){
126
-		if(is_null(self::$fixedVersion)){
127
-			self::$fixedVersion = array(
128
-				1 => new Version(1,0),
129
-				2 => new Version(2,0),
130
-				3 => new Version(3,0),
131
-			);
132
-		}
133
-	}
125
+    private static function fillVersions(){
126
+        if(is_null(self::$fixedVersion)){
127
+            self::$fixedVersion = array(
128
+                1 => new Version(1,0),
129
+                2 => new Version(2,0),
130
+                3 => new Version(3,0),
131
+            );
132
+        }
133
+    }
134 134
 
135
-	public static function v1()
136
-	{
137
-		self::fillVersions();
138
-		return self::$fixedVersion[1];
139
-	}
135
+    public static function v1()
136
+    {
137
+        self::fillVersions();
138
+        return self::$fixedVersion[1];
139
+    }
140 140
 
141 141
 
142
-	public static function v2(){
143
-		self::fillVersions();
144
-		return self::$fixedVersion[2];
145
-	}
142
+    public static function v2(){
143
+        self::fillVersions();
144
+        return self::$fixedVersion[2];
145
+    }
146 146
 
147 147
 
148
-	public static function v3(){
149
-		self::fillVersions();
150
-		return self::$fixedVersion[3];
151
-	}
148
+    public static function v3(){
149
+        self::fillVersions();
150
+        return self::$fixedVersion[3];
151
+    }
152 152
 
153 153
 }
154 154
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function toString()
116 116
     {
117
-        return $this->major . '.' . $this->minor;
117
+        return $this->major.'.'.$this->minor;
118 118
     }
119 119
 
120 120
 	//Is there a better way to do static const of complex type?
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 	/** @var Version[] */
123 123
 	private static $fixedVersion;
124 124
 
125
-	private static function fillVersions(){
126
-		if(is_null(self::$fixedVersion)){
125
+	private static function fillVersions() {
126
+		if (is_null(self::$fixedVersion)) {
127 127
 			self::$fixedVersion = array(
128
-				1 => new Version(1,0),
129
-				2 => new Version(2,0),
130
-				3 => new Version(3,0),
128
+				1 => new Version(1, 0),
129
+				2 => new Version(2, 0),
130
+				3 => new Version(3, 0),
131 131
 			);
132 132
 		}
133 133
 	}
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
 	}
140 140
 
141 141
 
142
-	public static function v2(){
142
+	public static function v2() {
143 143
 		self::fillVersions();
144 144
 		return self::$fixedVersion[2];
145 145
 	}
146 146
 
147 147
 
148
-	public static function v3(){
148
+	public static function v3() {
149 149
 		self::fillVersions();
150 150
 		return self::$fixedVersion[3];
151 151
 	}
Please login to merge, or discard this patch.
src/POData/Configuration/ServiceConfiguration.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         $this->maxVersion = ProtocolVersion::V3(); //We default to the highest version
113 113
 
114
-	    $this->_validateETagHeader = true;
114
+        $this->_validateETagHeader = true;
115 115
     }
116 116
     
117 117
     /**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         }
195 195
 
196 196
         $this->_maxResultsPerCollection= $this->_checkIntegerNonNegativeParameter(
197
-			$maxResultPerCollection, 'setMaxResultsPerCollection'
197
+            $maxResultPerCollection, 'setMaxResultsPerCollection'
198 198
         );
199 199
     }
200 200
 
@@ -382,15 +382,15 @@  discard block
 block discarded – undo
382 382
     public function getMaxDataServiceVersion()
383 383
     {
384 384
         switch ($this->maxVersion) {
385
-	        case ProtocolVersion::V1():
386
-	            return new Version(1, 0);
385
+            case ProtocolVersion::V1():
386
+                return new Version(1, 0);
387 387
 
388
-	        case ProtocolVersion::V2():
389
-	            return new Version(2, 0);
388
+            case ProtocolVersion::V2():
389
+                return new Version(2, 0);
390 390
 
391
-	        case ProtocolVersion::V3():
392
-	        default:
393
-	            return new Version(3, 0);
391
+            case ProtocolVersion::V3():
392
+            default:
393
+                return new Version(3, 0);
394 394
         }
395 395
     }
396 396
 
@@ -406,31 +406,31 @@  discard block
 block discarded – undo
406 406
         $this->maxVersion = $version;
407 407
     }
408 408
 
409
-     /**
410
-      * Specify whether to validate the ETag or not
411
-      *
412
-      * @param boolean $validate True if ETag needs to validated, false otherwise.
413
-      *
414
-      * @return void
415
-      */
416
-     function setValidateETagHeader($validate)
417
-     {
418
-         $this->_validateETagHeader = $validate;
419
-     }
420
-
421
-     /**
422
-      * Gets whether to validate the ETag or not
423
-      *
424
-      * @return boolean True if ETag needs to validated, false
425
-      *                 if its not to be validated, Note that in case
426
-      *                 of false library will not write the ETag header
427
-      *                 in the response even though the requested resource
428
-      *                 support ETag
429
-      */
430
-     function getValidateETagHeader()
431
-     {
432
-         return $this->_validateETagHeader;
433
-     }
409
+        /**
410
+         * Specify whether to validate the ETag or not
411
+         *
412
+         * @param boolean $validate True if ETag needs to validated, false otherwise.
413
+         *
414
+         * @return void
415
+         */
416
+        function setValidateETagHeader($validate)
417
+        {
418
+            $this->_validateETagHeader = $validate;
419
+        }
420
+
421
+        /**
422
+         * Gets whether to validate the ETag or not
423
+         *
424
+         * @return boolean True if ETag needs to validated, false
425
+         *                 if its not to be validated, Note that in case
426
+         *                 of false library will not write the ETag header
427
+         *                 in the response even though the requested resource
428
+         *                 support ETag
429
+         */
430
+        function getValidateETagHeader()
431
+        {
432
+            return $this->_validateETagHeader;
433
+        }
434 434
 
435 435
 
436 436
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             );
194 194
         }
195 195
 
196
-        $this->_maxResultsPerCollection= $this->_checkIntegerNonNegativeParameter(
196
+        $this->_maxResultsPerCollection = $this->_checkIntegerNonNegativeParameter(
197 197
 			$maxResultPerCollection, 'setMaxResultsPerCollection'
198 198
         );
199 199
     }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     public function setEntitySetAccessRule($name, $rights)
251 251
     {
252 252
         if ($rights < EntitySetRights::NONE || $rights > EntitySetRights::ALL) {
253
-            throw new \InvalidArgumentException( Messages::configurationRightsAreNotInRange('$rights', 'setEntitySetAccessRule' ));
253
+            throw new \InvalidArgumentException(Messages::configurationRightsAreNotInRange('$rights', 'setEntitySetAccessRule'));
254 254
         }
255 255
 
256 256
         if (strcmp($name, '*') === 0) {
Please login to merge, or discard this patch.
src/POData/IService.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
     public function getOperationContext();
72 72
 
73 73
 
74
-	/**
75
-	 * Returns the ODataWriterRegistry to use when writing the response to a service document or resource request
76
-	 * @return ODataWriterRegistry
77
-	 */
78
-	public function getODataWriterRegistry();
74
+    /**
75
+     * Returns the ODataWriterRegistry to use when writing the response to a service document or resource request
76
+     * @return ODataWriterRegistry
77
+     */
78
+    public function getODataWriterRegistry();
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.