Completed
Push — master ( 55beca...b509a7 )
by Bálint
03:58
created
POData/UriProcessor/QueryProcessor/OrderByParser/InternalOrderByInfo.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,9 @@
 block discarded – undo
38 38
      *                                                     (if any) and orderby path
39 39
      *                                                     if IDSQP implementation wants to perform sorting.
40 40
      *
41
-     * @param AnonymousFunction[] $subSorterFunctions Collection of sub sorter functions corresponding to each orderby path segment
42 41
      *
43 42
      *
44 43
      *
45
-     * @param AnonymousFunction        $sorterFunction     The top level anonymous sorter function.
46 44
      *
47 45
      * @param mixed                    $dummyObject        A dummy object of type
48 46
      *                                                     of the resource set
Please login to merge, or discard this patch.
src/POData/Writers/Json/JsonODataV2Writer.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 * Determines if the given writer is capable of writing the response or not
37 37
 	 * @param Version $responseVersion the OData version of the response
38 38
 	 * @param string $contentType the Content Type of the response
39
-	 * @return boolean true if the writer can handle the response, false otherwise
39
+	 * @return boolean|null true if the writer can handle the response, false otherwise
40 40
 	 */
41 41
 	public function canHandle(Version $responseVersion, $contentType)
42 42
 	{
Please login to merge, or discard this patch.
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -18,39 +18,39 @@
 block discarded – undo
18 18
  */
19 19
 class JsonODataV2Writer extends JsonODataV1Writer
20 20
 {
21
-	//The key difference between 1 and 2 is that in 2 collection results
22
-	//are wrapped in a "result" array.  this is to allow a place for collection metadata to be placed
23
-	//
24
-	//IE {d : [ item1, item2, item3] }
25
-	//is now { d : { results :[item1, item2, item3], meta1 : x, meta2 : y }
26
-	//So we override the collection methods to shove this stuff in there
27
-
28
-	protected $dataArrayName = ODataConstants::JSON_RESULT_NAME;
29
-
30
-	protected $rowCountName = ODataConstants::JSON_ROWCOUNT_STRING;
31
-
32
-	protected $nextLinkName = ODataConstants::JSON_NEXT_STRING;
33
-
34
-
35
-	/**
36
-	 * Determines if the given writer is capable of writing the response or not
37
-	 * @param Version $responseVersion the OData version of the response
38
-	 * @param string $contentType the Content Type of the response
39
-	 * @return boolean true if the writer can handle the response, false otherwise
40
-	 */
41
-	public function canHandle(Version $responseVersion, $contentType)
42
-	{
43
-		$parts = explode(";", $contentType);
44
-
45
-		//special case, in v3 verbose is the v2 writer
46
-		if($responseVersion == Version::v3()){
47
-			return in_array(MimeTypes::MIME_APPLICATION_JSON, $parts) && (in_array('odata=verbose', $parts) || in_array('odata=minimal', $parts));
48
-		}
49
-
50
-		if($responseVersion != Version::v2()){
51
-			return false;
52
-		}
53
-	}
21
+    //The key difference between 1 and 2 is that in 2 collection results
22
+    //are wrapped in a "result" array.  this is to allow a place for collection metadata to be placed
23
+    //
24
+    //IE {d : [ item1, item2, item3] }
25
+    //is now { d : { results :[item1, item2, item3], meta1 : x, meta2 : y }
26
+    //So we override the collection methods to shove this stuff in there
27
+
28
+    protected $dataArrayName = ODataConstants::JSON_RESULT_NAME;
29
+
30
+    protected $rowCountName = ODataConstants::JSON_ROWCOUNT_STRING;
31
+
32
+    protected $nextLinkName = ODataConstants::JSON_NEXT_STRING;
33
+
34
+
35
+    /**
36
+     * Determines if the given writer is capable of writing the response or not
37
+     * @param Version $responseVersion the OData version of the response
38
+     * @param string $contentType the Content Type of the response
39
+     * @return boolean true if the writer can handle the response, false otherwise
40
+     */
41
+    public function canHandle(Version $responseVersion, $contentType)
42
+    {
43
+        $parts = explode(";", $contentType);
44
+
45
+        //special case, in v3 verbose is the v2 writer
46
+        if($responseVersion == Version::v3()){
47
+            return in_array(MimeTypes::MIME_APPLICATION_JSON, $parts) && (in_array('odata=verbose', $parts) || in_array('odata=minimal', $parts));
48
+        }
49
+
50
+        if($responseVersion != Version::v2()){
51
+            return false;
52
+        }
53
+    }
54 54
 
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
 		$parts = explode(";", $contentType);
44 44
 
45 45
 		//special case, in v3 verbose is the v2 writer
46
-		if($responseVersion == Version::v3()){
46
+		if ($responseVersion == Version::v3()) {
47 47
 			return in_array(MimeTypes::MIME_APPLICATION_JSON, $parts) && (in_array('odata=verbose', $parts) || in_array('odata=minimal', $parts));
48 48
 		}
49 49
 
50
-		if($responseVersion != Version::v2()){
50
+		if ($responseVersion != Version::v2()) {
51 51
 			return false;
52 52
 		}
53 53
 	}
Please login to merge, or discard this patch.
POData/UriProcessor/QueryProcessor/ExpressionParser/ExpressionParser.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -690,37 +690,37 @@
 block discarded – undo
690 690
 
691 691
         $null = new NullType();
692 692
         if ($left->typeIs($null) || $right->typeIs($null)) {
693
-          // If the end user is responsible for implementing IExpressionProvider
694
-          // then the sub-tree for a nullability check would be:
695
-          //
696
-          //          RelationalExpression(EQ/NE)
697
-          //                    |
698
-          //               ------------
699
-          //               |           |
700
-          //               |           |
701
-          //            CustomerID    NULL
702
-          //
703
-          // Otherwise (In case of default PHPExpressionProvider):
704
-          //
705
-          //  CustomerID eq null
706
-          //  ==================
707
-          //
708
-          //              FunctionCallExpression(is_null)
709
-          //                       |
710
-          //                       |- Signature => bool (typeof(CustomerID))
711
-          //                       |- args => {CustomerID}
712
-          //
713
-          //
714
-          //  CustomerID ne null
715
-          //  ==================
716
-          //
717
-          //              UnaryExpression (not)
718
-          //                       |
719
-          //              FunctionCallExpression(is_null)
720
-          //                       |
721
-          //                       |- Signature => bool (typeof(CustomerID))
722
-          //                       |- args => {CustomerID}
723
-          //
693
+            // If the end user is responsible for implementing IExpressionProvider
694
+            // then the sub-tree for a nullability check would be:
695
+            //
696
+            //          RelationalExpression(EQ/NE)
697
+            //                    |
698
+            //               ------------
699
+            //               |           |
700
+            //               |           |
701
+            //            CustomerID    NULL
702
+            //
703
+            // Otherwise (In case of default PHPExpressionProvider):
704
+            //
705
+            //  CustomerID eq null
706
+            //  ==================
707
+            //
708
+            //              FunctionCallExpression(is_null)
709
+            //                       |
710
+            //                       |- Signature => bool (typeof(CustomerID))
711
+            //                       |- args => {CustomerID}
712
+            //
713
+            //
714
+            //  CustomerID ne null
715
+            //  ==================
716
+            //
717
+            //              UnaryExpression (not)
718
+            //                       |
719
+            //              FunctionCallExpression(is_null)
720
+            //                       |
721
+            //                       |- Signature => bool (typeof(CustomerID))
722
+            //                       |- args => {CustomerID}
723
+            //
724 724
             if ($isPHPExpressionProvider) {
725 725
                 $arg = $left->typeIs($null) ? $right : $left;
726 726
                 $isNullFunctionDescription = new FunctionDescription('is_null', new Boolean(), array($arg->getType()));
Please login to merge, or discard this patch.