@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $dataProvider = $this->parseDataProvider($xmlDataProvider); |
26 | 26 | |
27 | 27 | foreach ($xmlDataProvider->DataElement as $element) { |
28 | - $fieldName = (string)$element->attributes()['name']; |
|
28 | + $fieldName = (string) $element->attributes()['name']; |
|
29 | 29 | |
30 | 30 | if (isset($this->mergedXml[$dataProvider][$fieldName])) { |
31 | 31 | $this->mergedXml[$dataProvider][$fieldName] = array_merge( |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | private function parseDataProvider(\SimpleXMLElement $xmlDataProvider): string |
58 | 58 | { |
59 | - $dataProvider = (string)$xmlDataProvider->attributes()['name']; |
|
59 | + $dataProvider = (string) $xmlDataProvider->attributes()['name']; |
|
60 | 60 | if (!isset($this->mergedXml[$dataProvider])) { |
61 | 61 | $this->mergedXml[$dataProvider] = []; |
62 | 62 | } |
@@ -71,20 +71,20 @@ discard block |
||
71 | 71 | */ |
72 | 72 | private function getElementData(\SimpleXMLElement $element): array |
73 | 73 | { |
74 | - $type = (string)$element->attributes()['type']; |
|
74 | + $type = (string) $element->attributes()['type']; |
|
75 | 75 | |
76 | 76 | $data = [ |
77 | - 'name' => (string)$element->attributes()['name'], |
|
78 | - 'allownull' => (bool)$element->attributes()['allownull'], |
|
79 | - 'default' => (string)$element->attributes()['default'], |
|
77 | + 'name' => (string) $element->attributes()['name'], |
|
78 | + 'allownull' => (bool) $element->attributes()['allownull'], |
|
79 | + 'default' => (string) $element->attributes()['default'], |
|
80 | 80 | 'type' => $this->getVariableType($type), |
81 | 81 | 'is_collection' => $this->isCollection($type), |
82 | 82 | 'is_dataprovider' => $this->isDataProvider($type) |
83 | 83 | ]; |
84 | 84 | |
85 | - $singleton = (string)$element->attributes()['singleton']; |
|
85 | + $singleton = (string) $element->attributes()['singleton']; |
|
86 | 86 | if ($singleton !== '') { |
87 | - $data['singleton'] = (string)$element->attributes()['singleton']; |
|
87 | + $data['singleton'] = (string) $element->attributes()['singleton']; |
|
88 | 88 | $data['singleton_type'] = $this->getSingleVariableType($type); |
89 | 89 | } |
90 | 90 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | foreach ($this->parser->getDataProvider() as $providerName => $providerElements) { |
64 | 64 | $namespace = new PhpNamespace($this->namespace); |
65 | 65 | $dataProvider = $this->createDataProviderClass($providerName, $providerElements, $namespace); |
66 | - $classContent = (string)$namespace; |
|
66 | + $classContent = (string) $namespace; |
|
67 | 67 | $classContent = str_replace('\?', '?', $classContent); |
68 | 68 | $classContent = Helpers::tabsToSpaces($classContent, 4); |
69 | 69 | $this->fileWriter->writeToFile($dataProvider->getName() . '.php', $classContent); |