@@ -45,7 +45,7 @@ |
||
45 | 45 | ) { |
46 | 46 | if (!$determinatorColumn instanceof Column) { |
47 | 47 | $determinatorColumn = new Column( |
48 | - (string)$determinatorColumn, |
|
48 | + (string) $determinatorColumn, |
|
49 | 49 | Type::getType('string'), |
50 | 50 | [ |
51 | 51 | 'notnull' => false, |
@@ -114,7 +114,7 @@ |
||
114 | 114 | $determinatorColumnName = $fieldName; |
115 | 115 | |
116 | 116 | if ($choiceYaml['column']) { |
117 | - $determinatorColumnName = (string)$choiceYaml['column']; |
|
117 | + $determinatorColumnName = (string) $choiceYaml['column']; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | foreach ($choiceYaml['choices'] as $determinator => $choiceYaml) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** @var DOMNode $serviceNode */ |
81 | 81 | |
82 | 82 | /** @var string $fieldName */ |
83 | - $fieldName = (string)$serviceNode->attributes->getNamedItem("field")->nodeValue; |
|
83 | + $fieldName = (string) $serviceNode->attributes->getNamedItem("field")->nodeValue; |
|
84 | 84 | |
85 | 85 | $fieldMappings[$fieldName] = $this->readService($serviceNode, $mappingFile); |
86 | 86 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | /** @var DOMNode $choiceNode */ |
90 | 90 | |
91 | 91 | /** @var string $fieldName */ |
92 | - $fieldName = (string)$choiceNode->attributes->getNamedItem("field")->nodeValue; |
|
92 | + $fieldName = (string) $choiceNode->attributes->getNamedItem("field")->nodeValue; |
|
93 | 93 | |
94 | 94 | $fieldMappings[$fieldName] = $this->readChoice($choiceNode, $mappingFile, $fieldName); |
95 | 95 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $column = $defaultColumnName; |
112 | 112 | |
113 | 113 | if (!is_null($choiceNode->attributes->getNamedItem("column"))) { |
114 | - $column = (string)$choiceNode->attributes->getNamedItem("column")->nodeValue; |
|
114 | + $column = (string) $choiceNode->attributes->getNamedItem("column")->nodeValue; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** @var array<MappingInterface> $choiceMappings */ |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | |
130 | 130 | if ($optionNode instanceof DOMNode) { |
131 | 131 | /** @var mixed $nodeName */ |
132 | - $nodeName = $optionNode->namespaceURI . ":" . $optionNode->localName; |
|
132 | + $nodeName = $optionNode->namespaceURI.":".$optionNode->localName; |
|
133 | 133 | |
134 | - if ($nodeName === self::RDM_SCHEMA_URI . ":option") { |
|
134 | + if ($nodeName === self::RDM_SCHEMA_URI.":option") { |
|
135 | 135 | /** @var string $determinator */ |
136 | - $determinator = (string)$optionNode->attributes->getNamedItem("name")->nodeValue; |
|
136 | + $determinator = (string) $optionNode->attributes->getNamedItem("name")->nodeValue; |
|
137 | 137 | |
138 | 138 | /** @var DOMNode $optionMappingNode */ |
139 | 139 | $optionMappingNode = $optionNode->firstChild; |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | $optionMappingNode = $optionMappingNode->nextSibling; |
143 | 143 | } |
144 | 144 | |
145 | - if ($optionMappingNode->nodeName === $optionMappingNode->prefix . ":service") { |
|
145 | + if ($optionMappingNode->nodeName === $optionMappingNode->prefix.":service") { |
|
146 | 146 | $choiceMappings[$determinator] = $this->readService($optionMappingNode, $mappingFile); |
147 | 147 | |
148 | - } elseif ($optionMappingNode->nodeName === $optionMappingNode->prefix . ":choice") { |
|
148 | + } elseif ($optionMappingNode->nodeName === $optionMappingNode->prefix.":choice") { |
|
149 | 149 | $choiceMappings[$determinator] = $this->readChoice($optionMappingNode, $mappingFile, sprintf( |
150 | 150 | "%s_%s", |
151 | 151 | $defaultColumnName, |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | )); |
154 | 154 | } |
155 | 155 | |
156 | - } elseif ($nodeName === self::DOCTRINE_SCHEMA_URI . ":field") { |
|
156 | + } elseif ($nodeName === self::DOCTRINE_SCHEMA_URI.":field") { |
|
157 | 157 | $column = $this->readDoctrineField($optionNode); |
158 | 158 | } |
159 | 159 | } |
@@ -175,10 +175,10 @@ discard block |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | /** @var string $serviceId */ |
178 | - $serviceId = (string)$serviceNode->attributes->getNamedItem("id")->nodeValue; |
|
178 | + $serviceId = (string) $serviceNode->attributes->getNamedItem("id")->nodeValue; |
|
179 | 179 | |
180 | 180 | if (!is_bool($lax)) { |
181 | - $lax = (strtolower((string)$lax) === 'true'); |
|
181 | + $lax = (strtolower((string) $lax) === 'true'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | return new ServiceMapping($serviceId, $lax, sprintf( |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | foreach ($fieldNode->attributes as $key => $attribute) { |
213 | 213 | /** @var DOMAttr $attribute */ |
214 | 214 | |
215 | - $attributeValue = (string)$attribute->nodeValue; |
|
215 | + $attributeValue = (string) $attribute->nodeValue; |
|
216 | 216 | |
217 | 217 | if ($key === 'name') { |
218 | 218 | $columnName = $attributeValue; |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $attributeValue = ($attributeValue === 'false'); |
227 | 227 | } |
228 | 228 | |
229 | - $attributes[$keyMap[$key]] = (string)$attribute->nodeValue; |
|
229 | + $attributes[$keyMap[$key]] = (string) $attribute->nodeValue; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | /** |
46 | 46 | * @param mixed $rdmMapping |
47 | 47 | */ |
48 | - function (&$rdmMapping) use ($mappingFile): void { |
|
48 | + function(&$rdmMapping) use ($mappingFile): void { |
|
49 | 49 | /** @psalm-suppress UnresolvableInclude */ |
50 | 50 | include $mappingFile; |
51 | 51 | } |
@@ -115,7 +115,7 @@ |
||
115 | 115 | $column->type = 'string'; |
116 | 116 | $column->length = 255; |
117 | 117 | $column->unique = false; |
118 | - $column->nullable = (bool)$annotation->nullable; |
|
118 | + $column->nullable = (bool) $annotation->nullable; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | $dbalColumn = new DBALColumn( |
@@ -49,7 +49,7 @@ |
||
49 | 49 | public function shouldReadMappingData() |
50 | 50 | { |
51 | 51 | /** @var string $mappingFilePath */ |
52 | - $mappingFilePath = __DIR__ . "/EntityExample.orm.yml"; |
|
52 | + $mappingFilePath = __DIR__."/EntityExample.orm.yml"; |
|
53 | 53 | |
54 | 54 | $expectedMapping = new EntityMapping(EntityExample::class, [ |
55 | 55 | 'foo' => new ServiceMapping('some_service', false, "in file '{$mappingFilePath}'"), |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $this->mappingDriver = new MappingXmlDriver( |
44 | 44 | $this->fileLocator, |
45 | - realpath(__DIR__ . "/../../../Resources/mapping-schema.v1.xsd") |
|
45 | + realpath(__DIR__."/../../../Resources/mapping-schema.v1.xsd") |
|
46 | 46 | ); |
47 | 47 | } |
48 | 48 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function shouldReadMappingData() |
53 | 53 | { |
54 | 54 | /** @var string $mappingFilePath */ |
55 | - $mappingFilePath = __DIR__ . "/EntityExample.orm.xml"; |
|
55 | + $mappingFilePath = __DIR__."/EntityExample.orm.xml"; |
|
56 | 56 | |
57 | 57 | $expectedMapping = new EntityMapping(EntityExample::class, [ |
58 | 58 | 'foo' => new ServiceMapping('some_service', false, "in file '{$mappingFilePath}'"), |
@@ -70,7 +70,7 @@ |
||
70 | 70 | ]; |
71 | 71 | |
72 | 72 | $this->annotationReader->method('getPropertyAnnotations')->will($this->returnCallback( |
73 | - function (ReflectionProperty $propertyReflection) use ($annotationMap) { |
|
73 | + function(ReflectionProperty $propertyReflection) use ($annotationMap) { |
|
74 | 74 | if (isset($annotationMap[$propertyReflection->getName()])) { |
75 | 75 | return $annotationMap[$propertyReflection->getName()]; |
76 | 76 | } else { |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $GLOBALS['addiks_symfony_rdm_tests_mapping_driver_php_mapping'] = $expectedAnnotations; |
56 | 56 | |
57 | 57 | $this->fileLocator->method('fileExists')->willReturn(true); |
58 | - $this->fileLocator->method('findMappingFile')->willReturn(__DIR__ . "/phpMappingMock.php"); |
|
58 | + $this->fileLocator->method('findMappingFile')->willReturn(__DIR__."/phpMappingMock.php"); |
|
59 | 59 | |
60 | 60 | /** @var EntityMapping $actualAnnotations */ |
61 | 61 | $actualAnnotations = $this->mappingDriver->loadRDMMetadataForClass(EntityExample::class); |