@@ -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,23 +78,23 @@ 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 | $type = ($type !== 'double') ? $type : 'float'; |
| 84 | 84 | |
| 85 | 85 | $data = [ |
| 86 | - 'name' => (string)$element->attributes()['name'], |
|
| 87 | - 'allownull' => (bool)$element->attributes()['allownull'], |
|
| 88 | - 'default' => (string)$element->attributes()['default'], |
|
| 86 | + 'name' => (string) $element->attributes()['name'], |
|
| 87 | + 'allownull' => (bool) $element->attributes()['allownull'], |
|
| 88 | + 'default' => (string) $element->attributes()['default'], |
|
| 89 | 89 | 'type' => $this->getVariableType($type), |
| 90 | 90 | 'is_collection' => $this->isCollection($type), |
| 91 | 91 | 'is_dataprovider' => $this->isDataProvider($type), |
| 92 | 92 | 'isCamelCase' => $dataProvider['configs']['convertUnderlines'] |
| 93 | 93 | ]; |
| 94 | 94 | |
| 95 | - $singleton = (string)$element->attributes()['singleton']; |
|
| 95 | + $singleton = (string) $element->attributes()['singleton']; |
|
| 96 | 96 | if ($singleton !== '') { |
| 97 | - $data['singleton'] = (string)$element->attributes()['singleton']; |
|
| 97 | + $data['singleton'] = (string) $element->attributes()['singleton']; |
|
| 98 | 98 | $data['singleton_type'] = $this->getSingleVariableType($type); |
| 99 | 99 | } |
| 100 | 100 | |