Passed
Push — v1 ( 52c974...fd69ff )
by Andrew
15:17 queued 11:13
created
src/generators/AutocompleteTwigExtensionGenerator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $type = gettype($value);
82 82
             switch ($type) {
83 83
                 case 'object':
84
-                    $values[$key] = 'new \\' . get_class($value) . '()';
84
+                    $values[$key] = 'new \\'.get_class($value).'()';
85 85
                     break;
86 86
 
87 87
                 case 'boolean':
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     break;
95 95
 
96 96
                 case 'string':
97
-                    $values[$key] = "'" . addslashes($value) . "'";
97
+                    $values[$key] = "'".addslashes($value)."'";
98 98
                     break;
99 99
 
100 100
                 case 'array':
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         // Format the line output for each value
126 126
         foreach ($values as $key => $value) {
127
-            $values[$key] = "            '" . $key . "' => " . $value . ",";
127
+            $values[$key] = "            '".$key."' => ".$value.",";
128 128
         }
129 129
 
130 130
         // Save the template with variable substitution
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             /* @var Element $elementType */
147 147
             $key = $elementType::refHandle();
148 148
             if (!empty($key) && !in_array($key, static::ELEMENT_ROUTE_EXCLUDES, true)) {
149
-                $routeVariables[$key] = 'new \\' . $elementType . '()';
149
+                $routeVariables[$key] = 'new \\'.$elementType.'()';
150 150
             }
151 151
         }
152 152
 
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
         if (class_exists(GlobalsExtension::class)) {
167 167
             $globalsExtension = new GlobalsExtension();
168 168
             foreach ($globalsExtension->getGlobals() as $key => $value) {
169
-                $globalVariables[$key] = 'new \\' . get_class($value) . '()';
169
+                $globalVariables[$key] = 'new \\'.get_class($value).'()';
170 170
             }
171 171
 
172 172
             return $globalVariables;
173 173
         }
174 174
         // Fall back and get the globals ourselves
175 175
         foreach (Craft::$app->getGlobals()->getAllSets() as $globalSet) {
176
-            $globalVariables[$globalSet->handle] = 'new \\' . get_class($globalSet) . '()';
176
+            $globalVariables[$globalSet->handle] = 'new \\'.get_class($globalSet).'()';
177 177
         }
178 178
 
179 179
         return $globalVariables;
Please login to merge, or discard this patch.