@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | const TEMPLATE_EXTENSION = '.php'; |
27 | 27 | const STUBS_EXTENSION = '.php.stub'; |
28 | - const STUBS_DIR = DIRECTORY_SEPARATOR . 'stubs'; |
|
28 | + const STUBS_DIR = DIRECTORY_SEPARATOR.'stubs'; |
|
29 | 29 | |
30 | 30 | // Public Static Methods |
31 | 31 | // ========================================================================= |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public static function getGeneratorStubsPath(): string |
46 | 46 | { |
47 | - return Autocomplete::getInstance()->basePath . self::STUBS_DIR; |
|
47 | + return Autocomplete::getInstance()->basePath.self::STUBS_DIR; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected static function getGeneratedFilePath(): string |
103 | 103 | { |
104 | - return Craft::$app->getPath()->getCompiledClassesPath() . DIRECTORY_SEPARATOR . static::getGeneratorName() . self::TEMPLATE_EXTENSION; |
|
104 | + return Craft::$app->getPath()->getCompiledClassesPath().DIRECTORY_SEPARATOR.static::getGeneratorName().self::TEMPLATE_EXTENSION; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | protected static function getStubFilePath(): string |
113 | 113 | { |
114 | - return static::getGeneratorStubsPath() . DIRECTORY_SEPARATOR . static::getGeneratorName() . self::STUBS_EXTENSION; |
|
114 | + return static::getGeneratorStubsPath().DIRECTORY_SEPARATOR.static::getGeneratorName().self::STUBS_EXTENSION; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | } |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | // Format the line output for each value |
81 | 81 | foreach ($values as $key => $value) { |
82 | - $values[$key] = ' * @property \\' . $value . ' $' . $key; |
|
82 | + $values[$key] = ' * @property \\'.$value.' $'.$key; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | // Save the template with variable substitution |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $this->stdout('Generating autocomplete classes ... ', BaseConsole::FG_YELLOW); |
32 | 32 | /* @noinspection NullPointerExceptionInspection */ |
33 | 33 | Autocomplete::getInstance()->generateAutocompleteClasses(); |
34 | - $this->stdout('done' . PHP_EOL, BaseConsole::FG_GREEN); |
|
34 | + $this->stdout('done'.PHP_EOL, BaseConsole::FG_GREEN); |
|
35 | 35 | |
36 | 36 | return ExitCode::OK; |
37 | 37 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $this->stdout('Regenerating autocomplete classes ... ', BaseConsole::FG_YELLOW); |
45 | 45 | /* @noinspection NullPointerExceptionInspection */ |
46 | 46 | Autocomplete::getInstance()->regenerateAutocompleteClasses(); |
47 | - $this->stdout('done' . PHP_EOL, BaseConsole::FG_GREEN); |
|
47 | + $this->stdout('done'.PHP_EOL, BaseConsole::FG_GREEN); |
|
48 | 48 | |
49 | 49 | return ExitCode::OK; |
50 | 50 | } |
@@ -81,7 +81,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |