@@ -205,7 +205,7 @@ |
||
| 205 | 205 | */ |
| 206 | 206 | public function toFraction(): string |
| 207 | 207 | { |
| 208 | - return trim(Units::$variable->fraction($this->value) . ' ' . $this->units); |
|
| 208 | + return trim(Units::$variable->fraction($this->value).' '.$this->units); |
|
| 209 | 209 | } |
| 210 | 210 | /** |
| 211 | 211 | * Return the measurement as a fraction, in the given unit of measure |
@@ -127,8 +127,8 @@ |
||
| 127 | 127 | 'units/settings', |
| 128 | 128 | [ |
| 129 | 129 | 'settings' => $this->getSettings(), |
| 130 | - 'unitsClassMap' => $unitsClassMap, |
|
| 131 | - ] |
|
| 130 | + 'unitsClassMap' => $unitsClassMap, |
|
| 131 | + ] |
|
| 132 | 132 | ); |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | Event::on( |
| 72 | 72 | Fields::class, |
| 73 | 73 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 74 | - function (RegisterComponentTypesEvent $event) { |
|
| 74 | + function(RegisterComponentTypesEvent $event) { |
|
| 75 | 75 | $event->types[] = UnitsField::class; |
| 76 | 76 | } |
| 77 | 77 | ); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | Event::on( |
| 81 | 81 | CraftVariable::class, |
| 82 | 82 | CraftVariable::EVENT_INIT, |
| 83 | - function (Event $event) { |
|
| 83 | + function(Event $event) { |
|
| 84 | 84 | /** @var CraftVariable $variable */ |
| 85 | 85 | $variable = $event->sender; |
| 86 | 86 | $variable->set('units', self::$variable); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | Event::on( |
| 91 | 91 | Plugins::class, |
| 92 | 92 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 93 | - function (PluginEvent $event) { |
|
| 93 | + function(PluginEvent $event) { |
|
| 94 | 94 | if ($event->plugin === $this) { |
| 95 | 95 | } |
| 96 | 96 | } |