Passed
Push — master ( 2b99ce...30750d )
by Christopher
05:48
created
src/POData/Providers/Metadata/SimpleMetadataProvider.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,13 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace POData\Providers\Metadata;
4 4
 
5
-use AlgoWeb\ODataMetadata\IsOK;
6 5
 use AlgoWeb\ODataMetadata\MetadataManager;
7 6
 use AlgoWeb\ODataMetadata\MetadataV3\edm\TComplexTypeType;
8 7
 use AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityTypeType;
9 8
 use Illuminate\Support\Str;
10 9
 use POData\Common\InvalidOperationException;
11
-use POData\Common\NotImplementedException;
12 10
 use POData\Providers\Metadata\Type\IType;
13 11
 use POData\Providers\Metadata\Type\TypeCode;
14 12
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         $type = null;
296 296
         if ($typeKind == ResourceTypeKind::ENTITY) {
297 297
             list($oet, $entitySet) = $this->metadataManager->addEntityType($name);
298
-            assert($oet instanceof TEntityTypeType, "Entity type ".$name. " not successfully added");
298
+            assert($oet instanceof TEntityTypeType, "Entity type " . $name . " not successfully added");
299 299
             $type = new ResourceEntityType($refClass, $oet, $this);
300 300
             $typeName = $type->getFullName();
301 301
             $returnName = Str::plural($typeName);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
             );
585 585
         }
586 586
         if (!in_array($resourceMult, $allowedMult)) {
587
-            throw new InvalidOperationException("Supplied multiplicity ".$resourceMult." not valid");
587
+            throw new InvalidOperationException("Supplied multiplicity " . $resourceMult . " not valid");
588 588
         }
589 589
 
590 590
         $resourcePropertyKind = ('*' == $resourceMult)
@@ -852,12 +852,12 @@  discard block
 block discarded – undo
852 852
             throw new \InvalidArgumentException($msg);
853 853
         }
854 854
         if (array_key_exists($name, $this->resourceSets)) {
855
-            $msg = "Resource set with same name, ". $name. ", exists";
855
+            $msg = "Resource set with same name, " . $name . ", exists";
856 856
             throw new \InvalidArgumentException($msg);
857 857
         }
858 858
         $typeName = $returnType->getName();
859 859
         if (!array_key_exists($typeName, $this->OdataEntityMap)) {
860
-            $msg = "Mapping not defined for ".$typeName;
860
+            $msg = "Mapping not defined for " . $typeName;
861 861
             throw new \InvalidArgumentException($msg);
862 862
         }
863 863
         $metaReturn = $this->OdataEntityMap[$typeName];
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -674,6 +674,7 @@
 block discarded – undo
674 674
      *                                               True if response needs to be
675 675
      *                                               serialized, False otherwise
676 676
      * @param bool         $needToSerializeResponse
677
+     * @param QueryResult $entryObject
677 678
      *
678 679
      * @return string|null The ETag for the entry object if it has eTag properties
679 680
      *                     NULL otherwise
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializerBase.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -469,7 +469,7 @@
 block discarded – undo
469 469
                     ODataConstants::HTTPQUERY_STRING_ORDERBY,
470 470
                     ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
471 471
                     ODataConstants::HTTPQUERY_STRING_SELECT
472
-                 ] as $queryOption) {
472
+                    ] as $queryOption) {
473 473
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
474 474
             if (!is_null($value)) {
475 475
                 if (!is_null($queryParameterString)) {
Please login to merge, or discard this patch.
src/POData/ObjectModel/IObjectSerialiser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return ODataFeed
32 32
      */
33
-    public function writeTopLevelElements(QueryResult &$entryObjects);
33
+    public function writeTopLevelElements(QueryResult & $entryObjects);
34 34
 
35 35
     /**
36 36
      * Write top level url element.
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @return ODataPropertyContent
62 62
      */
63
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType);
63
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType);
64 64
 
65 65
     /**
66 66
      * Write top level bag resource.
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return ODataPropertyContent
73 73
      */
74
-    public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType);
74
+    public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType);
75 75
 
76 76
     /**
77 77
      * Write top level primitive value.
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return ODataPropertyContent
83 83
      */
84
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null);
84
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null);
85 85
 
