Completed
Pull Request — master (#96)
by Alex
04:26
created
src/MetadataV3/edm/IsOKTraits/TPathTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@
 block discarded – undo
8 8
 {
9 9
     use xsdRestrictions;
10 10
 
11
+    /**
12
+     * @param string $string
13
+     */
11 14
     public function isTPathValid($string)
12 15
     {
13 16
         // The below pattern represents the allowed identifiers in ECMA specification plus the '/' for path segment
Please login to merge, or discard this patch.
tests/MetadataManagerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $ds = DIRECTORY_SEPARATOR;
31 31
 
32
-        $goodxsd = dirname(__DIR__) . $ds . "xsd" . $ds . "Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd";
32
+        $goodxsd = dirname(__DIR__).$ds."xsd".$ds."Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd";
33 33
         if (!file_exists($goodxsd)) {
34 34
             return true;
35 35
         }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $metadataManager = new MetadataManager();
44 44
 
45 45
         $eType = $metadataManager->addEntityType("Category");
46
-        $this->assertNotFalse($eType, "Etype is false not type " . $metadataManager->getLastError());
46
+        $this->assertNotFalse($eType, "Etype is false not type ".$metadataManager->getLastError());
47 47
         $metadataManager->addPropertyToEntityType($eType, "CategoryID", "Int32", null, false, true, "Identity");
48 48
         $metadataManager->addPropertyToEntityType($eType, "CategoryName", "String");
49 49
         $metadataManager->addPropertyToEntityType($eType, "Description", "String");
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $metadataManager = new MetadataManager();
70 70
 
71 71
         $CategoryType = $metadataManager->addEntityType("Category");
72
-        $this->assertNotFalse($CategoryType, "Etype is false not type " . $metadataManager->getLastError());
72
+        $this->assertNotFalse($CategoryType, "Etype is false not type ".$metadataManager->getLastError());
73 73
         $metadataManager->addPropertyToEntityType($CategoryType, "CategoryID", "Int32", null, false, true, "Identity");
74 74
         $metadataManager->addPropertyToEntityType($CategoryType, "CategoryName", "String");
75 75
         $metadataManager->addPropertyToEntityType($CategoryType, "Description", "String");
Please login to merge, or discard this patch.
tests/TSchemaTypeTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         for ($i = 0; $i < 100; $i++) {
32 32
             $actualMax = max($type->getRand(), $actualMax);
33 33
         }
34
-        $this->assertTrue($expectedMax >= $actualMax, $actualMax . " must be less than ".$expectedMax);
34
+        $this->assertTrue($expectedMax >= $actualMax, $actualMax." must be less than ".$expectedMax);
35 35
     }
36 36
 
37 37
     public function testGetRandMinimum()
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
         for ($i = 0; $i < 100; $i++) {
43 43
             $actualMin = min($type->getRand(), $actualMin);
44 44
         }
45
-        $this->assertTrue($expectedMin <= $actualMin, $actualMin . " must be less than ".$expectedMin);
45
+        $this->assertTrue($expectedMin <= $actualMin, $actualMin." must be less than ".$expectedMin);
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
tests/EdmxTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         $edmx = new Edmx();
24 24
         $this->assertTrue($edmx->isOK($msg), $msg);
25 25
         $this->assertNull($msg);
26
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
26
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
27 27
         $serializer =
28 28
             \JMS\Serializer\SerializerBuilder::create()
29 29
                 ->addMetadataDir($ymlDir)
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $ds = DIRECTORY_SEPARATOR;
38 38
 
39
-        $goodxsd = dirname(__DIR__) . $ds . "xsd" . $ds . "Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd";
39
+        $goodxsd = dirname(__DIR__).$ds."xsd".$ds."Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd";
40 40
         if (!file_exists($goodxsd)) {
41 41
             return true;
42 42
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     private function checkEdmxSerialiseDeserialiseRoundTrip($ds, $edmx, $msg)
64 64
     {
65
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
65
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
66 66
         $serializer =
67 67
             \JMS\Serializer\SerializerBuilder::create()
68 68
                 ->addMetadataDir($ymlDir)
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $this->assertNull($msg);
110 110
 
111 111
 
112
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
112
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
113 113
         $serializer =
114 114
             \JMS\Serializer\SerializerBuilder::create()
115 115
                 ->addMetadataDir($ymlDir)
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
         $ds = DIRECTORY_SEPARATOR;
142 142
         $msg = null;
143 143
 
144
-        $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceDocument.xml";
144
+        $docLocation = dirname(__DIR__).$ds."tests".$ds."exampleV3ServiceDocument.xml";
145 145
         $document = file_get_contents($docLocation);
146 146
         $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\TDataServicesType';
147
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
147
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
148 148
 
149 149
         $serializer =
150 150
             \JMS\Serializer\SerializerBuilder::create()
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
         $ds = DIRECTORY_SEPARATOR;
162 162
         $msg = null;
163 163
 
164
-        $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceMetadata.xml";
164
+        $docLocation = dirname(__DIR__).$ds."tests".$ds."exampleV3ServiceMetadata.xml";
165 165
         $document = file_get_contents($docLocation);
166 166
         $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx';
167
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
167
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
168 168
 
169 169
         $serializer =
170 170
             \JMS\Serializer\SerializerBuilder::create()
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
         $ds = DIRECTORY_SEPARATOR;
183 183
         $msg = null;
184 184
 
185
-        $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceMetadata.xml";
185
+        $docLocation = dirname(__DIR__).$ds."tests".$ds."exampleV3ServiceMetadata.xml";
186 186
         $document = file_get_contents($docLocation);
187 187
         $this->v3MetadataAgainstXSD($document);
188 188
         $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx';
189
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
189
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
190 190
 
191 191
         $serializer =
192 192
             \JMS\Serializer\SerializerBuilder::create()
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         $this->assertNull($msg);
228 228
 
229 229
 
230
-        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
230
+        $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata";
231 231
         $serializer =
232 232
             \JMS\Serializer\SerializerBuilder::create()
233 233
                 ->addMetadataDir($ymlDir)
@@ -256,11 +256,11 @@  discard block
 block discarded – undo
256 256
         $last_letter = strtolower($singular[strlen($singular) - 1]);
257 257
         switch ($last_letter) {
258 258
             case 'y':
259
-                return substr($singular, 0, -1) . 'ies';
259
+                return substr($singular, 0, -1).'ies';
260 260
             case 's':
261
-                return $singular . 'es';
261
+                return $singular.'es';
262 262
             default:
263
-                return $singular . 's';
263
+                return $singular.'s';
264 264
         }
265 265
     }
266 266
 
Please login to merge, or discard this patch.