Completed
Push — master ( 5fbcda...574d76 )
by Nikolay
02:55
created
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.
src/POData/ObjectModel/NavigationPropertyInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * @param boolean          $expanded          Whether the navigation is expanded
24 24
      *                                            or not.   
25 25
      */
26
-    public function __construct(ResourceProperty &$resourceProperty, $expanded)
26
+    public function __construct(ResourceProperty & $resourceProperty, $expanded)
27 27
     {
28 28
         $this->resourceProperty = $resourceProperty;
29 29
         $this->expanded = $expanded;
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataEntry.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,11 +78,11 @@
 block discarded – undo
78 78
      */
79 79
     public $isMediaLinkEntry;
80 80
 
81
-	/**
82
-	 * The name of the resource set this entry belongs to, use in metadata output
83
-	 * @var string
84
-	 */
85
-	public $resourceSetName;
81
+    /**
82
+     * The name of the resource set this entry belongs to, use in metadata output
83
+     * @var string
84
+     */
85
+    public $resourceSetName;
86 86
     
87 87
 
88 88
 }
89 89
\ No newline at end of file
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataMediaLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * @param string $contentType Mime type for Media content
62 62
      * @param string $eTag        eTag for media content
63 63
      */
64
-    function __construct ($name, $editLink, $srcLink, $contentType, $eTag)
64
+    function __construct($name, $editLink, $srcLink, $contentType, $eTag)
65 65
     {
66 66
         $this->contentType = $contentType;
67 67
         $this->editLink = $editLink;
Please login to merge, or discard this patch.