@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | foreach ($this->parser->getDataProvider() as $providerName => $providerData) { |
64 | 64 | $namespace = new PhpNamespace($this->namespace); |
65 | 65 | $dataProvider = $this->createDataProviderClass($providerName, $providerData, $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); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | { |
352 | 352 | return preg_replace_callback( |
353 | 353 | '@\_([a-z]{1,1})@', |
354 | - function ($matches) { |
|
354 | + function($matches) { |
|
355 | 355 | return strtoupper($matches[1] ?? ''); |
356 | 356 | }, |
357 | 357 | $methodName |
@@ -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]['elements'][$fieldName])) { |
31 | 31 | $this->mergedXml[$dataProvider]['elements'][$fieldName] = array_merge( |
@@ -56,12 +56,12 @@ 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 | 'configs' => [ |
63 | - 'convertUnderlines' => (bool)$xmlDataProvider->attributes()['ConvertUnderlines'] ?? false, |
|
64 | - 'deprecated' => (bool)$xmlDataProvider->attributes()['deprecated'] ?? false |
|
63 | + 'convertUnderlines' => (bool) $xmlDataProvider->attributes()['ConvertUnderlines'] ?? false, |
|
64 | + 'deprecated' => (bool) $xmlDataProvider->attributes()['deprecated'] ?? false |
|
65 | 65 | ], |
66 | 66 | 'elements' => [] |
67 | 67 | ]; |
@@ -77,20 +77,20 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function getElementData(\SimpleXMLElement $element): array |
79 | 79 | { |
80 | - $type = (string)$element->attributes()['type']; |
|
80 | + $type = (string) $element->attributes()['type']; |
|
81 | 81 | |
82 | 82 | $data = [ |
83 | - 'name' => (string)$element->attributes()['name'], |
|
84 | - 'allownull' => (bool)$element->attributes()['allownull'], |
|
85 | - 'default' => (string)$element->attributes()['default'], |
|
83 | + 'name' => (string) $element->attributes()['name'], |
|
84 | + 'allownull' => (bool) $element->attributes()['allownull'], |
|
85 | + 'default' => (string) $element->attributes()['default'], |
|
86 | 86 | 'type' => $this->getVariableType($type), |
87 | 87 | 'is_collection' => $this->isCollection($type), |
88 | 88 | 'is_dataprovider' => $this->isDataProvider($type) |
89 | 89 | ]; |
90 | 90 | |
91 | - $singleton = (string)$element->attributes()['singleton']; |
|
91 | + $singleton = (string) $element->attributes()['singleton']; |
|
92 | 92 | if ($singleton !== '') { |
93 | - $data['singleton'] = (string)$element->attributes()['singleton']; |
|
93 | + $data['singleton'] = (string) $element->attributes()['singleton']; |
|
94 | 94 | $data['singleton_type'] = $this->getSingleVariableType($type); |
95 | 95 | } |
96 | 96 |