@@ -467,20 +467,20 @@ |
||
| 467 | 467 | $pArray = []; |
| 468 | 468 | foreach ($this->getProperty() as $prop) { |
| 469 | 469 | if (in_array($prop->getName(), $pArray)) { |
| 470 | - $msg = "Property Names, and Navigation Property Must Be Unique " . __CLASS__; |
|
| 470 | + $msg = "Property Names, and Navigation Property Must Be Unique ".__CLASS__; |
|
| 471 | 471 | return false; |
| 472 | 472 | } |
| 473 | 473 | $pArray[] = $prop->getName(); |
| 474 | 474 | } |
| 475 | 475 | foreach ($this->getNavigationProperty() as $prop) { |
| 476 | 476 | if (in_array($prop->getName(), $pArray)) { |
| 477 | - $msg = "Property Names, and Navigation Property Must Be Unique " . __CLASS__; |
|
| 477 | + $msg = "Property Names, and Navigation Property Must Be Unique ".__CLASS__; |
|
| 478 | 478 | return false; |
| 479 | 479 | } |
| 480 | 480 | $pArray[] = $prop->getName(); |
| 481 | 481 | } |
| 482 | 482 | if (in_array($this->getName(), $pArray)) { |
| 483 | - $msg = "entity types can not contain a property with the same name " . __CLASS__; |
|
| 483 | + $msg = "entity types can not contain a property with the same name ".__CLASS__; |
|
| 484 | 484 | return false; |
| 485 | 485 | } |
| 486 | 486 | return true; |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $regex = "/[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}(\.[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}){0,}/"; |
| 14 | 14 | |
| 15 | 15 | if (!is_string($string)) { |
| 16 | - $msg = "Input must be a string: ". get_class($this); |
|
| 16 | + $msg = "Input must be a string: ".get_class($this); |
|
| 17 | 17 | throw new \InvalidArgumentException($msg); |
| 18 | 18 | } |
| 19 | 19 | if ($this->isEDMSimpleTypeValid($string)) { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $regex = "/Collection\([^ \t]{1,}(\.[^ \t]{1,}){0,}\)/"; |
| 18 | 18 | |
| 19 | 19 | if (!is_string($string)) { |
| 20 | - $msg = "Input must be a string: ". get_class($this); |
|
| 20 | + $msg = "Input must be a string: ".get_class($this); |
|
| 21 | 21 | throw new \InvalidArgumentException($msg); |
| 22 | 22 | } |
| 23 | 23 | if ($this->isEDMSimpleTypeValid($string)) { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $regex = '/[^ \t]{1,}(\.[^ \t]{1,}){0,}/'; |
| 18 | 18 | |
| 19 | 19 | if (!is_string($string)) { |
| 20 | - $msg = "Input must be a string: ". get_class($this); |
|
| 20 | + $msg = "Input must be a string: ".get_class($this); |
|
| 21 | 21 | throw new \InvalidArgumentException($msg); |
| 22 | 22 | } |
| 23 | 23 | if ($this->isTQualifiedNameValid($string)) { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $regex = '/(Collection|Ref)\([^ \t]{1,}(\.[^ \t]{1,}){0,}\/)'; |
| 18 | 18 | |
| 19 | 19 | if (!is_string($string)) { |
| 20 | - $msg = "Input must be a string: ". get_class($this); |
|
| 20 | + $msg = "Input must be a string: ".get_class($this); |
|
| 21 | 21 | throw new \InvalidArgumentException($msg); |
| 22 | 22 | } |
| 23 | 23 | if ($this->isTQualifiedNameValid($string)) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | public function setName($name) |
| 83 | 83 | { |
| 84 | 84 | if (!$this->isTSimpleIdentifierValid($name)) { |
| 85 | - $msg = "Name(" . $name . ") must be a valid TSimpleIdentifier"; |
|
| 85 | + $msg = "Name(".$name.") must be a valid TSimpleIdentifier"; |
|
| 86 | 86 | throw new \InvalidArgumentException($msg); |
| 87 | 87 | } |
| 88 | 88 | $this->name = $name; |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | public function isOK(&$msg = null) |
| 398 | 398 | { |
| 399 | 399 | if (!$this->isTSimpleIdentifierValid($this->name)) { |
| 400 | - $msg = "Name(" . $this->name . ") must be a valid TSimpleIdentifier " . __FILE__ . ":" . __LINE__; |
|
| 400 | + $msg = "Name(".$this->name.") must be a valid TSimpleIdentifier ".__FILE__.":".__LINE__; |
|
| 401 | 401 | return false; |
| 402 | 402 | } |
| 403 | 403 | |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | } |
| 451 | 451 | foreach ($this->associationSet as $assocationSet) { |
| 452 | 452 | if (!in_array($assocationSet->getEnd()[0]->getEntitySet(), $entityNames)) { |
| 453 | - $msg = "The entitysets for assocations must have a valid entity set. " . $assocationSet->getName() . " Does not"; |
|
| 453 | + $msg = "The entitysets for assocations must have a valid entity set. ".$assocationSet->getName()." Does not"; |
|
| 454 | 454 | return false; |
| 455 | 455 | } |
| 456 | 456 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | die($this->getNamespace()); |
| 150 | 150 | return false; |
| 151 | 151 | }*/ |
| 152 | - $eSetType = str_replace($this->getNamespace() . ".", "", $eSetType); |
|
| 152 | + $eSetType = str_replace($this->getNamespace().".", "", $eSetType); |
|
| 153 | 153 | if (!in_array($eSetType, $entityTypeNames)) { |
| 154 | 154 | $msg = "entitySet Types should have a matching type name in entity Types"; |
| 155 | 155 | return false; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | // Check Associations to associationSets |
| 160 | 160 | if (count($associationSets) != count($associationNames)) { |
| 161 | - $msg = "we have " . count($associationSets) . "association sets and " . count($associationNames) |
|
| 161 | + $msg = "we have ".count($associationSets)."association sets and ".count($associationNames) |
|
| 162 | 162 | . " associations, they should be the same"; |
| 163 | 163 | } |
| 164 | 164 | if (count($associationNames) * 2 < count($navigationProperties)) { |
@@ -167,33 +167,33 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | foreach ($associationNames as $associationName => $associationEnds) { |
| 169 | 169 | if (!array_key_exists($associationName, $associationSets)) { |
| 170 | - $msg = "association " . $associationName . " exists without matching associationSet"; |
|
| 170 | + $msg = "association ".$associationName." exists without matching associationSet"; |
|
| 171 | 171 | return false; |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | if (!array_key_exists($associationName, $navigationProperties)) { |
| 175 | - $msg = "association " . $associationName . " exists without matching Natvigation Property"; |
|
| 175 | + $msg = "association ".$associationName." exists without matching Natvigation Property"; |
|
| 176 | 176 | return false; |
| 177 | 177 | } |
| 178 | 178 | $roles = [$associationEnds[0]->getRole(), $associationEnds[1]->getRole()]; |
| 179 | 179 | if (!in_array($associationSets[$associationName][0]->getRole(), $roles)) { |
| 180 | - $msg = "association Set role " . $associationSets[$associationName][0]->getRole() |
|
| 180 | + $msg = "association Set role ".$associationSets[$associationName][0]->getRole() |
|
| 181 | 181 | . "lacks a matching property in the attached association"; |
| 182 | 182 | return false; |
| 183 | 183 | } |
| 184 | 184 | if (!in_array($associationSets[$associationName][1]->getRole(), $roles)) { |
| 185 | - $msg = "association Set role " . $associationSets[$associationName][1]->getRole() |
|
| 185 | + $msg = "association Set role ".$associationSets[$associationName][1]->getRole() |
|
| 186 | 186 | . "lacks a matching property in the attached association"; |
| 187 | 187 | return false; |
| 188 | 188 | } |
| 189 | 189 | foreach ($navigationProperties[$associationName] as $navProp) { |
| 190 | 190 | if (!in_array($navProp->getToRole(), $roles)) { |
| 191 | - $msg = "Navigation Property Role " . $navProp->getToRole() |
|
| 191 | + $msg = "Navigation Property Role ".$navProp->getToRole() |
|
| 192 | 192 | . " lacks a matching Property in the assocation"; |
| 193 | 193 | return false; |
| 194 | 194 | } |
| 195 | 195 | if (!in_array($navProp->getFromRole(), $roles)) { |
| 196 | - $msg = "Navigation Property Role " .$navProp->getToRole() |
|
| 196 | + $msg = "Navigation Property Role ".$navProp->getToRole() |
|
| 197 | 197 | . " lacks a matching Property in the assocation"; |
| 198 | 198 | return false; |
| 199 | 199 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $edmx = new Edmx(); |
| 27 | 27 | $this->assertTrue($edmx->isOK($msg), $msg); |
| 28 | 28 | $this->assertNull($msg); |
| 29 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 29 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 30 | 30 | $serializer = |
| 31 | 31 | \JMS\Serializer\SerializerBuilder::create() |
| 32 | 32 | ->addMetadataDir($ymlDir) |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $ds = DIRECTORY_SEPARATOR; |
| 41 | 41 | |
| 42 | - $goodxsd = dirname(__DIR__) . $ds . "xsd" . $ds . "Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd"; |
|
| 42 | + $goodxsd = dirname(__DIR__).$ds."xsd".$ds."Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd"; |
|
| 43 | 43 | if (!file_exists($goodxsd)) { |
| 44 | 44 | return true; |
| 45 | 45 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | private function checkEdmxSerialiseDeserialiseRoundTrip($ds, $edmx, $msg) |
| 67 | 67 | { |
| 68 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 68 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 69 | 69 | $serializer = |
| 70 | 70 | \JMS\Serializer\SerializerBuilder::create() |
| 71 | 71 | ->addMetadataDir($ymlDir) |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $this->assertNull($msg); |
| 113 | 113 | |
| 114 | 114 | |
| 115 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 115 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 116 | 116 | $serializer = |
| 117 | 117 | \JMS\Serializer\SerializerBuilder::create() |
| 118 | 118 | ->addMetadataDir($ymlDir) |
@@ -144,10 +144,10 @@ discard block |
||
| 144 | 144 | $ds = DIRECTORY_SEPARATOR; |
| 145 | 145 | $msg = null; |
| 146 | 146 | |
| 147 | - $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceDocument.xml"; |
|
| 147 | + $docLocation = dirname(__DIR__).$ds."tests".$ds."exampleV3ServiceDocument.xml"; |
|
| 148 | 148 | $document = file_get_contents($docLocation); |
| 149 | 149 | $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\TDataServicesType'; |
| 150 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 150 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 151 | 151 | |
| 152 | 152 | $serializer = |
| 153 | 153 | \JMS\Serializer\SerializerBuilder::create() |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | $ds = DIRECTORY_SEPARATOR; |
| 165 | 165 | $msg = null; |
| 166 | 166 | |
| 167 | - $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceMetadata.xml"; |
|
| 167 | + $docLocation = dirname(__DIR__).$ds."tests".$ds."exampleV3ServiceMetadata.xml"; |
|
| 168 | 168 | $document = file_get_contents($docLocation); |
| 169 | 169 | $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx'; |
| 170 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 170 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 171 | 171 | |
| 172 | 172 | $serializer = |
| 173 | 173 | \JMS\Serializer\SerializerBuilder::create() |
@@ -185,11 +185,11 @@ discard block |
||
| 185 | 185 | $ds = DIRECTORY_SEPARATOR; |
| 186 | 186 | $msg = null; |
| 187 | 187 | |
| 188 | - $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceMetadata.xml"; |
|
| 188 | + $docLocation = dirname(__DIR__).$ds."tests".$ds."exampleV3ServiceMetadata.xml"; |
|
| 189 | 189 | $document = file_get_contents($docLocation); |
| 190 | 190 | $this->v3MetadataAgainstXSD($document); |
| 191 | 191 | $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx'; |
| 192 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 192 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 193 | 193 | |
| 194 | 194 | $serializer = |
| 195 | 195 | \JMS\Serializer\SerializerBuilder::create() |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $this->assertNull($msg); |
| 231 | 231 | |
| 232 | 232 | |
| 233 | - $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata"; |
|
| 233 | + $ymlDir = dirname(__DIR__).$ds."src".$ds."MetadataV3".$ds."JMSmetadata"; |
|
| 234 | 234 | $serializer = |
| 235 | 235 | \JMS\Serializer\SerializerBuilder::create() |
| 236 | 236 | ->addMetadataDir($ymlDir) |