86 86
     /**
87 87
      * Gets reference to the request submitted by client.
Please login to merge, or discard this patch.
src/POData/Providers/ProvidersWrapper.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
      * @param InternalOrderByInfo   $orderBy     The orderBy information
630 630
      * @param int                   $top         The top count
631 631
      * @param int                   $skip        The skip count
632
-     * @param InternalSkipTokenInfo $skipToken   The skip token
632
+     * @param SkipTokenInfo $skipToken   The skip token
633 633
      *
634 634
      * @return QueryResult
635 635
      */
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 
833 833
     /**
834 834
      * @param ResourceSet $resourceSet          The entity set containing the entity to fetch
835
-     * @param object      $sourceEntityInstance The source entity instance
835
+     * @param KeyDescriptor      $sourceEntityInstance The source entity instance
836 836
      * @param object      $data                 The New data for the entity instance.
837 837
      *
838 838
      * returns object|null returns the newly created model if successful, or null if model creation failed.
Please login to merge, or discard this patch.
src/POData/UriProcessor/UriProcessor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      */
186 186
     protected function executePut()
187 187
     {
188
-        $this->executeBase(function ($uriProcessor, $segment) {
188
+        $this->executeBase(function($uriProcessor, $segment) {
189 189
             $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod();
190 190
             $resourceSet = $segment->getTargetResourceSetWrapper();
191 191
             $keyDescriptor = $segment->getKeyDescriptor();
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     protected function executeDelete()
220 220
     {
221
-        $this->executeBase(function ($uriProcessor, $segment) {
221
+        $this->executeBase(function($uriProcessor, $segment) {
222 222
             $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod();
223 223
             $resourceSet = $segment->getTargetResourceSetWrapper();
224 224
             $keyDescriptor = $segment->getKeyDescriptor();
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                     //TODO: why are these null?  see #98
388 388
                     null, // $orderby
389 389
                     null, // $top
390
-                    null,  // $skip
390
+                    null, // $skip
391 391
                     $skipToken
392 392
                 );
393 393
 
Please login to merge, or discard this patch.
src/POData/UriProcessor/UriProcessorNew.php 2 patches
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -7,16 +7,11 @@
 block discarded – undo
7 7
 use POData\Common\ODataException;
8 8
 use POData\IService;
9 9
 use POData\OperationContext\HTTPRequestMethod;
10
-use POData\Providers\Metadata\ResourcePropertyKind;
11 10
 use POData\Providers\ProvidersWrapper;
12
-use POData\Providers\Query\QueryResult;
13
-use POData\Providers\Query\QueryType;
14 11
 use POData\UriProcessor\Interfaces\IUriProcessor;
15
-use POData\UriProcessor\QueryProcessor\QueryProcessor;
16 12
 use POData\UriProcessor\ResourcePathProcessor\ResourcePathProcessor;
17 13
 use POData\UriProcessor\ResourcePathProcessor\SegmentParser\SegmentDescriptor;
18 14
 use POData\UriProcessor\ResourcePathProcessor\SegmentParser\TargetKind;
19
-use POData\UriProcessor\ResourcePathProcessor\SegmentParser\TargetSource;
20 15
 
21 16
 /**
22 17
  * Class UriProcessorNew.
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     /**
298 298
      * @param $resourceSet
299 299
      * @param $keyDescriptor
300
-     * @param $requestMethod
300
+     * @param HTTPRequestMethod $requestMethod
301 301
      * @throws ODataException
302 302
      */
303 303
     protected function checkUriValidForSuppliedVerb($resourceSet, $keyDescriptor, $requestMethod)
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     }
312 312
 
313 313
     /**
314
-     * @param $segment
314
+     * @param SegmentDescriptor $segment
315 315
      */
316 316
     private function executeGetSingleton($segment)
317 317
     {
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     }
322 322
 
323 323
     /**
324
-     * @param $segment
324
+     * @param SegmentDescriptor $segment
325 325
      */
326 326
     private function executeGetResource($segment)
327 327
     {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     }
350 350
 
351 351
     /**
352
-     * @param $segment
352
+     * @param SegmentDescriptor $segment
353 353
      */
354 354
     private function executeGetLink($segment)
355 355
     {
Please login to merge, or discard this patch.