@@ -209,7 +209,7 @@ |
||
209 | 209 | { |
210 | 210 | return preg_replace_callback( |
211 | 211 | '@\_([a-z]{1,1})@', |
212 | - function ($matches) { |
|
212 | + function($matches) { |
|
213 | 213 | return strtoupper($matches[1] ?? ''); |
214 | 214 | }, |
215 | 215 | $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( |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | */ |
58 | 58 | private function parseDataProvider(\SimpleXMLElement $xmlDataProvider): string |
59 | 59 | { |
60 | - $dataProvider = (string)$xmlDataProvider->attributes()['name']; |
|
60 | + $dataProvider = (string) $xmlDataProvider->attributes()['name']; |
|
61 | 61 | if (!isset($this->mergedXml[$dataProvider])) { |
62 | 62 | $this->mergedXml[$dataProvider] = [ |
63 | 63 | 'configs' => [ |
64 | - 'convertUnderlines' => (bool)$xmlDataProvider->attributes()['ConvertUnderlines'] ?? false, |
|
65 | - 'deprecated' => (bool)$xmlDataProvider->attributes()['deprecated'] ?? false |
|
64 | + 'convertUnderlines' => (bool) $xmlDataProvider->attributes()['ConvertUnderlines'] ?? false, |
|
65 | + 'deprecated' => (bool) $xmlDataProvider->attributes()['deprecated'] ?? false |
|
66 | 66 | ], |
67 | 67 | 'elements' => [] |
68 | 68 | ]; |
@@ -78,21 +78,21 @@ discard block |
||
78 | 78 | */ |
79 | 79 | private function getElementData(\SimpleXMLElement $element, array $dataProvider): array |
80 | 80 | { |
81 | - $type = (string)$element->attributes()['type']; |
|
81 | + $type = (string) $element->attributes()['type']; |
|
82 | 82 | |
83 | 83 | $data = [ |
84 | - 'name' => (string)$element->attributes()['name'], |
|
85 | - 'allownull' => (bool)$element->attributes()['allownull'], |
|
86 | - 'default' => (string)$element->attributes()['default'], |
|
84 | + 'name' => (string) $element->attributes()['name'], |
|
85 | + 'allownull' => (bool) $element->attributes()['allownull'], |
|
86 | + 'default' => (string) $element->attributes()['default'], |
|
87 | 87 | 'type' => $this->getVariableType($type), |
88 | 88 | 'is_collection' => $this->isCollection($type), |
89 | 89 | 'is_dataprovider' => $this->isDataProvider($type), |
90 | 90 | 'isCamelCase' => $dataProvider['configs']['convertUnderlines'] |
91 | 91 | ]; |
92 | 92 | |
93 | - $singleton = (string)$element->attributes()['singleton']; |
|
93 | + $singleton = (string) $element->attributes()['singleton']; |
|
94 | 94 | if ($singleton !== '') { |
95 | - $data['singleton'] = (string)$element->attributes()['singleton']; |
|
95 | + $data['singleton'] = (string) $element->attributes()['singleton']; |
|
96 | 96 | $data['singleton_type'] = $this->getSingleVariableType($type); |
97 | 97 | } |
98 | 98 |