Completed
Pull Request — master (#63)
by Christopher
16:31
created
src/POData/Providers/Metadata/Type/DateTime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return false;
67 67
         }
68 68
 
69
-        $outValue = "'".$value."'";
69
+        $outValue = "'" . $value . "'";
70 70
 
71 71
         return true;
72 72
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function convertToOData($value)
108 108
     {
109
-        return 'datetime\''.urlencode($value).'\'';
109
+        return 'datetime\'' . urlencode($value) . '\'';
110 110
     }
111 111
 
112 112
     /**
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/Guid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
      */
108 108
     public function convertToOData($value)
109 109
     {
110
-        return 'guid\''.urlencode($value).'\'';
110
+        return 'guid\'' . urlencode($value) . '\'';
111 111
     }
112 112
 
113 113
     /**
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/Int64.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      */
97 97
     public function convertToOData($value)
98 98
     {
99
-        return $value.'L';
99
+        return $value . 'L';
100 100
     }
101 101
 
102 102
     /**
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/Binary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function convertToOData($value)
107 107
     {
108
-        return 'binary\''.bin2hex($value).'\'';
108
+        return 'binary\'' . bin2hex($value) . '\'';
109 109
     }
110 110
 
111 111
     /**
@@ -119,7 +119,7 @@  discard block
 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/Providers/Metadata/Type/Single.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
      */
100 100
     public function convertToOData($value)
101 101
     {
102
-        return $value.'F';
102
+        return $value . 'F';
103 103
     }
104 104
 
105 105
     /**
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/EdmString.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
      */
101 101
     public function convertToOData($value)
102 102
     {
103
-        return '\''.str_replace('%27', "''", urlencode(utf8_encode($value))).'\'';
103
+        return '\'' . str_replace('%27', "''", urlencode(utf8_encode($value))) . '\'';
104 104
     }
105 105
 
106 106
     /**
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/Decimal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      */
78 78
     public function convertToOData($value)
79 79
     {
80
-        return $value.'M';
80
+        return $value . 'M';
81 81
     }
82 82
 
83 83
     /**
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/ResourceAssociationType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     ) {
53 53
         $this->_name = $name;
54 54
         $this->_fullName = !is_null($namespaceName)
55
-                          ? $namespaceName.'.'.$name : $name;
55
+                          ? $namespaceName . '.' . $name : $name;
56 56
         $this->_end1 = $end1;
57 57
         $this->_end2 = $end2;
58 58
     }
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/SimpleMetadataProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
 
168 168
         $targetResourceSet = $targetResourceProperty->getResourceType()->getCustomState();
169 169
         if (is_null($targetResourceSet)) {
170
-            throw new InvalidOperationException('Failed to retrieve the custom state from '.$targetResourceProperty->getResourceType()->getName());
170
+            throw new InvalidOperationException('Failed to retrieve the custom state from ' . $targetResourceProperty->getResourceType()->getName());
171 171
         }
172 172
 
173 173
         //Customer_Orders_Orders, Order_Customer_Customers
174
-        $key = $sourceResourceType->getName().'_'.$targetResourceProperty->getName().'_'.$targetResourceSet->getName();
174
+        $key = $sourceResourceType->getName() . '_' . $targetResourceProperty->getName() . '_' . $targetResourceSet->getName();
175 175
         if (array_key_exists($key, $this->associationSets)) {
176 176
             return $this->associationSets[$key];
177 177
         }
@@ -430,12 +430,12 @@  discard block
 block discarded – undo
430 430
         //Create instance of AssociationSet for this relationship
431 431
         $sourceResourceSet = $resourceType->getCustomState();
432 432
         if (is_null($sourceResourceSet)) {
433
-            throw new InvalidOperationException('Failed to retrieve the custom state from '.$resourceType->getName());
433
+            throw new InvalidOperationException('Failed to retrieve the custom state from ' . $resourceType->getName());
434 434
         }
435 435
 
436 436
         //Customer_Orders_Orders, Order_Customer_Customers
437 437
         //(source type::name _ source property::name _ target set::name)
438
-        $setKey = $resourceType->getName().'_'.$name.'_'.$targetResourceSet->getName();
438
+        $setKey = $resourceType->getName() . '_' . $name . '_' . $targetResourceSet->getName();
439 439
         $set = new ResourceAssociationSet(
440 440
             $setKey,
441 441
             new ResourceAssociationSetEnd($sourceResourceSet, $resourceType, $resourceProperty),
Please login to merge, or discard this patch.