Passed
Push — v4 ( e305b5...a396fd )
by Andrew
08:48 queued 04:01
created
ecs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 return static function(ECSConfig $ecsConfig): void {
7 7
     $ecsConfig->paths([
8
-        __DIR__ . '/src',
8
+        __DIR__.'/src',
9 9
         __FILE__,
10 10
     ]);
11 11
     $ecsConfig->parallel();
Please login to merge, or discard this patch.
src/Units.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                     return;
107 107
                 }
108 108
 
109
-                $object = $event->schema->createObjectType(ucfirst($field->handle) . 'Units');
109
+                $object = $event->schema->createObjectType(ucfirst($field->handle).'Units');
110 110
                 $object->addFloatField('value');
111 111
                 $object->addStringField('units');
112 112
 
Please login to merge, or discard this patch.
src/gql/types/generators/UnitsDataGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,6 +114,6 @@
 block discarded – undo
114 114
     public static function getName($context = null): string
115 115
     {
116 116
         /** @var Units $context */
117
-        return $context->handle . '_UnitsData';
117
+        return $context->handle.'_UnitsData';
118 118
     }
119 119
 }
Please login to merge, or discard this patch.
src/fields/Units.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * @var int|float|null The minimum allowed number
63 63
      */
64
-    public int|float|null $min = null;
64
+    public int | float | null $min = null;
65 65
     /**
66 66
      * @var int|float|null The maximum allowed number
67 67
      */
68
-    public int|float|null $max = null;
68
+    public int | float | null $max = null;
69 69
     /**
70 70
      * @var ?int The number of digits allowed after the decimal point
71 71
      */
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         if (!empty($value)) {
155 155
             // Handle a numeric value coming in (perhaps from a Number field)
156 156
             if (is_numeric($value)) {
157
-                $config['value'] = (float)$value;
157
+                $config['value'] = (float) $value;
158 158
             } elseif (is_string($value)) {
159 159
                 $config = Json::decodeIfJson($value);
160 160
             }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             }
164 164
         }
165 165
         // Typecast it to a float
166
-        $config['value'] = (float)$config['value'];
166
+        $config['value'] = (float) $config['value'];
167 167
         // Create and validate the model
168 168
         $unitsData = new UnitsData($config);
169 169
         if (!$unitsData->validate()) {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                 'prefix' => Craft::$app->getView()->namespaceInputId(''),
227 227
             ];
228 228
             $jsonVars = Json::encode($jsonVars);
229
-            Craft::$app->getView()->registerJs("$('#{$namespacedId}-field').UnitsUnits(" . $jsonVars . ");");
229
+            Craft::$app->getView()->registerJs("$('#{$namespacedId}-field').UnitsUnits(".$jsonVars.");");
230 230
 
231 231
             // Render the input template
232 232
             return Craft::$app->getView()->renderTemplate(
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     /**
249 249
      * @inheritdoc
250 250
      */
251
-    public function getContentGqlType(): Type|array
251
+    public function getContentGqlType(): Type | array
252 252
     {
253 253
         $typeArray = UnitsDataGenerator::generateTypes($this);
254 254
 
Please login to merge, or discard this patch.