Completed
Push — master ( 932cd1...29fc25 )
by Christopher
01:11
created
src/POData/Writers/Metadata/MetadataWriter.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $resourceTypesInContainerNamespace = array();
99 99
         $containerNamespace = $this->providersWrapper->getContainerNamespace();
100 100
         foreach ($this->_metadataManager->getResourceTypesAlongWithNamespace()
101
-                 as $resourceTypeNamespace => $resourceTypesWithName) {
101
+                    as $resourceTypeNamespace => $resourceTypesWithName) {
102 102
             if ($resourceTypeNamespace == $containerNamespace) {
103 103
                 foreach ($resourceTypesWithName as $resourceTypeName => $resourceType) {
104 104
                     $resourceTypesInContainerNamespace[] = $resourceType;
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
     private function _writeProperties(ResourceType $resourceType, $associationTypesInResourceTypeNamespace)
280 280
     {
281 281
         foreach ($this->_metadataManager->getAllVisiblePropertiesDeclaredOnThisType($resourceType)
282
-                 as $resourceProperty) {
282
+                    as $resourceProperty) {
283 283
             if ($resourceProperty->isKindOf(ResourcePropertyKind::BAG)) {
284 284
                 $this->_writeBagProperty($resourceProperty);
285 285
             } elseif ($resourceProperty->isKindOf(ResourcePropertyKind::PRIMITIVE)) {
Please login to merge, or discard this patch.
src/POData/UriProcessor/RequestExpander.php 2 patches
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      * Pushes a segment for the root of the tree
171 171
      * Note: Calls to this method should be balanced with calls to popSegment.
172 172
      *
173
-     * @return bool true if the segment was pushed, false otherwise
173
+     * @return boolean|null true if the segment was pushed, false otherwise
174 174
      */
175 175
     private function pushSegmentForRoot()
176 176
     {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      * @param ResourceProperty &$resourceProperty Current navigation property
190 190
      *                                            being written out
191 191
      *
192
-     * @return bool true if a segment was pushed, false otherwise
192
+     * @return boolean|null true if a segment was pushed, false otherwise
193 193
      *
194 194
      * @throws InvalidOperationException If this function invoked with non-navigation
195 195
      *                                   property instance
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
      * @param ResourceSetWrapper &$resourceSetWrapper The resource set wrapper
278 278
      *                                                to push
279 279
      *
280
-     * @return bool true if the segment was push, false otherwise
280
+     * @return boolean|null true if the segment was push, false otherwise
281 281
      */
282 282
     private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper)
283 283
     {
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     }
302 302
 
303 303
     /**
304
-     * @param $expandedProjectionNode
304
+     * @param ExpandedProjectionNode $expandedProjectionNode
305 305
      * @param $entry
306 306
      * @return null|\object[]
307 307
      */
@@ -327,10 +327,10 @@  discard block
 block discarded – undo
327 327
     }
328 328
 
329 329
     /**
330
-     * @param $expandedProjectionNode
330
+     * @param ExpandedProjectionNode $expandedProjectionNode
331 331
      * @param $entry
332
-     * @param $resourceType
333
-     * @param $expandedPropertyName
332
+     * @param \POData\Providers\Metadata\ResourceType $resourceType
333
+     * @param string $expandedPropertyName
334 334
      * @throws InvalidOperationException
335 335
      * @throws \POData\Common\ODataException
336 336
      */
@@ -360,9 +360,9 @@  discard block
 block discarded – undo
360 360
     /**
361 361
      * @param $entry
362 362
      * @param $result
363
-     * @param $expandedProjectionNode
364
-     * @param $resourceType
365
-     * @param $expandedPropertyName
363
+     * @param ExpandedProjectionNode $expandedProjectionNode
364
+     * @param \POData\Providers\Metadata\ResourceType $resourceType
365
+     * @param string $expandedPropertyName
366 366
      * @throws InvalidOperationException
367 367
      */
368 368
     private function executeCollectionExpansionProcessExpansion(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      * @throws InvalidOperationException If this function invoked with non-navigation
195 195
      *                                   property instance
196 196
      */
197
-    private function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty)
197
+    private function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty)
198 198
     {
199 199
         if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY) {
200 200
             assert(!empty($this->getStack()->getSegmentNames()), '!is_empty($this->getStack()->getSegmentNames())');
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      *
280 280
      * @return bool true if the segment was push, false otherwise
281 281
      */
282
-    private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper)
282
+    private function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper)
283 283
     {
284 284
         $this->getStack()->pushSegment($segmentName, $resourceSetWrapper);
285 285
     }
Please login to merge, or discard this patch.
src/POData/UriProcessor/UriProcessor.php 2 patches
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -2,15 +2,10 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace POData\UriProcessor;
4 4
 
5
-use Illuminate\Support\Str;
6 5
 use POData\Providers\ProvidersWrapper;
7 6
 use POData\Providers\Metadata\ResourcePropertyKind;
8
-use POData\Providers\Metadata\ResourceTypeKind;
9
-use POData\Providers\Metadata\ResourceSetWrapper;
10
-use POData\Providers\Metadata\ResourceProperty;
11 7
 use POData\Providers\Query\QueryType;
12 8
 use POData\UriProcessor\QueryProcessor\QueryProcessor;
13
-use POData\UriProcessor\QueryProcessor\ExpandProjectionParser\ExpandedProjectionNode;
14 9
 use POData\UriProcessor\ResourcePathProcessor\ResourcePathProcessor;
15 10
 use POData\UriProcessor\ResourcePathProcessor\SegmentParser\SegmentDescriptor;
16 11
 use POData\UriProcessor\ResourcePathProcessor\SegmentParser\TargetKind;
@@ -18,7 +13,6 @@  discard block
 block discarded – undo
18 13
 use POData\IService;
19 14
 use POData\Common\Messages;
20 15
 use POData\Common\ODataException;
21
-use POData\Common\InvalidOperationException;
22 16
 use POData\Common\ODataConstants;
23 17
 use POData\Providers\Query\QueryResult;
24 18
 use POData\OperationContext\HTTPRequestMethod;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -382,7 +382,7 @@
 block discarded – undo
382 382
             $segment->setResult($entityInstance);
383 383
         } else {
384 384
             $skip = (null == $this->getRequest()) ? 0 : $this->getRequest()->getSkipCount();
385
-            $skip = (null == $skip) ? 0 :$skip;
385
+            $skip = (null == $skip) ? 0 : $skip;
386 386
             $queryResult = $this->getProviders()->getResourceSet(
387 387
                 $this->getRequest()->queryType,
388 388
                 $segment->getTargetResourceSetWrapper(),
Please login to merge, or discard this patch.
src/POData/UriProcessor/SegmentStack.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      *
51 51
      * @return bool true if the segment was push, false otherwise
52 52
      */
53
-    public function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper)
53
+    public function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper)
54 54
     {
55 55
         if (!is_string($segmentName)) {
56 56
             throw new InvalidOperationException('segmentName must be a string');
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/SimpleMetadataProvider.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -446,10 +446,10 @@  discard block
 block discarded – undo
446 446
 
447 447
     /**
448 448
      * @param \ReflectionClass $refClass
449
-     * @param $name
450
-     * @param $namespace
449
+     * @param string $name
450
+     * @param string|null $namespace
451 451
      * @param $typeKind
452
-     * @param $baseResourceType
452
+     * @param null|ResourceType $baseResourceType
453 453
      * @return ResourceType
454 454
      * @throws InvalidOperationException
455 455
      */
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     }
473 473
 
474 474
     /**
475
-     * @param $name
475
+     * @param string $name
476 476
      * @param ResourceType $resourceType
477 477
      * @throws InvalidOperationException
478 478
      */
Please login to merge, or discard this patch.
src/POData/Writers/Json/JsonWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,8 +158,8 @@
 block discarded – undo
158 158
 
159 159
             case 'Edm.DateTime':
160 160
                 $dateTime = new Carbon($value, new \DateTimeZone('UTC'));
161
-                $formattedDateTime = $dateTime->format('U') * 1000;
162
-                $this->_writeCore('/Date('.$formattedDateTime.')/', /* quotes */ true);
161
+                $formattedDateTime = $dateTime->format('U')*1000;
162
+                $this->_writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true);
163 163
                 break;
164 164
 
165 165
             case 'Edm.String':
Please login to merge, or discard this patch.
src/POData/Providers/ProvidersQueryWrapper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -453,7 +453,7 @@
 block discarded – undo
453 453
     }
454 454
 
455 455
     /**
456
-     * @param $methodName
456
+     * @param string $methodName
457 457
      * @param $entityInstance
458 458
      * @param ResourceSet $resourceSet
459 459
      * @return ResourceType
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/Binary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     public static function validateWithoutPrefix($value, &$outValue)
120 120
     {
121 121
         $length = strlen($value);
122
-        if (0 == $length || 0 != $length % 2) {
122
+        if (0 == $length || 0 != $length%2) {
123 123
             return false;
124 124
         }
125 125
 
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializer.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -770,9 +770,9 @@  discard block
 block discarded – undo
770 770
     /**
771 771
      * @param $customObject
772 772
      * @param ResourceType $resourceType
773
-     * @param $relativeUri
773
+     * @param string $relativeUri
774 774
      * @param ODataPropertyContent $odataPropertyContent
775
-     * @param $resourceTypeKind
775
+     * @param ResourceTypeKind $resourceTypeKind
776 776
      * @param $navigationProperties
777 777
      * @return array
778 778
      * @throws ODataException
@@ -879,9 +879,9 @@  discard block
 block discarded – undo
879 879
     /**
880 880
      * @param $customObject
881 881
      * @param ResourceType $resourceType
882
-     * @param $relativeUri
882
+     * @param string $relativeUri
883 883
      * @param ODataPropertyContent $odataPropertyContent
884
-     * @param $projectionNodes
884
+     * @param \POData\UriProcessor\QueryProcessor\ExpandProjectionParser\ProjectionNode[] $projectionNodes
885 885
      * @param $navigationProperties
886 886
      * @return array
887 887
      * @throws ODataException
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -695,7 +695,6 @@
 block discarded – undo
695 695
      *                                            whose value need to be converted
696 696
      * @param mixed $primitiveValue Primitive value to convert
697 697
      * @return string
698
-
699 698
      */
700 699
     private function _primitiveToString(
701 700
         ResourceType &$primitiveResourceType,
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     public function writeTopLevelComplexObject(
187 187
         &$complexValue,
188 188
         $propertyName,
189
-        ResourceType &$resourceType
189
+        ResourceType & $resourceType
190 190
     ) {
191 191
         $propertyContent = new ODataPropertyContent();
192 192
         $this->_writeComplexValue(
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
      */
331 331
     private function _writeFeedElements(
332 332
         &$entryObjects,
333
-        ResourceType &$resourceType,
333
+        ResourceType & $resourceType,
334 334
         $title,
335 335
         $absoluteUri,
336 336
         $relativeUri,
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 
699 699
      */
700 700
     private function _primitiveToString(
701
-        ResourceType &$primitiveResourceType,
701
+        ResourceType & $primitiveResourceType,
702 702
         $primitiveValue
703 703
     ) {
704 704
         $type = $primitiveResourceType->getInstanceType();
@@ -779,9 +779,9 @@  discard block
 block discarded – undo
779 779
      */
780 780
     private function writeObjectPropertiesUnexpanded(
781 781
         $customObject,
782
-        ResourceType &$resourceType,
782
+        ResourceType & $resourceType,
783 783
         $relativeUri,
784
-        ODataPropertyContent &$odataPropertyContent,
784
+        ODataPropertyContent & $odataPropertyContent,
785 785
         $resourceTypeKind,
786 786
         $navigationProperties
787 787
     ) {
@@ -888,9 +888,9 @@  discard block
 block discarded – undo
888 888
      */
889 889
     private function writeObjectPropertiesExpanded(
890 890
         $customObject,
891
-        ResourceType &$resourceType,
891
+        ResourceType & $resourceType,
892 892
         $relativeUri,
893
-        ODataPropertyContent &$odataPropertyContent,
893
+        ODataPropertyContent & $odataPropertyContent,
894 894
         $projectionNodes,
895 895
         $navigationProperties
896 896
     ) {
Please login to merge, or discard this patch.